45void DrawGLThickLine(
float x1,
float y1,
float x2,
float y2, wxPen pen,
58 ocpnDC(wxGLCanvas &canvas);
65 void SetBackground(
const wxBrush &brush);
66 void SetPen(
const wxPen &pen);
67 void SetBrush(
const wxBrush &brush);
68 void SetTextForeground(
const wxColour &colour);
69 void SetFont(
const wxFont &font);
70 static void SetGLAttrs(
bool highQuality);
71 void SetGLStipple()
const;
73 const wxPen &GetPen()
const;
74 const wxBrush &GetBrush()
const;
75 const wxFont &GetFont()
const;
77 void GetSize(wxCoord *width, wxCoord *height)
const;
79 void DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2,
80 bool b_hiqual =
true);
81 void DrawLines(
int n, wxPoint points[], wxCoord xoffset = 0,
82 wxCoord yoffset = 0,
bool b_hiqual =
true);
83 void DrawGLThickLine(
float x1,
float y1,
float x2,
float y2, wxPen pen,
85 void DrawGLThickLines(
int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset,
86 wxPen pen,
bool b_hiqual);
88 void StrokeLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
89 void StrokeLine(wxPoint a, wxPoint b) { StrokeLine(a.x, a.y, b.x, b.y); }
90 void StrokeLines(
int n, wxPoint *points);
93 void DrawRectangle(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
94 void DrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
96 void DrawCircle(wxCoord x, wxCoord y, wxCoord radius);
97 void DrawCircle(
const wxPoint &pt, wxCoord radius) {
98 DrawCircle(pt.x, pt.y, radius);
100 void StrokeCircle(wxCoord x, wxCoord y, wxCoord radius);
102 void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
103 void DrawPolygon(
int n, wxPoint points[], wxCoord xoffset = 0,
104 wxCoord yoffset = 0,
float scale = 1.0,
float angle = 0.0);
105 void DrawPolygonTessellated(
int n, wxPoint points[], wxCoord xoffset = 0,
106 wxCoord yoffset = 0);
107 void StrokePolygon(
int n, wxPoint points[], wxCoord xoffset = 0,
108 wxCoord yoffset = 0,
float scale = 1.0);
110 void DrawBitmap(
const wxBitmap &bitmap, wxCoord x, wxCoord y,
bool usemask);
112 void DrawText(
const wxString &text, wxCoord x, wxCoord y,
float angle = 0.0);
113 void GetTextExtent(
const wxString &
string, wxCoord *w, wxCoord *h,
114 wxCoord *descent = NULL, wxCoord *externalLeading = NULL,
115 wxFont *font = NULL);
117 void ResetBoundingBox();
118 void CalcBoundingBox(wxCoord x, wxCoord y);
120 void DestroyClippingRegion() {}
122 wxDC *GetDC()
const {
return dc; }
123 void SetDPIFactor(
double factor){ m_dpi_factor = factor; }
126 GLfloat *s_odc_tess_work_buf;
129#if defined(USE_ANDROID_GLES2) || defined(ocpnUSE_GLSL)
130 int s_odc_tess_vertex_idx;
131 int s_odc_tess_vertex_idx_this;
132 int s_odc_tess_buf_len;
133 GLenum s_odc_tess_mode;
135 vec4 s_odc_tess_color;
137 GLUtesselator *m_tobj;
147 bool ConfigureBrush();
149 void GLDrawBlendData(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
int format,
150 const unsigned char *data);
152 void drawrrhelperGLES2(wxCoord x0, wxCoord y0, wxCoord r,
int quadrant,
156 wxGLCanvas *m_glcanvas;
161 wxColour m_textforegroundcolour;
166#if wxUSE_GRAPHICS_CONTEXT
167 wxGraphicsContext *pgc;
172 unsigned int workBufIndex;