diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2018-03-12 12:57:28 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2018-03-12 12:57:28 +0000 |
| commit | 1b52ead802e1f3b24c33cadacb8d67dbfb209253 (patch) | |
| tree | 9db02c4ee0d18a9c937f28bb9fa80fc6584cbff2 /ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx | |
| parent | 371cfd1476de37c4741b6455af77bfc9a07cd9c1 (diff) | |
Android: Reinstated working simple cliping functionality based on an
improved Fl_Rect_Region class instead of Fl_Rect. Commented out
complex clipping.
Android lib and apps now use C++11 because they can (and I like it).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12741 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx')
| -rw-r--r-- | ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx b/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx index 207a78817..02b563517 100644 --- a/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx +++ b/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx @@ -22,7 +22,7 @@ #include <FL/fl_draw.H> -Fl_Window *win, *win2, *win3; +Fl_Window *win; Fl_Button *btn; @@ -31,30 +31,20 @@ class MyButton : public Fl_Button public: MyButton(int x, int y, int w, int h, const char *l) : Fl_Button(x, y, w, h, l) { } void draw() { - fl_push_clip(x(), y(), w()*2/3, h()*2/3); + //fl_push_clip(x(), y(), w()*2/3, h()*2/3); Fl_Button::draw(); - fl_pop_clip(); + //fl_pop_clip(); } }; int main(int argc, char **argv) { - win2 = new Fl_Window(100, 50, 150, 200, "on bottom"); - win2->color(FL_BLUE); - win2->end(); - win2->show(); - win = new Fl_Window(50, 150, 500, 400, "Hallo"); btn = new MyButton((win->w()-280)/2, 200, 280, 35, "Hello, Android!"); btn->color(FL_LIGHT2); win->show(argc, argv); -/* - win3 = new Fl_Window(300, 50, 150, 200, "on top"); - win3->color(FL_RED); - win3->end(); - win3->show(); -*/ + Fl::run(); return 0; |
