diff options
Diffstat (limited to 'src/drivers/Android')
| -rw-r--r-- | src/drivers/Android/Fl_Android_Graphics_Driver.H | 2 | ||||
| -rw-r--r-- | src/drivers/Android/Fl_Android_Graphics_Driver.cxx | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src/drivers/Android/Fl_Android_Graphics_Driver.H b/src/drivers/Android/Fl_Android_Graphics_Driver.H index 2458d6569..eebd05db1 100644 --- a/src/drivers/Android/Fl_Android_Graphics_Driver.H +++ b/src/drivers/Android/Fl_Android_Graphics_Driver.H @@ -86,6 +86,7 @@ public: virtual void polygon_unscaled(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3) override; virtual void arc_unscaled(float x, float y, float w, float h, double a1, double a2) override; virtual void pie_unscaled(float x, float y, float w, float h, double a1, double a2) override; + virtual void ellipse_unscaled(double xt, double yt, double rx, double ry) override; // --- implementation is in src/fl_vertex.cxx which includes src/cfg_gfx/xxx_rect.cxx virtual void begin_points() override; @@ -151,7 +152,6 @@ protected: void fixloop(); // --- implementation is in src/fl_rect.cxx which includes src/cfg_gfx/gdi_rect.cxx virtual Fl_Region scale_clip(float f); - virtual void ellipse_unscaled(double xt, double yt, double rx, double ry); // --- implementation is in src/fl_arc.cxx which includes src/cfg_gfx/xxx_arc.cxx if needed // using void Fl_Graphics_Driver::arc(double x, double y, double r, double start, double end); // --- implementation is in src/fl_arci.cxx which includes src/cfg_gfx/xxx_arci.cxx diff --git a/src/drivers/Android/Fl_Android_Graphics_Driver.cxx b/src/drivers/Android/Fl_Android_Graphics_Driver.cxx index 46d638767..908b7f5bd 100644 --- a/src/drivers/Android/Fl_Android_Graphics_Driver.cxx +++ b/src/drivers/Android/Fl_Android_Graphics_Driver.cxx @@ -887,6 +887,23 @@ void Fl_Android_Graphics_Driver::pie_unscaled(float xi, float yi, float w, float } } +/** + * shortcut the closed circles so they use XDrawArc: + * FIXME: these do not draw rotated ellipses correctly! + * */ +void Fl_Android_Graphics_Driver::ellipse_unscaled(double xt, double yt, double rx, double ry) { + int llx = (int)rint(xt-rx); + int w = (int)rint(xt+rx)-llx; + int lly = (int)rint(yt-ry); + int h = (int)rint(yt+ry)-lly; + + if (what==POLYGON) + fl_pie(llx, lly, w, h, 0.0, 360.0); + else + fl_arc(llx, lly, w, h, 0.0, 360.0); +} + + #if 0 // Code used to switch output to an off-screen window. See macros in |
