48 void DrawGLThickLine(
float x1,
float y1,
float x2,
float y2, wxPen pen,
61 ocpnDC(wxGLCanvas &canvas);
70 void SetBackground(
const wxBrush &brush);
71 void SetPen(
const wxPen &pen);
72 void SetBrush(
const wxBrush &brush);
73 void SetTextForeground(
const wxColour &colour);
74 void SetFont(
const wxFont &font);
75 static void SetGLAttrs(
bool highQuality);
76 void SetGLStipple()
const;
78 const wxPen &GetPen()
const;
79 const wxBrush &GetBrush()
const;
80 const wxFont &GetFont()
const;
82 void GetSize(wxCoord *width, wxCoord *height)
const;
84 void DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2,
85 bool b_hiqual =
true);
86 void DrawLines(
int n, wxPoint points[], wxCoord xoffset = 0,
87 wxCoord yoffset = 0,
bool b_hiqual =
true);
88 void DrawGLThickLine(
float x1,
float y1,
float x2,
float y2, wxPen pen,
90 void DrawGLThickLines(
int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset,
91 wxPen pen,
bool b_hiqual);
93 void StrokeLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
94 void StrokeLine(wxPoint a, wxPoint b) { StrokeLine(a.x, a.y, b.x, b.y); }
95 void StrokeLines(
int n, wxPoint *points);
98 void DrawRectangle(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
99 void DrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
101 void DrawCircle(wxCoord x, wxCoord y, wxCoord radius);
102 void DrawCircle(
const wxPoint &pt, wxCoord radius) {
103 DrawCircle(pt.x, pt.y, radius);
105 void StrokeCircle(wxCoord x, wxCoord y, wxCoord radius);
107 void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
108 void DrawPolygon(
int n, wxPoint points[], wxCoord xoffset = 0,
109 wxCoord yoffset = 0,
float scale = 1.0,
float angle = 0.0);
110 void DrawPolygonTessellated(
int n, wxPoint points[], wxCoord xoffset = 0,
111 wxCoord yoffset = 0);
112 void StrokePolygon(
int n, wxPoint points[], wxCoord xoffset = 0,
113 wxCoord yoffset = 0,
float scale = 1.0);
115 void DrawBitmap(
const wxBitmap &bitmap, wxCoord x, wxCoord y,
bool usemask);
117 void DrawText(
const wxString &text, wxCoord x, wxCoord y,
float angle = 0.0);
118 void GetTextExtent(
const wxString &
string, wxCoord *w, wxCoord *h,
119 wxCoord *descent = NULL, wxCoord *externalLeading = NULL,
120 wxFont *font = NULL);
122 void ResetBoundingBox();
123 void CalcBoundingBox(wxCoord x, wxCoord y);
125 void DestroyClippingRegion() {}
127 wxDC *GetDC()
const {
return dc; }
128 void SetDPIFactor(
double factor){ m_dpi_factor = factor; }
132 GLfloat *s_odc_tess_work_buf;
135 #if defined(USE_ANDROID_GLES2) || defined(ocpnUSE_GLSL)
136 int s_odc_tess_vertex_idx;
137 int s_odc_tess_vertex_idx_this;
138 int s_odc_tess_buf_len;
139 GLenum s_odc_tess_mode;
141 vec4 s_odc_tess_color;
143 GLUtesselator *m_tobj;
153 bool ConfigureBrush();
155 void GLDrawBlendData(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
int format,
156 const unsigned char *data);
158 void drawrrhelperGLES2(wxCoord x0, wxCoord y0, wxCoord r,
int quadrant,
164 wxGLCanvas *m_glcanvas;
169 wxColour m_textforegroundcolour;
174 #if wxUSE_GRAPHICS_CONTEXT
175 wxGraphicsContext *pgc;
180 unsigned int workBufIndex;