summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl_Graphics_Driver.H2
-rw-r--r--FL/fl_draw.H10
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:
/**