diff options
| -rw-r--r-- | ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx | 2 | ||||
| -rw-r--r-- | src/drivers/Android/Fl_Android_Graphics_Driver.H | 15 | ||||
| -rw-r--r-- | src/drivers/Android/Fl_Android_Graphics_Driver.cxx | 53 |
3 files changed, 61 insertions, 9 deletions
diff --git a/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx b/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx index c8abb1512..913bafd20 100644 --- a/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx +++ b/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx @@ -165,7 +165,7 @@ void bt(const char *name, Fl_Boxtype type, int square=0) { } int main(int argc, char ** argv) { - window = new Fl_Double_Window(4*W,ROWS*H); + window = new Fl_Double_Window(-W, 0, 4*W,ROWS*H); window->box(FL_FLAT_BOX); #if 0 // this code uses the command line arguments to set arbitrary color schemes Fl::args(argc, argv); diff --git a/src/drivers/Android/Fl_Android_Graphics_Driver.H b/src/drivers/Android/Fl_Android_Graphics_Driver.H index 4cb20bf11..2458d6569 100644 --- a/src/drivers/Android/Fl_Android_Graphics_Driver.H +++ b/src/drivers/Android/Fl_Android_Graphics_Driver.H @@ -79,6 +79,13 @@ public: virtual void yxline_unscaled(float x, float y, float y1) override; void yxline_unclipped(float x, float y, float y1); virtual void line_unscaled(float x, float y, float x1, float y1) override; + virtual void line_unscaled(float x, float y, float x1, float y1, float x2, float y2) override; + virtual void loop_unscaled(float x0, float y0, float x1, float y1, float x2, float y2) override; + virtual void loop_unscaled(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3) override; + virtual void polygon_unscaled(float x0, float y0, float x1, float y1, float x2, float y2) override; + 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; // --- implementation is in src/fl_vertex.cxx which includes src/cfg_gfx/xxx_rect.cxx virtual void begin_points() override; @@ -95,9 +102,6 @@ public: virtual void gap() override; virtual void transformed_vertex0(float x, float y) 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; - // --- clipping virtual void push_clip(int x, int y, int w, int h) override; virtual int clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H) override; @@ -146,11 +150,6 @@ public: protected: void fixloop(); // --- implementation is in src/fl_rect.cxx which includes src/cfg_gfx/gdi_rect.cxx - virtual void line_unscaled(float x, float y, float x1, float y1, float x2, float y2); - virtual void loop_unscaled(float x0, float y0, float x1, float y1, float x2, float y2); - virtual void loop_unscaled(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3); - virtual void polygon_unscaled(float x0, float y0, float x1, float y1, float x2, float y2); - virtual void polygon_unscaled(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3); 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 diff --git a/src/drivers/Android/Fl_Android_Graphics_Driver.cxx b/src/drivers/Android/Fl_Android_Graphics_Driver.cxx index 9d8242958..46d638767 100644 --- a/src/drivers/Android/Fl_Android_Graphics_Driver.cxx +++ b/src/drivers/Android/Fl_Android_Graphics_Driver.cxx @@ -274,6 +274,59 @@ void Fl_Android_Graphics_Driver::line_unscaled(float x, float y, float x1, float } } + +void Fl_Android_Graphics_Driver::line_unscaled(float x, float y, float x1, float y1, float x2, float y2) +{ + begin_line(); + transformed_vertex0(x, y); + transformed_vertex0(x1, y1); + transformed_vertex0(x2, y2); + end_line(); +} + + +void Fl_Android_Graphics_Driver::loop_unscaled(float x0, float y0, float x1, float y1, float x2, float y2) +{ + begin_loop(); + transformed_vertex0(x0, y0); + transformed_vertex0(x1, y1); + transformed_vertex0(x2, y2); + end_loop(); +} + + +void Fl_Android_Graphics_Driver::loop_unscaled(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3) +{ + begin_loop(); + transformed_vertex0(x0, y0); + transformed_vertex0(x1, y1); + transformed_vertex0(x2, y2); + transformed_vertex0(x3, y3); + end_loop(); +} + + +void Fl_Android_Graphics_Driver::polygon_unscaled(float x0, float y0, float x1, float y1, float x2, float y2) +{ + begin_polygon(); + transformed_vertex0(x0, y0); + transformed_vertex0(x1, y1); + transformed_vertex0(x2, y2); + end_polygon(); +} + + +void Fl_Android_Graphics_Driver::polygon_unscaled(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3) +{ + begin_polygon(); + transformed_vertex0(x0, y0); + transformed_vertex0(x1, y1); + transformed_vertex0(x2, y2); + transformed_vertex0(x3, y3); + end_polygon(); +} + + /** * Reset the vertex counter to zero. */ |
