73 void SetBackground(
const wxBrush &brush);
74 void SetPen(
const wxPen &pen);
75 void SetBrush(
const wxBrush &brush);
76 void SetTextForeground(
const wxColour &colour);
77 void SetFont(
const wxFont &font);
78 static void SetGLAttrs(
bool highQuality);
79 void SetGLStipple()
const;
81 void SetDC(wxDC *dc_in) { dc = dc_in; }
83 const wxPen &GetPen()
const;
84 const wxBrush &GetBrush()
const;
85 const wxFont &GetFont()
const;
87 void GetSize(wxCoord *width, wxCoord *height)
const;
89 void DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2,
90 bool b_hiqual =
true);
91 void DrawLines(
int n, wxPoint points[], wxCoord xoffset = 0,
92 wxCoord yoffset = 0,
bool b_hiqual =
true);
94 void StrokeLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
95 void StrokeLine(wxPoint a, wxPoint b) { StrokeLine(a.x, a.y, b.x, b.y); }
96 void StrokeLines(
int n, wxPoint *points);
99 void DrawRectangle(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
100 void DrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
102 void DrawCircle(wxCoord x, wxCoord y, wxCoord radius);
103 void DrawCircle(
const wxPoint &pt, wxCoord radius) {
104 DrawCircle(pt.x, pt.y, radius);
106 void StrokeCircle(wxCoord x, wxCoord y, wxCoord radius);
108 void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
109 void DrawPolygon(
int n, wxPoint points[], wxCoord xoffset = 0,
110 wxCoord yoffset = 0,
float scale = 1.0,
float angle = 0.0);
111 void DrawPolygonTessellated(
int n, wxPoint points[], wxCoord xoffset = 0,
112 wxCoord yoffset = 0);
113 void StrokePolygon(
int n, wxPoint points[], wxCoord xoffset = 0,
114 wxCoord yoffset = 0,
float scale = 1.0);
116 void DrawBitmap(
const wxBitmap &bitmap, wxCoord x, wxCoord y,
bool usemask);
118 void DrawText(
const wxString &text, wxCoord x, wxCoord y);
119 void GetTextExtent(
const wxString &
string, wxCoord *w, wxCoord *h,
120 wxCoord *descent =
nullptr,
121 wxCoord *externalLeading =
nullptr,
122 wxFont *font =
nullptr);
124 void ResetBoundingBox();
125 void CalcBoundingBox(wxCoord x, wxCoord y);
127 void DestroyClippingRegion() {}
129 wxDC *GetDC()
const {
return dc; }
131 void DrawGLLineArray(
int n,
float *vertex_array,
float *color_array,
132 unsigned char *color_array_ub,
bool b_hiqual);
135 GLfloat *s_odc_tess_work_buf;
137 int s_odc_tess_vertex_idx;
138 int s_odc_tess_vertex_idx_this;
139 int s_odc_tess_buf_len;
140 GLenum s_odc_tess_mode;
142 vec4 s_odc_tess_color;
143 GLUtesselator *m_tobj;
146 bool UsesGL() {
return m_buseGL; };
150 bool ConfigureBrush();
152 void GLDrawBlendData(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
int format,
153 const unsigned char *data);
155 void drawrrhelperGLES2(wxCoord x0, wxCoord y0, wxCoord r,
int quadrant,
158 wxGLCanvas *glcanvas;
162 wxColour m_textforegroundcolour;
170#if wxUSE_GRAPHICS_CONTEXT
171 wxGraphicsContext *pgc;
176 unsigned int workBufIndex;