63 ocpnDC(wxGLCanvas &canvas);
72 void SetBackground(
const wxBrush &brush);
73 void SetPen(
const wxPen &pen);
74 void SetBrush(
const wxBrush &brush);
75 void SetTextForeground(
const wxColour &colour);
76 void SetFont(
const wxFont &font);
77 static void SetGLAttrs(
bool highQuality);
78 void SetGLStipple()
const;
80 const wxPen &GetPen()
const;
81 const wxBrush &GetBrush()
const;
82 const wxFont &GetFont()
const;
84 void GetSize(wxCoord *width, wxCoord *height)
const;
102 void DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2,
103 bool b_hiqual =
true);
104 void DrawLines(
int n, wxPoint points[], wxCoord xoffset = 0,
105 wxCoord yoffset = 0,
bool b_hiqual =
true);
106 void DrawGLThickLine(
float x1,
float y1,
float x2,
float y2, wxPen pen,
108 void DrawGLThickLines(
int n, wxPoint points[], wxCoord xoffset,
109 wxCoord yoffset, wxPen pen,
bool b_hiqual);
111 void StrokeLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
112 void StrokeLine(wxPoint a, wxPoint b) { StrokeLine(a.x, a.y, b.x, b.y); }
113 void StrokeLines(
int n, wxPoint *points);
116 void DrawRectangle(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
117 void DrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
119 void DrawCircle(wxCoord x, wxCoord y, wxCoord radius);
120 void DrawCircle(
const wxPoint &pt, wxCoord radius) {
121 DrawCircle(pt.x, pt.y, radius);
123 void StrokeCircle(wxCoord x, wxCoord y, wxCoord radius);
125 void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
126 void DrawPolygon(
int n, wxPoint points[], wxCoord xoffset = 0,
127 wxCoord yoffset = 0,
float scale = 1.0,
float angle = 0.0);
128 void DrawPolygonTessellated(
int n, wxPoint points[], wxCoord xoffset = 0,
129 wxCoord yoffset = 0);
130 void StrokePolygon(
int n, wxPoint points[], wxCoord xoffset = 0,
131 wxCoord yoffset = 0,
float scale = 1.0);
133 void DrawBitmap(
const wxBitmap &bitmap, wxCoord x, wxCoord y,
bool usemask);
135 void DrawText(
const wxString &text, wxCoord x, wxCoord y,
float angle = 0.0);
136 void GetTextExtent(
const wxString &
string, wxCoord *w, wxCoord *h,
137 wxCoord *descent = NULL, wxCoord *externalLeading = NULL,
138 wxFont *font = NULL);
140 void ResetBoundingBox();
141 void CalcBoundingBox(wxCoord x, wxCoord y);
143 void DestroyClippingRegion() {}
145 wxDC *GetDC()
const {
return dc; }
146 void SetDPIFactor(
double factor) { m_dpi_factor = factor; }
150 GLfloat *s_odc_tess_work_buf;
153#if defined(USE_ANDROID_GLES2) || defined(ocpnUSE_GLSL)
154 int s_odc_tess_vertex_idx;
155 int s_odc_tess_vertex_idx_this;
156 int s_odc_tess_buf_len;
157 GLenum s_odc_tess_mode;
159 vec4 s_odc_tess_color;
161 GLUtesselator *m_tobj;
171 bool ConfigureBrush();
173 void GLDrawBlendData(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
int format,
174 const unsigned char *data);
176 void drawrrhelperGLES2(wxCoord x0, wxCoord y0, wxCoord r,
int quadrant,
182 wxGLCanvas *m_glcanvas;
187 wxColour m_textforegroundcolour;
192#if wxUSE_GRAPHICS_CONTEXT
193 wxGraphicsContext *pgc;
198 unsigned int workBufIndex;