diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2018-03-18 20:04:43 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2018-03-18 20:04:43 +0000 |
| commit | c3573d16f3cfe6ea63229b3edeba197314b5f043 (patch) | |
| tree | 48909154449da3af0ab55ee7c8beac016be2f067 /ide | |
| parent | 6dbe7ca8ed9791deb1b7d77efe153e20212cf3f2 (diff) | |
Android: Implemented font changing ( Fl::set_font(ix, name); )
and other font stuff. Fixed horizontal and vertical line
drawing to include last pixel. Added stippling to focus rect.
Added point drawing (slooow).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12774 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'ide')
| -rw-r--r-- | ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx b/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx index 6be53dd75..882d4189f 100644 --- a/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx +++ b/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx @@ -55,7 +55,7 @@ void hello_cb(void*) int main(int argc, char **argv) { - Fl::scheme("gleam"); +// Fl::scheme("gleam"); win1 = new Fl_Window(20+50, 10, 200, 200, "back"); win1->color(FL_RED); win1->box(FL_DOWN_BOX); @@ -83,11 +83,18 @@ int main(int argc, char **argv) btn->labelfont(FL_TIMES_BOLD_ITALIC); btn->labelsize(30); - btn = new MyButton((win->w()-280)/2, 200+2*40, 280, 35, "Hello, Android!"); + btn = new MyButton((win->w()-280)/2, 200+2*40, 280, 35, "Hello, Font!"); btn->labelfont(FL_COURIER_BOLD_ITALIC); btn->labelsize(30); + btn->callback( + [](Fl_Widget *w, void*) { + Fl::set_font(FL_COURIER_BOLD_ITALIC, "$DancingScript-Regular.ttf"); + w->redraw(); + } + ); btn = new MyButton((win->w()-280)/2, 200+3*40, 280, 35, "Hello, Android!"); + btn->box(FL_BORDER_BOX); btn->labelfont(FL_SCREEN); btn->labelsize(30); |
