OpenCPN Partial API docs
Loading...
Searching...
No Matches
pi_ocpnDC Class Reference

Public Member Functions

 pi_ocpnDC (wxGLCanvas &canvas)
 
 pi_ocpnDC (wxDC &pdc)
 
void SetBackground (const wxBrush &brush)
 
void SetPen (const wxPen &pen)
 
void SetBrush (const wxBrush &brush)
 
void SetTextForeground (const wxColour &colour)
 
void SetFont (const wxFont &font)
 
void SetGLStipple () const
 
void SetVP (PlugIn_ViewPort *vp)
 
void SetDC (wxDC *dc_in)
 
const wxPen & GetPen () const
 
const wxBrush & GetBrush () const
 
const wxFont & GetFont () const
 
void GetSize (wxCoord *width, wxCoord *height) const
 
void DrawLine (wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, bool b_hiqual=true)
 
void DrawLines (int n, wxPoint points[], wxCoord xoffset=0, wxCoord yoffset=0, bool b_hiqual=true)
 
void StrokeLine (wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
 
void StrokeLine (wxPoint a, wxPoint b)
 
void StrokeLines (int n, wxPoint *points)
 
void Clear ()
 
void DrawRectangle (wxCoord x, wxCoord y, wxCoord w, wxCoord h)
 
void DrawRoundedRectangle (wxCoord x, wxCoord y, wxCoord w, wxCoord h, wxCoord rr)
 
void DrawCircle (wxCoord x, wxCoord y, wxCoord radius)
 
void DrawCircle (const wxPoint &pt, wxCoord radius)
 
void StrokeCircle (wxCoord x, wxCoord y, wxCoord radius)
 
void DrawEllipse (wxCoord x, wxCoord y, wxCoord width, wxCoord height)
 
void DrawPolygon (int n, wxPoint points[], wxCoord xoffset=0, wxCoord yoffset=0, float scale=1.0, float angle=0.0)
 
void DrawPolygonTessellated (int n, wxPoint points[], wxCoord xoffset=0, wxCoord yoffset=0)
 
void StrokePolygon (int n, wxPoint points[], wxCoord xoffset=0, wxCoord yoffset=0, float scale=1.0)
 
void DrawBitmap (const wxBitmap &bitmap, wxCoord x, wxCoord y, bool usemask)
 
void DrawText (const wxString &text, wxCoord x, wxCoord y)
 
void GetTextExtent (const wxString &string, wxCoord *w, wxCoord *h, wxCoord *descent=nullptr, wxCoord *externalLeading=nullptr, wxFont *font=nullptr)
 
void ResetBoundingBox ()
 
void CalcBoundingBox (wxCoord x, wxCoord y)
 
void DestroyClippingRegion ()
 
wxDC * GetDC () const
 
void DrawGLLineArray (int n, float *vertex_array, float *color_array, unsigned char *color_array_ub, bool b_hiqual)
 
bool UsesGL ()
 
 pi_ocpnDC (wxGLCanvas &canvas)
 
 pi_ocpnDC (wxDC &pdc)
 
void SetBackground (const wxBrush &brush)
 
void SetPen (const wxPen &pen)
 
void SetBrush (const wxBrush &brush)
 
void SetTextForeground (const wxColour &colour)
 
void SetFont (const wxFont &font)
 
void SetGLStipple () const
 
void SetVP (PlugIn_ViewPort *vp)
 
void SetDC (wxDC *dc_in)
 
const wxPen & GetPen () const
 
const wxBrush & GetBrush () const
 
const wxFont & GetFont () const
 
void GetSize (wxCoord *width, wxCoord *height) const
 
void DrawLine (wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, bool b_hiqual=true)
 
void DrawLines (int n, wxPoint points[], wxCoord xoffset=0, wxCoord yoffset=0, bool b_hiqual=true)
 
void StrokeLine (wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
 
void StrokeLine (wxPoint a, wxPoint b)
 
void StrokeLines (int n, wxPoint *points)
 
void Clear ()
 
void DrawRectangle (wxCoord x, wxCoord y, wxCoord w, wxCoord h)
 
void DrawRoundedRectangle (wxCoord x, wxCoord y, wxCoord w, wxCoord h, wxCoord rr)
 
void DrawCircle (wxCoord x, wxCoord y, wxCoord radius)
 
void DrawCircle (const wxPoint &pt, wxCoord radius)
 
void StrokeCircle (wxCoord x, wxCoord y, wxCoord radius)
 
void DrawEllipse (wxCoord x, wxCoord y, wxCoord width, wxCoord height)
 
void DrawPolygon (int n, wxPoint points[], wxCoord xoffset=0, wxCoord yoffset=0, float scale=1.0, float angle=0.0)
 
void DrawPolygonTessellated (int n, wxPoint points[], wxCoord xoffset=0, wxCoord yoffset=0)
 
void StrokePolygon (int n, wxPoint points[], wxCoord xoffset=0, wxCoord yoffset=0, float scale=1.0)
 
void DrawBitmap (const wxBitmap &bitmap, wxCoord x, wxCoord y, bool usemask)
 
void DrawText (const wxString &text, wxCoord x, wxCoord y)
 
void GetTextExtent (const wxString &string, wxCoord *w, wxCoord *h, wxCoord *descent=NULL, wxCoord *externalLeading=NULL, wxFont *font=NULL)
 
void ResetBoundingBox ()
 
void CalcBoundingBox (wxCoord x, wxCoord y)
 
void DestroyClippingRegion ()
 
wxDC * GetDC () const
 
void DrawGLLineArray (int n, float *vertex_array, unsigned char *color_array, bool b_hiqual)
 
void DrawGLLineArray (int n, float *vertex_array, float *color_array, bool b_hiqual)
 

Static Public Member Functions

static void SetGLAttrs (bool highQuality)
 
static void SetGLAttrs (bool highQuality)
 

Protected Member Functions

bool ConfigurePen ()
 
bool ConfigureBrush ()
 
void GLDrawBlendData (wxCoord x, wxCoord y, wxCoord w, wxCoord h, int format, const unsigned char *data)
 
void drawrrhelperGLES2 (wxCoord x0, wxCoord y0, wxCoord r, int quadrant, int steps)
 
bool ConfigurePen ()
 
bool ConfigureBrush ()
 
void GLDrawBlendData (wxCoord x, wxCoord y, wxCoord w, wxCoord h, int format, const unsigned char *data)
 
void drawrrhelperGLES2 (wxCoord x0, wxCoord y0, wxCoord r, int quadrant, int steps)
 

Protected Attributes

wxGLCanvas * glcanvas
 
wxDC * dc
 
wxPen m_pen
 
wxBrush m_brush
 
wxColour m_textforegroundcolour
 
wxFont m_font
 
bool m_buseTex
 
float * workBuf
 
size_t workBufSize
 
unsigned int workBufIndex
 
wxSize m_vpSize
 
bool m_buseGL
 

Detailed Description

Definition at line 65 of file pi_ocpndc.h.

Constructor & Destructor Documentation

◆ pi_ocpnDC() [1/3]

pi_ocpnDC::pi_ocpnDC ( wxGLCanvas &  canvas)

Definition at line 88 of file pi_ocpndc.cpp.

◆ pi_ocpnDC() [2/3]

pi_ocpnDC::pi_ocpnDC ( wxDC &  pdc)

Definition at line 117 of file pi_ocpndc.cpp.

◆ pi_ocpnDC() [3/3]

pi_ocpnDC::pi_ocpnDC ( )

Definition at line 142 of file pi_ocpndc.cpp.

◆ ~pi_ocpnDC()

pi_ocpnDC::~pi_ocpnDC ( )

Definition at line 161 of file pi_ocpndc.cpp.

Member Function Documentation

◆ CalcBoundingBox()

void pi_ocpnDC::CalcBoundingBox ( wxCoord  x,
wxCoord  y 
)

Definition at line 2199 of file pi_ocpndc.cpp.

◆ Clear()

void pi_ocpnDC::Clear ( )

Definition at line 180 of file pi_ocpndc.cpp.

◆ ConfigureBrush()

bool pi_ocpnDC::ConfigureBrush ( )
protected

Definition at line 2216 of file pi_ocpndc.cpp.

◆ ConfigurePen()

bool pi_ocpnDC::ConfigurePen ( )
protected

Definition at line 2203 of file pi_ocpndc.cpp.

◆ DestroyClippingRegion() [1/2]

void pi_ocpnDC::DestroyClippingRegion ( )
inline

Definition at line 127 of file pi_ocpndc.h.

◆ DestroyClippingRegion() [2/2]

void pi_ocpnDC::DestroyClippingRegion ( )
inline

Definition at line 116 of file pi_ocpndc.h.

◆ DrawBitmap()

void pi_ocpnDC::DrawBitmap ( const wxBitmap &  bitmap,
wxCoord  x,
wxCoord  y,
bool  usemask 
)

Definition at line 1822 of file pi_ocpndc.cpp.

◆ DrawCircle() [1/3]

void pi_ocpnDC::DrawCircle ( const wxPoint &  pt,
wxCoord  radius 
)
inline

Definition at line 103 of file pi_ocpndc.h.

◆ DrawCircle() [2/3]

void pi_ocpnDC::DrawCircle ( const wxPoint &  pt,
wxCoord  radius 
)
inline

Definition at line 93 of file pi_ocpndc.h.

◆ DrawCircle() [3/3]

void pi_ocpnDC::DrawCircle ( wxCoord  x,
wxCoord  y,
wxCoord  radius 
)

Definition at line 1285 of file pi_ocpndc.cpp.

◆ DrawEllipse()

void pi_ocpnDC::DrawEllipse ( wxCoord  x,
wxCoord  y,
wxCoord  width,
wxCoord  height 
)

Definition at line 1389 of file pi_ocpndc.cpp.

◆ DrawGLLineArray() [1/2]

void pi_ocpnDC::DrawGLLineArray ( int  n,
float *  vertex_array,
float *  color_array,
bool  b_hiqual 
)

Definition at line 964 of file pi_ocpndc.cpp.

◆ DrawGLLineArray() [2/2]

void pi_ocpnDC::DrawGLLineArray ( int  n,
float *  vertex_array,
float *  color_array,
unsigned char *  color_array_ub,
bool  b_hiqual 
)

Definition at line 994 of file pi_ocpndc.cpp.

◆ DrawLine()

void pi_ocpnDC::DrawLine ( wxCoord  x1,
wxCoord  y1,
wxCoord  x2,
wxCoord  y2,
bool  b_hiqual = true 
)

Definition at line 555 of file pi_ocpndc.cpp.

◆ DrawLines()

void pi_ocpnDC::DrawLines ( int  n,
wxPoint  points[],
wxCoord  xoffset = 0,
wxCoord  yoffset = 0,
bool  b_hiqual = true 
)

Definition at line 848 of file pi_ocpndc.cpp.

◆ DrawPolygon()

void pi_ocpnDC::DrawPolygon ( int  n,
wxPoint  points[],
wxCoord  xoffset = 0,
wxCoord  yoffset = 0,
float  scale = 1.0,
float  angle = 0.0 
)

Definition at line 1427 of file pi_ocpndc.cpp.

◆ DrawPolygonTessellated()

void pi_ocpnDC::DrawPolygonTessellated ( int  n,
wxPoint  points[],
wxCoord  xoffset = 0,
wxCoord  yoffset = 0 
)

Definition at line 1705 of file pi_ocpndc.cpp.

◆ DrawRectangle()

void pi_ocpnDC::DrawRectangle ( wxCoord  x,
wxCoord  y,
wxCoord  w,
wxCoord  h 
)

Definition at line 1083 of file pi_ocpndc.cpp.

◆ DrawRoundedRectangle()

void pi_ocpnDC::DrawRoundedRectangle ( wxCoord  x,
wxCoord  y,
wxCoord  w,
wxCoord  h,
wxCoord  rr 
)

Definition at line 1182 of file pi_ocpndc.cpp.

◆ drawrrhelperGLES2()

void pi_ocpnDC::drawrrhelperGLES2 ( wxCoord  x0,
wxCoord  y0,
wxCoord  r,
int  quadrant,
int  steps 
)
protected

Definition at line 1147 of file pi_ocpndc.cpp.

◆ DrawText()

void pi_ocpnDC::DrawText ( const wxString &  text,
wxCoord  x,
wxCoord  y 
)

Definition at line 1901 of file pi_ocpndc.cpp.

◆ GetBrush()

const wxBrush & pi_ocpnDC::GetBrush ( ) const

Definition at line 241 of file pi_ocpndc.cpp.

◆ GetDC() [1/2]

wxDC * pi_ocpnDC::GetDC ( ) const
inline

Definition at line 129 of file pi_ocpndc.h.

◆ GetDC() [2/2]

wxDC * pi_ocpnDC::GetDC ( ) const
inline

Definition at line 118 of file pi_ocpndc.h.

◆ GetFont()

const wxFont & pi_ocpnDC::GetFont ( ) const

Definition at line 246 of file pi_ocpndc.cpp.

◆ GetPen()

const wxPen & pi_ocpnDC::GetPen ( ) const

Definition at line 236 of file pi_ocpndc.cpp.

◆ GetSize()

void pi_ocpnDC::GetSize ( wxCoord *  width,
wxCoord *  height 
) const

Definition at line 251 of file pi_ocpndc.cpp.

◆ GetTextExtent()

void pi_ocpnDC::GetTextExtent ( const wxString &  string,
wxCoord *  w,
wxCoord *  h,
wxCoord *  descent = nullptr,
wxCoord *  externalLeading = nullptr,
wxFont *  font = nullptr 
)

Definition at line 2157 of file pi_ocpndc.cpp.

◆ GLDrawBlendData()

void pi_ocpnDC::GLDrawBlendData ( wxCoord  x,
wxCoord  y,
wxCoord  w,
wxCoord  h,
int  format,
const unsigned char *  data 
)
protected

Definition at line 2226 of file pi_ocpndc.cpp.

◆ ResetBoundingBox()

void pi_ocpnDC::ResetBoundingBox ( )

Definition at line 2195 of file pi_ocpndc.cpp.

◆ SetBackground()

void pi_ocpnDC::SetBackground ( const wxBrush &  brush)

Definition at line 195 of file pi_ocpndc.cpp.

◆ SetBrush()

void pi_ocpnDC::SetBrush ( const wxBrush &  brush)

Definition at line 215 of file pi_ocpndc.cpp.

◆ SetDC() [1/2]

void pi_ocpnDC::SetDC ( wxDC *  dc_in)
inline

Definition at line 81 of file pi_ocpndc.h.

◆ SetDC() [2/2]

void pi_ocpnDC::SetDC ( wxDC *  dc_in)
inline

Definition at line 71 of file pi_ocpndc.h.

◆ SetFont()

void pi_ocpnDC::SetFont ( const wxFont &  font)

Definition at line 229 of file pi_ocpndc.cpp.

◆ SetGLAttrs()

void pi_ocpnDC::SetGLAttrs ( bool  highQuality)
static

Definition at line 261 of file pi_ocpndc.cpp.

◆ SetGLStipple()

void pi_ocpnDC::SetGLStipple ( ) const

Definition at line 277 of file pi_ocpndc.cpp.

◆ SetPen()

void pi_ocpnDC::SetPen ( const wxPen &  pen)

Definition at line 205 of file pi_ocpndc.cpp.

◆ SetTextForeground()

void pi_ocpnDC::SetTextForeground ( const wxColour &  colour)

Definition at line 222 of file pi_ocpndc.cpp.

◆ SetVP()

void pi_ocpnDC::SetVP ( PlugIn_ViewPort vp)

Definition at line 171 of file pi_ocpndc.cpp.

◆ StrokeCircle()

void pi_ocpnDC::StrokeCircle ( wxCoord  x,
wxCoord  y,
wxCoord  radius 
)

Definition at line 1371 of file pi_ocpndc.cpp.

◆ StrokeLine() [1/3]

void pi_ocpnDC::StrokeLine ( wxCoord  x1,
wxCoord  y1,
wxCoord  x2,
wxCoord  y2 
)

Definition at line 961 of file pi_ocpndc.cpp.

◆ StrokeLine() [2/3]

void pi_ocpnDC::StrokeLine ( wxPoint  a,
wxPoint  b 
)
inline

Definition at line 95 of file pi_ocpndc.h.

◆ StrokeLine() [3/3]

void pi_ocpnDC::StrokeLine ( wxPoint  a,
wxPoint  b 
)
inline

Definition at line 85 of file pi_ocpndc.h.

◆ StrokeLines()

void pi_ocpnDC::StrokeLines ( int  n,
wxPoint *  points 
)

Definition at line 974 of file pi_ocpndc.cpp.

◆ StrokePolygon()

void pi_ocpnDC::StrokePolygon ( int  n,
wxPoint  points[],
wxCoord  xoffset = 0,
wxCoord  yoffset = 0,
float  scale = 1.0 
)

Definition at line 1801 of file pi_ocpndc.cpp.

◆ UsesGL()

bool pi_ocpnDC::UsesGL ( )
inline

Definition at line 146 of file pi_ocpndc.h.

Member Data Documentation

◆ dc

wxDC * pi_ocpnDC::dc
protected

Definition at line 159 of file pi_ocpndc.h.

◆ glcanvas

wxGLCanvas * pi_ocpnDC::glcanvas
protected

Definition at line 158 of file pi_ocpndc.h.

◆ m_brush

wxBrush pi_ocpnDC::m_brush
protected

Definition at line 161 of file pi_ocpndc.h.

◆ m_buseGL

bool pi_ocpnDC::m_buseGL
protected

Definition at line 179 of file pi_ocpndc.h.

◆ m_buseTex

bool pi_ocpnDC::m_buseTex
protected

Definition at line 168 of file pi_ocpndc.h.

◆ m_font

wxFont pi_ocpnDC::m_font
protected

Definition at line 163 of file pi_ocpndc.h.

◆ m_pen

wxPen pi_ocpnDC::m_pen
protected

Definition at line 160 of file pi_ocpndc.h.

◆ m_textforegroundcolour

wxColour pi_ocpnDC::m_textforegroundcolour
protected

Definition at line 162 of file pi_ocpndc.h.

◆ m_vpSize

wxSize pi_ocpnDC::m_vpSize
protected

Definition at line 178 of file pi_ocpndc.h.

◆ workBuf

float * pi_ocpnDC::workBuf
protected

Definition at line 174 of file pi_ocpndc.h.

◆ workBufIndex

unsigned int pi_ocpnDC::workBufIndex
protected

Definition at line 176 of file pi_ocpndc.h.

◆ workBufSize

size_t pi_ocpnDC::workBufSize
protected

Definition at line 175 of file pi_ocpndc.h.


The documentation for this class was generated from the following files: