After all these tests, I conclude that GDI+ is not convenient for text drawing and is not useful for drawing horizontal and vertical lines.
New proposal for fellow developers to evaluate: use GDI+ only when it allows antialiasing beyond what GDI can do.
The modified code is in another branch I called "GDI+soft" git clone https://github.com/ManoloFLTK/fltk.git git checkout GDI+soft autoconf -f ./configure <----- not necessary to activate any special option here
make
CMake-based build works also. Default settings are enough.
GDI+ is initialized when the app starts and is shutdown when it stops. GDI+ is called at each call of fl_line_style() to change accordingly the GDI+ pen. GDI+ is called by these drawing functions: fl_arc(int, int, …) fl_pie() fl_line() fl_loop() fl_polygon() fl_circle() and all functions to draw "complex shapes". All the rest (text, horizontal and vertical lines, rectangles, boxes, images) is unchanged: GDI is used.
App test/unittests evidences the benefit ot antialiased circles, ellipses and oblique lines, and test/device that with clock hands and complex shapes. The plastic and gleam schemes are completely GDI-based, so there's no slowdown when they are used.
Configure.ac checks for presence of GDI+ and doesn't compile GDI+-using code in its absence. Thus, the FLTK library remains compatible with Windows95.
--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/b72c6e23-1c7e-4628-9f8f-28b5b6360421n%40googlegroups.com.
[ Direct Link to Message ] |