|
|
Yes, a resize method is necessary because images are not tied to their widget’s size. What Fltk does automatically is to change the image size when the display’s scaling factor changes. All of this applies to any kind of image, svg or other.
Manolo
Le 18 avr. 2024 à 10:24, Ian MacArthur <imacarthur@gmail.com> a écrit :
On Thursday 18 April 2024 at 09:09:49 UTC+1 Ian MacArthur wrote:
So, looking at the fluid from fltk-1.4 ( from a very recent git pull...) I see that what used to be the "Binary Data" blob is now called "Inline Data" and supports not just a binary chunk (as I expected form the 1.3 fluid) but optionally a text chunk or
a compressed chunk.
Which seems like a useful thing - it means, for example, that I can easily store an SVG file as a text inclusion, from fluid, and it just works.
Which is jolly handy...
As an aside, can the newer FL SVG class mechanism handle scaling and such if a widget resizes?
My current SVG code was written with FL-1.3 and uses nanosvg "directly" but I have to derive widgets with a resize() method to catch the widget size changing; and then re-rasterize on size changes.
But if the fl-1.4 code can do that for me "by magic" that would be useful.
Oh! Maybe that's Gonzalo's question then? Maybe it doesn't "automatically" do the resize and he expects that it would?
That being so, I guess you'd need to do it the "old way" that I do, i.e. have a resize() method to catch the widget changing size and re-rasterize.
Is that what it is?
So, answering my own question, I just threw something together in fluid-1.4 and it happily displays my "compiled in" SVG file and was really easy.
BUT: It doesn't rescale when I resize the widget. So I guess I do still need a resize() method to handle that still?
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/fltkgeneral/065b5d10-0ce6-43ea-ab16-a8ed0dc64519n%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/BAC6AFEA-758F-4C61-8365-318A5B3ECA84%40univ-lyon1.fr.
|
[ Direct Link to Message ] | |
|
| |