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

Public Member Functions

 ocpnDC (glChartCanvas &canvas)
 
 ocpnDC (wxGLCanvas &canvas)
 
 ocpnDC (wxDC &pdc)
 
void SetGLCanvas (glChartCanvas *canvas)
 
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
 
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 DrawGLThickLine (float x1, float y1, float x2, float y2, wxPen pen, bool b_hiqual)
 
void DrawGLThickLines (int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset, wxPen pen, bool b_hiqual)
 
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, float angle=0.0)
 
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 SetDPIFactor (double factor)
 

Static Public Member Functions

static void SetGLAttrs (bool highQuality)
 

Public Attributes

int m_canvasIndex
 

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)
 

Protected Attributes

glChartCanvasm_glchartCanvas
 
wxGLCanvas * m_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
 
double m_dpi_factor
 

Detailed Description

Definition at line 55 of file ocpndc.h.

Constructor & Destructor Documentation

◆ ocpnDC() [1/4]

ocpnDC::ocpnDC ( glChartCanvas canvas)

Definition at line 81 of file ocpndc.cpp.

◆ ocpnDC() [2/4]

ocpnDC::ocpnDC ( wxGLCanvas &  canvas)

Definition at line 107 of file ocpndc.cpp.

◆ ocpnDC() [3/4]

ocpnDC::ocpnDC ( wxDC &  pdc)

Definition at line 133 of file ocpndc.cpp.

◆ ocpnDC() [4/4]

ocpnDC::ocpnDC ( )

Definition at line 155 of file ocpndc.cpp.

◆ ~ocpnDC()

ocpnDC::~ocpnDC ( )

Definition at line 168 of file ocpndc.cpp.

Member Function Documentation

◆ CalcBoundingBox()

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

Definition at line 1977 of file ocpndc.cpp.

◆ Clear()

void ocpnDC::Clear ( )

Definition at line 181 of file ocpndc.cpp.

◆ ConfigureBrush()

bool ocpnDC::ConfigureBrush ( )
protected

Definition at line 1996 of file ocpndc.cpp.

◆ ConfigurePen()

bool ocpnDC::ConfigurePen ( )
protected

Definition at line 1981 of file ocpndc.cpp.

◆ DestroyClippingRegion()

void ocpnDC::DestroyClippingRegion ( )
inline

Definition at line 120 of file ocpndc.h.

◆ DrawBitmap()

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

Definition at line 1678 of file ocpndc.cpp.

◆ DrawCircle() [1/2]

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

Definition at line 97 of file ocpndc.h.

◆ DrawCircle() [2/2]

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

Definition at line 1147 of file ocpndc.cpp.

◆ DrawEllipse()

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

Definition at line 1220 of file ocpndc.cpp.

◆ DrawGLThickLine()

void ocpnDC::DrawGLThickLine ( float  x1,
float  y1,
float  x2,
float  y2,
wxPen  pen,
bool  b_hiqual 
)

Definition at line 357 of file ocpndc.cpp.

◆ DrawGLThickLines()

void ocpnDC::DrawGLThickLines ( int  n,
wxPoint  points[],
wxCoord  xoffset,
wxCoord  yoffset,
wxPen  pen,
bool  b_hiqual 
)

Definition at line 809 of file ocpndc.cpp.

◆ DrawLine()

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

Definition at line 583 of file ocpndc.cpp.

◆ DrawLines()

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

Definition at line 824 of file ocpndc.cpp.

◆ DrawPolygon()

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

Definition at line 1241 of file ocpndc.cpp.

◆ DrawPolygonTessellated()

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

Definition at line 1539 of file ocpndc.cpp.

◆ DrawRectangle()

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

Definition at line 986 of file ocpndc.cpp.

◆ DrawRoundedRectangle()

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

Definition at line 1066 of file ocpndc.cpp.

◆ drawrrhelperGLES2()

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

Definition at line 1029 of file ocpndc.cpp.

◆ DrawText()

void ocpnDC::DrawText ( const wxString &  text,
wxCoord  x,
wxCoord  y,
float  angle = 0.0 
)

Definition at line 1755 of file ocpndc.cpp.

◆ GetBrush()

const wxBrush & ocpnDC::GetBrush ( ) const

Definition at line 256 of file ocpndc.cpp.

◆ GetDC()

wxDC * ocpnDC::GetDC ( ) const
inline

Definition at line 122 of file ocpndc.h.

◆ GetFont()

const wxFont & ocpnDC::GetFont ( ) const

Definition at line 261 of file ocpndc.cpp.

◆ GetPen()

const wxPen & ocpnDC::GetPen ( ) const

Definition at line 251 of file ocpndc.cpp.

◆ GetSize()

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

Definition at line 266 of file ocpndc.cpp.

◆ GetTextExtent()

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

Definition at line 1939 of file ocpndc.cpp.

◆ GLDrawBlendData()

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

Definition at line 2008 of file ocpndc.cpp.

◆ ResetBoundingBox()

void ocpnDC::ResetBoundingBox ( )

Definition at line 1973 of file ocpndc.cpp.

◆ SetBackground()

void ocpnDC::SetBackground ( const wxBrush &  brush)

Definition at line 205 of file ocpndc.cpp.

◆ SetBrush()

void ocpnDC::SetBrush ( const wxBrush &  brush)

Definition at line 230 of file ocpndc.cpp.

◆ SetDPIFactor()

void ocpnDC::SetDPIFactor ( double  factor)
inline

Definition at line 123 of file ocpndc.h.

◆ SetFont()

void ocpnDC::SetFont ( const wxFont &  font)

Definition at line 244 of file ocpndc.cpp.

◆ SetGLAttrs()

void ocpnDC::SetGLAttrs ( bool  highQuality)
static

Definition at line 282 of file ocpndc.cpp.

◆ SetGLCanvas()

void ocpnDC::SetGLCanvas ( glChartCanvas canvas)

Definition at line 176 of file ocpndc.cpp.

◆ SetGLStipple()

void ocpnDC::SetGLStipple ( ) const

Definition at line 299 of file ocpndc.cpp.

◆ SetPen()

void ocpnDC::SetPen ( const wxPen &  pen)

Definition at line 220 of file ocpndc.cpp.

◆ SetTextForeground()

void ocpnDC::SetTextForeground ( const wxColour &  colour)

Definition at line 237 of file ocpndc.cpp.

◆ StrokeCircle()

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

Definition at line 1202 of file ocpndc.cpp.

◆ StrokeLine() [1/2]

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

Definition at line 953 of file ocpndc.cpp.

◆ StrokeLine() [2/2]

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

Definition at line 89 of file ocpndc.h.

◆ StrokeLines()

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

Definition at line 966 of file ocpndc.cpp.

◆ StrokePolygon()

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

Definition at line 1653 of file ocpndc.cpp.

Member Data Documentation

◆ dc

wxDC* ocpnDC::dc
protected

Definition at line 158 of file ocpndc.h.

◆ m_brush

wxBrush ocpnDC::m_brush
protected

Definition at line 160 of file ocpndc.h.

◆ m_buseTex

bool ocpnDC::m_buseTex
protected

Definition at line 164 of file ocpndc.h.

◆ m_canvasIndex

int ocpnDC::m_canvasIndex

Definition at line 140 of file ocpndc.h.

◆ m_dpi_factor

double ocpnDC::m_dpi_factor
protected

Definition at line 173 of file ocpndc.h.

◆ m_font

wxFont ocpnDC::m_font
protected

Definition at line 162 of file ocpndc.h.

◆ m_glcanvas

wxGLCanvas* ocpnDC::m_glcanvas
protected

Definition at line 156 of file ocpndc.h.

◆ m_glchartCanvas

glChartCanvas* ocpnDC::m_glchartCanvas
protected

Definition at line 155 of file ocpndc.h.

◆ m_pen

wxPen ocpnDC::m_pen
protected

Definition at line 159 of file ocpndc.h.

◆ m_textforegroundcolour

wxColour ocpnDC::m_textforegroundcolour
protected

Definition at line 161 of file ocpndc.h.

◆ workBuf

float* ocpnDC::workBuf
protected

Definition at line 170 of file ocpndc.h.

◆ workBufIndex

unsigned int ocpnDC::workBufIndex
protected

Definition at line 172 of file ocpndc.h.

◆ workBufSize

size_t ocpnDC::workBufSize
protected

Definition at line 171 of file ocpndc.h.


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