Vote about using antialiased lines and curves on the Windows platform
Manolo
May 17, 2021
Please vote about having the Windows FLTK platform draw oblique lines,
curves and all complex shapes in antialiased form. The result of this change is
visible in the attached snapshot where left elements show the current products
and right elements show the effect of the proposed changes, both under Windows 10.
The code for that is in branch GDI+soft of https://github.com/ManoloFLTK/fltk
That code uses GDI+ only when it improves the quality of current drawings,
that is, when drawing non horizontal nor vertical lines or when drawing curves. All the rest (e.g., text, images, horizontal and vertical lines, rectangles) are
processed unchanged by GDI.
As Ian has reported, drawing with GDI+ is slightly slower than with GDI. This is visible
with the test/doublebuffer program which takes a short but perceivable time
to complete redrawing with its highest number of oblique lines that are drawn with GDI+
in the new code. Notice that line #37 of test/doublebuffer.cxx reads :
// this purposely draws each line 10 times to be slow:
Therefore, It takes an unrealistic number of GDI+ operations for the slowing to be visible.
GDI+ is supported from Windows XP and up. When GDI+ isn't available, the modified
code falls back to GDI. Thus FLTK remains compatible with Windows 95.
Both configure-based and CMake-based builds are taken care of.
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.