diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-12-02 12:04:24 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-12-02 12:04:24 +0100 |
| commit | 9a7f4bdfcebe04ff85e75d9fc999b3731c9941e4 (patch) | |
| tree | 6049caac5096f0fa88073766902f77e933845e4c /src/fl_scroll_area.cxx | |
| parent | 557a5e4fd0e379817a54ea0c16b62d7bd4aa086a (diff) | |
Document that function fl_scroll() doesn't work OK with non integral scaling factors
and explain how to get correct results.
Diffstat (limited to 'src/fl_scroll_area.cxx')
| -rw-r--r-- | src/fl_scroll_area.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/fl_scroll_area.cxx b/src/fl_scroll_area.cxx index 7574fa669..1472c2db8 100644 --- a/src/fl_scroll_area.cxx +++ b/src/fl_scroll_area.cxx @@ -32,6 +32,12 @@ The contents of the rectangular area is first shifted by \p dx and \p dy pixels. The \p draw_area callback is then called for every newly exposed rectangular area. + \warning With FLTK 1.4 and above, it's recommended to put graphical elements in an Fl_Scroll + widget rather than use function fl_scroll() to update those elements. That's because fl_scroll() + may not produce a pixel-accurate result when the GUI scaling factor value is not a multiple of 100%. + Alternatively, use fl_scroll() when the scaling factor value is a multiple of 100% and perform a + full redraw of the graphical elements otherwise. Statement <tt>float s = Fl::screen_scale(win->screen_num());</tt> + gives the current scaling factor value given Fl_Window *win. */ void fl_scroll(int X, int Y, int W, int H, int dx, int dy, void (*draw_area)(void*, int,int,int,int), void* data) |
