diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2018-03-10 13:17:41 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2018-03-10 13:17:41 +0000 |
| commit | 5591ba811aab2fc67255a4bc469e86ecc1fad37d (patch) | |
| tree | 5bc79386816bd7067c65b3e36ffc81979e036386 /src/drivers/Android/Fl_Android_Graphics_Driver.cxx | |
| parent | 2adaadbd944fa453d4cd6500b633e6f0f36ccae0 (diff) | |
Android: adding and fixing to the graphics clipping code
Android has no classic window manager, so FLTK has to
make sure that popup windows, dialog boxes and multi
window interfaces work as expectd.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12729 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/Android/Fl_Android_Graphics_Driver.cxx')
| -rw-r--r-- | src/drivers/Android/Fl_Android_Graphics_Driver.cxx | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/src/drivers/Android/Fl_Android_Graphics_Driver.cxx b/src/drivers/Android/Fl_Android_Graphics_Driver.cxx index 1df52462a..2a0b62cc8 100644 --- a/src/drivers/Android/Fl_Android_Graphics_Driver.cxx +++ b/src/drivers/Android/Fl_Android_Graphics_Driver.cxx @@ -55,10 +55,32 @@ static uint16_t make565(Fl_Color crgba) void Fl_Android_Graphics_Driver::rectf_unscaled(float x, float y, float w, float h) { Fl_Android_Application::log_w("rectf %g %g %g %g", x, y, w, h); - Fl_Clip_Rect r(x, y, w, h); - if (r.intersect_with(&pClipRect)) { + Fl_Rect_Region r(x, y, w, h); + if (r.intersect_with(&pWindowRegion)) { rectf_unclipped(r.x(), r.y(), r.w(), r.h()); } + + /* + * rectf(x, y, w, h) { + * rectf(complex_window_region, drawing_rect(x, y, w, h)) + * } + * + * rectf( complexRgn, drawRgn) { + * // B: start of iterator + * if (intersect(rect_of_complexRgn, drawRgn) { + * if (complexRgn->is_complex() { + * rectf(complexRgn->subregion, drawRect); + * } else { + * rawRect = intersection(rect_of_complexRgn, drawRgn); + * rawDrawRect(rawRect); + * } + * } + * // A: recursion + * if (complexRgn->next) + * rectf(complexRgn->next, drawRgn); + * // B: end of iterator + * } + */ } void Fl_Android_Graphics_Driver::rectf_unclipped(float x, float y, float w, float h) { |
