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 66 of file pi_ocpndc.h.

Constructor & Destructor Documentation

◆ pi_ocpnDC() [1/3]

pi_ocpnDC::pi_ocpnDC ( wxGLCanvas &  canvas)

Definition at line 89 of file pi_ocpndc.cpp.

◆ pi_ocpnDC() [2/3]

pi_ocpnDC::pi_ocpnDC ( wxDC &  pdc)

Definition at line 118 of file pi_ocpndc.cpp.

◆ pi_ocpnDC() [3/3]

pi_ocpnDC::pi_ocpnDC ( )

Definition at line 143 of file pi_ocpndc.cpp.

◆ ~pi_ocpnDC()

pi_ocpnDC::~pi_ocpnDC ( )

Definition at line 163 of file pi_ocpndc.cpp.

Member Function Documentation

◆ CalcBoundingBox()

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

Definition at line 2201 of file pi_ocpndc.cpp.

◆ Clear()

void pi_ocpnDC::Clear ( )

Definition at line 182 of file pi_ocpndc.cpp.

◆ ConfigureBrush()

bool pi_ocpnDC::ConfigureBrush ( )
protected

Definition at line 2218 of file pi_ocpndc.cpp.

◆ ConfigurePen()

bool pi_ocpnDC::ConfigurePen ( )
protected

Definition at line 2205 of file pi_ocpndc.cpp.

◆ DestroyClippingRegion() [1/2]

void pi_ocpnDC::DestroyClippingRegion ( )
inline

Definition at line 128 of file pi_ocpndc.h.

◆ DestroyClippingRegion() [2/2]

void pi_ocpnDC::DestroyClippingRegion ( )
inline

Definition at line 111 of file pi_ocpndc.h.

◆ DrawBitmap()

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

Definition at line 1824 of file pi_ocpndc.cpp.

◆ DrawCircle() [1/3]

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

Definition at line 104 of file pi_ocpndc.h.

◆ DrawCircle() [2/3]

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

Definition at line 88 of file pi_ocpndc.h.

◆ DrawCircle() [3/3]

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

Definition at line 1287 of file pi_ocpndc.cpp.

◆ DrawEllipse()

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

Definition at line 1391 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 959 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 996 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 557 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 850 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 1429 of file pi_ocpndc.cpp.

◆ DrawPolygonTessellated()

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

Definition at line 1707 of file pi_ocpndc.cpp.

◆ DrawRectangle()

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

Definition at line 1085 of file pi_ocpndc.cpp.

◆ DrawRoundedRectangle()

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

Definition at line 1184 of file pi_ocpndc.cpp.

◆ drawrrhelperGLES2()

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

Definition at line 1149 of file pi_ocpndc.cpp.

◆ DrawText()

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

Definition at line 1903 of file pi_ocpndc.cpp.

◆ GetBrush()

const wxBrush & pi_ocpnDC::GetBrush ( ) const

Definition at line 243 of file pi_ocpndc.cpp.

◆ GetDC() [1/2]

wxDC * pi_ocpnDC::GetDC ( ) const
inline

Definition at line 130 of file pi_ocpndc.h.

◆ GetDC() [2/2]

wxDC * pi_ocpnDC::GetDC ( ) const
inline

Definition at line 113 of file pi_ocpndc.h.

◆ GetFont()

const wxFont & pi_ocpnDC::GetFont ( ) const

Definition at line 248 of file pi_ocpndc.cpp.

◆ GetPen()

const wxPen & pi_ocpnDC::GetPen ( ) const

Definition at line 238 of file pi_ocpndc.cpp.

◆ GetSize()

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

Definition at line 253 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 2159 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 2228 of file pi_ocpndc.cpp.

◆ ResetBoundingBox()

void pi_ocpnDC::ResetBoundingBox ( )

Definition at line 2197 of file pi_ocpndc.cpp.

◆ SetBackground()

void pi_ocpnDC::SetBackground ( const wxBrush &  brush)

Definition at line 197 of file pi_ocpndc.cpp.

◆ SetBrush()

void pi_ocpnDC::SetBrush ( const wxBrush &  brush)

Definition at line 217 of file pi_ocpndc.cpp.

◆ SetDC() [1/2]

void pi_ocpnDC::SetDC ( wxDC *  dc_in)
inline

Definition at line 82 of file pi_ocpndc.h.

◆ SetDC() [2/2]

void pi_ocpnDC::SetDC ( wxDC *  dc_in)
inline

Definition at line 66 of file pi_ocpndc.h.

◆ SetFont()

void pi_ocpnDC::SetFont ( const wxFont &  font)

Definition at line 231 of file pi_ocpndc.cpp.

◆ SetGLAttrs()

void pi_ocpnDC::SetGLAttrs ( bool  highQuality)
static

Definition at line 263 of file pi_ocpndc.cpp.

◆ SetGLStipple()

void pi_ocpnDC::SetGLStipple ( ) const

Definition at line 279 of file pi_ocpndc.cpp.

◆ SetPen()

void pi_ocpnDC::SetPen ( const wxPen &  pen)

Definition at line 207 of file pi_ocpndc.cpp.

◆ SetTextForeground()

void pi_ocpnDC::SetTextForeground ( const wxColour &  colour)

Definition at line 224 of file pi_ocpndc.cpp.

◆ SetVP()

void pi_ocpnDC::SetVP ( PlugIn_ViewPort vp)

Definition at line 173 of file pi_ocpndc.cpp.

◆ StrokeCircle()

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

Definition at line 1373 of file pi_ocpndc.cpp.

◆ StrokeLine() [1/3]

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

Definition at line 963 of file pi_ocpndc.cpp.

◆ StrokeLine() [2/3]

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

Definition at line 96 of file pi_ocpndc.h.

◆ StrokeLine() [3/3]

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

Definition at line 80 of file pi_ocpndc.h.

◆ StrokeLines()

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

Definition at line 976 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 1803 of file pi_ocpndc.cpp.

◆ UsesGL()

bool pi_ocpnDC::UsesGL ( )
inline

Definition at line 147 of file pi_ocpndc.h.

Member Data Documentation

◆ dc

wxDC * pi_ocpnDC::dc
protected

Definition at line 160 of file pi_ocpndc.h.

◆ glcanvas

wxGLCanvas * pi_ocpnDC::glcanvas
protected

Definition at line 159 of file pi_ocpndc.h.

◆ m_brush

wxBrush pi_ocpnDC::m_brush
protected

Definition at line 162 of file pi_ocpndc.h.

◆ m_buseGL

bool pi_ocpnDC::m_buseGL
protected

Definition at line 180 of file pi_ocpndc.h.

◆ m_buseTex

bool pi_ocpnDC::m_buseTex
protected

Definition at line 169 of file pi_ocpndc.h.

◆ m_font

wxFont pi_ocpnDC::m_font
protected

Definition at line 164 of file pi_ocpndc.h.

◆ m_pen

wxPen pi_ocpnDC::m_pen
protected

Definition at line 161 of file pi_ocpndc.h.

◆ m_textforegroundcolour

wxColour pi_ocpnDC::m_textforegroundcolour
protected

Definition at line 163 of file pi_ocpndc.h.

◆ m_vpSize

wxSize pi_ocpnDC::m_vpSize
protected

Definition at line 179 of file pi_ocpndc.h.

◆ workBuf

float * pi_ocpnDC::workBuf
protected

Definition at line 175 of file pi_ocpndc.h.

◆ workBufIndex

unsigned int pi_ocpnDC::workBufIndex
protected

Definition at line 177 of file pi_ocpndc.h.

◆ workBufSize

size_t pi_ocpnDC::workBufSize
protected

Definition at line 176 of file pi_ocpndc.h.


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