74 void SetBackground(
const wxBrush &brush);
75 void SetPen(
const wxPen &pen);
76 void SetBrush(
const wxBrush &brush);
77 void SetTextForeground(
const wxColour &colour);
78 void SetFont(
const wxFont &font);
79 static void SetGLAttrs(
bool highQuality);
80 void SetGLStipple()
const;
82 void SetDC(wxDC *dc_in) { dc = dc_in; }
84 const wxPen &GetPen()
const;
85 const wxBrush &GetBrush()
const;
86 const wxFont &GetFont()
const;
88 void GetSize(wxCoord *width, wxCoord *height)
const;
90 void DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2,
91 bool b_hiqual =
true);
92 void DrawLines(
int n, wxPoint points[], wxCoord xoffset = 0,
93 wxCoord yoffset = 0,
bool b_hiqual =
true);
95 void StrokeLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
96 void StrokeLine(wxPoint a, wxPoint b) { StrokeLine(a.x, a.y, b.x, b.y); }
97 void StrokeLines(
int n, wxPoint *points);
100 void DrawRectangle(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
101 void DrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
103 void DrawCircle(wxCoord x, wxCoord y, wxCoord radius);
104 void DrawCircle(
const wxPoint &pt, wxCoord radius) {
105 DrawCircle(pt.x, pt.y, radius);
107 void StrokeCircle(wxCoord x, wxCoord y, wxCoord radius);
109 void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
110 void DrawPolygon(
int n, wxPoint points[], wxCoord xoffset = 0,
111 wxCoord yoffset = 0,
float scale = 1.0,
float angle = 0.0);
112 void DrawPolygonTessellated(
int n, wxPoint points[], wxCoord xoffset = 0,
113 wxCoord yoffset = 0);
114 void StrokePolygon(
int n, wxPoint points[], wxCoord xoffset = 0,
115 wxCoord yoffset = 0,
float scale = 1.0);
117 void DrawBitmap(
const wxBitmap &bitmap, wxCoord x, wxCoord y,
bool usemask);
119 void DrawText(
const wxString &text, wxCoord x, wxCoord y);
120 void GetTextExtent(
const wxString &
string, wxCoord *w, wxCoord *h,
121 wxCoord *descent =
nullptr,
122 wxCoord *externalLeading =
nullptr,
123 wxFont *font =
nullptr);
125 void ResetBoundingBox();
126 void CalcBoundingBox(wxCoord x, wxCoord y);
128 void DestroyClippingRegion() {}
130 wxDC *GetDC()
const {
return dc; }
132 void DrawGLLineArray(
int n,
float *vertex_array,
float *color_array,
133 unsigned char *color_array_ub,
bool b_hiqual);
136 GLfloat *s_odc_tess_work_buf;
138 int s_odc_tess_vertex_idx;
139 int s_odc_tess_vertex_idx_this;
140 int s_odc_tess_buf_len;
141 GLenum s_odc_tess_mode;
143 vec4 s_odc_tess_color;
144 GLUtesselator *m_tobj;
147 bool UsesGL() {
return m_buseGL; };
151 bool ConfigureBrush();
153 void GLDrawBlendData(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
int format,
154 const unsigned char *data);
156 void drawrrhelperGLES2(wxCoord x0, wxCoord y0, wxCoord r,
int quadrant,
159 wxGLCanvas *glcanvas;
163 wxColour m_textforegroundcolour;
171#if wxUSE_GRAPHICS_CONTEXT
172 wxGraphicsContext *pgc;
177 unsigned int workBufIndex;