diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2021-02-26 18:00:07 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2021-05-31 08:28:06 +0200 |
| commit | b027d2ba57a8e0d6f0862e0a891ddd5dee4b02e2 (patch) | |
| tree | 3ed894bd9a891337804367a09de500ff060be640 /FL | |
| parent | d95dd7acc4af3a4bd521d151ba3576b91d8ace53 (diff) | |
Windows platform: use GDI+ to antialias oblique lines and curves.
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl_Graphics_Driver.H | 2 | ||||
| -rw-r--r-- | FL/fl_draw.H | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/FL/Fl_Graphics_Driver.H b/FL/Fl_Graphics_Driver.H index 67b7a31bd..5d03e2c43 100644 --- a/FL/Fl_Graphics_Driver.H +++ b/FL/Fl_Graphics_Driver.H @@ -374,6 +374,8 @@ public: virtual float override_scale(); virtual void restore_scale(float); virtual PangoFontDescription* pango_font_description(Fl_Font fnum) { return NULL; } + virtual void antialias(int state); + virtual int antialias(); }; #ifndef FL_DOXYGEN diff --git a/FL/fl_draw.H b/FL/fl_draw.H index a84f310f8..9e2e4b3dd 100644 --- a/FL/fl_draw.H +++ b/FL/fl_draw.H @@ -238,6 +238,16 @@ enum { FL_JOIN_BEVEL = 0x3000 ///< join style: line join is tidied }; +/** + Turns ON or OFF antialiased line drawings, if supported by platform. + Currently, only the Windows platform allows to change whether line drawings are antialiased. + Turning it OFF may accelerate heavy drawing operations. + */ +inline void fl_antialias(int state) { fl_graphics_driver->antialias(state); } + +/** Returns whether line drawings are currently antialiased */ +inline int fl_antialias() { return fl_graphics_driver->antialias(); } + // rectangles tweaked to exactly fill the pixel rectangle: /** |
