--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/b1228649-ecc4-4ef0-bbd7-e47932214b86n%40googlegroups.com.
Despite the same less-than-steller performance, the X11 version should also be changed to Cairo, unless somebody has a better idea about how to make antialiased lines. Cairo version needs some messing with to produce "hinting" which is basically to move lines and shapes so they don't produce unwanted blur, Cairo by itself is very insistent on exact reproduction of the filtered image.
On Mon, May 17, 2021 at 12:54 AM Manolo <manol...@gmail.com> wrote:
Please vote about having the Windows FLTK platform draw oblique lines,curves and all complex shapes in antialiased form.
As Ian has reported, drawing with GDI+ is slightly slower than with GDI.
GDI+ is supported from Windows XP and up. When GDI+ isn't available, the modifiedcode falls back to GDI. Thus FLTK remains compatible with Windows 95.
Both configure-based and CMake-based builds are taken care of.
My vote is +1
TIA - Manolo--
My vote is +1 for an OPT IN option in cmake/configure. And -1 for a default option. Both for GDI+ and Cairo. In both cases the performance of my program would suffer otherwise.
My vote is +1 for an OPT IN option in cmake/configure. And -1 for a default option. Both for GDI+ and Cairo. In both cases the performance of my program would suffer otherwise.
I’m greatly in favour of anti-aliased rendering, and I do not want to be negative about the great work Manolo has done in getting it to run inside fltk, but I’m not at all convinced by GDI+.
As Manolo said, I have hit issues with it being *slow*.
Now, others tried testing when I reported slowness, and didn’t see the effect I was seeing, and Manolo reports it is “slightly slower” than GDI for him. (And others report no noticeable slowness under Vbox, for example...)
But for me *on some machines* it can be very slow - whereas the same code on another machine seems fine.
I assume it is some display-driver related issue though I have no clue what.
For me, one of the “slow” machines is my good HP laptop, which is pretty decent spec., Nvidia GPU etc. and generally swift (by laptop standards) but chokes sometimes on the GDI+ tests I did.
If all windows were GL windows, could we just render “everything” via GL and get h/w accelerated rendering pretty much on all hosts that way?
I tried it with cmake build and tried it on my viewer to really measure
how much of a performance hit I would get.
I had to link my program with GDIplus.lib. The result, however, was
that my viewer crashed on startup with an unknown exception being thrown.
On 5/17/21 12:54 AM, Manolo wrote:
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) areprocessed unchanged by GDI.
[..]
GDI+ is supported from Windows XP and up. When GDI+ isn't available, the modifiedcode falls back to GDI. Thus FLTK remains compatible with Windows 95.
Both configure-based and CMake-based builds are taken care of.
My vote is +1
I think Bill brought up cairo on X11, which may have tainted
some other folk's
votes after that; everyone who voted with cairo in mind should
be aware Manolo's
OP never mentioned cairo.
Regarding cairo, I'd be a big -1 for cairo being on by default
(if cairo is present),
as I have cairo installed just for testing, but I definitely
don't ever want it to be on
"by default", as it's definitely slow and heavy. Some systems
may come with cairo
pre-installed, so a default cairo on would automatically
involve cairo if it were default.
IMHO cairo should never be the default. But if you want, cmake
could print a note
in a highlight color indicating "Cairo found but not enabled.
(If you want antialiasing
in FLTK, you can enable cairo with -xxx)"
-- Gonzalo Garramuño
Regarding GDI, I'm undecided (+0/-0) as I've not tested for slowness
with the latest incarnation, but perhaps that'd be a good default since
GDI is part of the OS (assuming it's not slow). Just be sure there's a flag
to disable it, as some might run into trouble with GDI and want to turn it off.
On 5/18/21 10:02 AM, Manolo wrote:
On Tuesday, May 18, 2021 at 6:24:03 PM UTC+2 er...@seriss.com wrote:
Regarding GDI, I'm undecided (+0/-0) as I've not tested for slowness
with the latest incarnation, but perhaps that'd be a good default since
GDI is part of the OS (assuming it's not slow). Just be sure there's a flag
to disable it, as some might run into trouble with GDI and want to turn it off.
@Greg: I take GDI should be replaced by GDI+ in all of the above paragraph. Is that correct?
Yes, configure --disable-gdiplus would fall back to 100% GDI drawing, as currently in FLTK.And similarly under CMake.
-- Gonzalo Garramuño
The crash happens after my program changes in its preferences the color of all the palette with Fl::set_color( id, Fl_Color ) to a dark scheme.
On Tuesday, May 18, 2021 at 6:55:29 PM UTC+2 ggar...@gmail.com wrote:
The crash happens after my program changes in its preferences the color of all the palette with Fl::set_color( id, Fl_Color ) to a dark scheme.
It's difficult to fix for sure without more detail, but, please, pull from the git repository and try again. It's hopefully fixed.
Please vote about having the Windows FLTK platform draw oblique lines,curves and all complex shapes in antialiased form. The result of this change isvisible in the attached snapshot where left elements show the current productsand 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
So *if* we have this, I’d prefer it were optional, and if it were optional then possibly Direct2D rather than GDI+.
Manolo, could you imagine to do the same (line drawing only) work with Direct2D as Ian suggested? I'm asking this because you're the one who knows all that driver stuff best, and now that you have done it with GDI+, can you estimate the effort necessary to do this?
Please don't understand me wrong, it's just a thought. Since MS seems to have given up on GDI+, wouldn't it be a step backwards if we introduced GDI+ now? Maybe MS will drop support in a future version or ... (who knows?).
Well, while I'm writing this, another question came up: IIRC the gleam scheme draws the color gradients as adjacent horizontal lines. Wouldn't this be affected by the performance penalty as well?
On Tuesday, May 18, 2021 at 2:50:45 AM UTC+2 ggar...@gmail.com wrote:
I tried it with cmake build and tried it on my viewer to really measure
how much of a performance hit I would get.
Thanks. That would be very helpful.
Ok. I was able to test it with my viewer. I did not notice any slowdowns except for the vectorscope which draws a lot of points (lines) in all directions. In that case the slowdown was from 5 iterations of the vectorscope down to only 3 iterations during playback. Also, I did not see much improvement in any of my widgets' antialias except for some round buttons.
I wonder... is there any way to draw aliased lines when gdi is
on? That is, temporarily turn it off, so that I draw all my
vectorscope lines fast while the vectorscope markings are drawn
antialiased.
Other than that, in my case, the pros are not enough to have it
turned on by default.
-- Gonzalo Garramuño
Manolo, could you imagine to do the same (line drawing only) work with Direct2D as Ian suggested? I'm asking this because you're the one who knows all that driver stuff best, and now that you have done it with GDI+, can you estimate the effort necessary to do this?
Well, while I'm writing this, another question came up: IIRC the gleam scheme draws the color gradients as adjacent horizontal lines. Wouldn't this be affected by the performance penalty as well?
Nobody knows what "oblique" means. I speak perfect English as a second
language and even I would need to google it. How about "angled"?
Ok. I was able to test it with my viewer. I did not notice any slowdowns except for the vectorscope which draws a lot of points (lines) in all directions. In that case the slowdown was from 5 iterations of the vectorscope down to only 3 iterations during playback. Also, I did not see much improvement in any of my widgets' antialias except for some round buttons.
-- Gonzalo Garramuño
On Wednesday, May 19, 2021 at 1:34:10 PM UTC+2 Albrecht Schlosser wrote:
Manolo, could you imagine to do the same (line drawing only) work with Direct2D as Ian suggested? I'm asking this because you're the one who knows all that driver stuff best, and now that you have done it with GDI+, can you estimate the effort necessary to do this?
No way. I don't know Direct2D and don't want to invest time in this MS-only API.
Please don't understand me wrong, it's just a thought. Since MS seems to have given up on GDI+, wouldn't it be a step backwards if we introduced GDI+ now? Maybe MS will drop support in a future version or ... (who knows?).
MS has been maintaining back compatibility very seriously for many years. The exact opposite of what Apple does.
I tested on both the VM and the bare-metal Win10 system and I can
confirm severe performance issues with the new 'gdi+soft' branch.
Anti-aliased line drawing comes with a price.
However, I believe that there may be many applications that don't suffer
from this performance penalty and thus my vote is
+1 on integration of the new 'gdi+soft' branch
Should 'gdi+' be the default?
I'm not sure, but I suggest to make it the default for 1.4.x development
so it can easily be tested and will be the default in snapshots that
users may test. I agree with Greg (IIRC) that this will be a good way to
get feedback from users.
Depending on the feedback (or no feedback) we may reconsider the default
(GDI or GDI+) before we release FLTK 1.4.
I'd also like to see an option to switch drivers (GDI <-> GDI+)
dynamically so users can maybe switch back to pure old GDI in
time-critical drawing paths (somebody mentioned this, IIRC). This option
might already exist (internally) but I don't know if there's an API to
be easily applied. If so, it should be documented.