67 ocpnDC(wxGLCanvas &canvas);
76 void SetBackground(
const wxBrush &brush);
77 void SetPen(
const wxPen &pen);
78 void SetBrush(
const wxBrush &brush);
79 void SetTextForeground(
const wxColour &colour);
80 void SetFont(
const wxFont &font);
81 static void SetGLAttrs(
bool highQuality);
82 void SetGLStipple()
const;
84 const wxPen &GetPen()
const;
85 const wxBrush &GetBrush()
const;
86 const wxFont &GetFont()
const;
88 void GetSize(wxCoord *width, wxCoord *height)
const;
106 void DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2,
107 bool b_hiqual =
true);
108 void DrawLines(
int n, wxPoint points[], wxCoord xoffset = 0,
109 wxCoord yoffset = 0,
bool b_hiqual =
true);
110 void DrawGLThickLine(
float x1,
float y1,
float x2,
float y2, wxPen pen,
112 void DrawGLThickLines(
int n, wxPoint points[], wxCoord xoffset,
113 wxCoord yoffset, wxPen pen,
bool b_hiqual);
115 void StrokeLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
116 void StrokeLine(wxPoint a, wxPoint b) { StrokeLine(a.x, a.y, b.x, b.y); }
117 void StrokeLines(
int n, wxPoint *points);
120 void DrawRectangle(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
121 void DrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
123 void DrawCircle(wxCoord x, wxCoord y, wxCoord radius);
124 void DrawCircle(
const wxPoint &pt, wxCoord radius) {
125 DrawCircle(pt.x, pt.y, radius);
127 void StrokeCircle(wxCoord x, wxCoord y, wxCoord radius);
129 void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
130 void DrawPolygon(
int n, wxPoint points[], wxCoord xoffset = 0,
131 wxCoord yoffset = 0,
float scale = 1.0,
float angle = 0.0);
132 void DrawPolygonTessellated(
int n, wxPoint points[], wxCoord xoffset = 0,
133 wxCoord yoffset = 0);
134 void StrokePolygon(
int n, wxPoint points[], wxCoord xoffset = 0,
135 wxCoord yoffset = 0,
float scale = 1.0);
137 void DrawBitmap(
const wxBitmap &bitmap, wxCoord x, wxCoord y,
bool usemask);
139 void DrawText(
const wxString &text, wxCoord x, wxCoord y,
float angle = 0.0);
140 void GetTextExtent(
const wxString &
string, wxCoord *w, wxCoord *h,
141 wxCoord *descent = NULL, wxCoord *externalLeading = NULL,
142 wxFont *font = NULL);
144 void ResetBoundingBox();
145 void CalcBoundingBox(wxCoord x, wxCoord y);
147 void DestroyClippingRegion() {}
149 wxDC *GetDC()
const {
return dc; }
150 void SetDPIFactor(
double factor) { m_dpi_factor = factor; }
154 GLfloat *s_odc_tess_work_buf;
157#if defined(USE_ANDROID_GLES2) || defined(ocpnUSE_GLSL)
158 int s_odc_tess_vertex_idx;
159 int s_odc_tess_vertex_idx_this;
160 int s_odc_tess_buf_len;
161 GLenum s_odc_tess_mode;
163 vec4 s_odc_tess_color;
165 GLUtesselator *m_tobj;
175 bool ConfigureBrush();
177 void GLDrawBlendData(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
int format,
178 const unsigned char *data);
180 void drawrrhelperGLES2(wxCoord x0, wxCoord y0, wxCoord r,
int quadrant,
186 wxGLCanvas *m_glcanvas;
191 wxColour m_textforegroundcolour;
196#if wxUSE_GRAPHICS_CONTEXT
197 wxGraphicsContext *pgc;
202 unsigned int workBufIndex;