|
|
ggar...@gmail.com schrieb am Mittwoch, 17. April 2024 um 22:40:40 UTC+2:
Yes. I get the options and I added the image, but the output is an
Fl_RGB_Image() not an Fl_SVG_Image() without having touched any of
the options. I am using a pretty recent branch on Linux:
Scale - Width/Height set to 0,0
Storage - compressed: ticked
- bind to widget: off If your source image is a sag, then FLUID will store it internally as an svg. If the source is compressed, it will be stored compressed. When the image is drawn for the first time, the SVG is interpreted and the RGB data is cached for fast rendering. If your hardware supports that, the cache will be stored at the original resolution, and the image will be scaled when it is rendered, keeping full quality for HiDPI displays.That way, you can scale the output image. The SVG data is only interpreted once unless you explicitly call `uncache()` on your image.
The code generated by FLUID for a "compressed" (I should rename that to "original format") SVG is something like:
#include <FL/Fl_SVG_Image.H>
static const char idata_checker[] = "<?xml version=\"1.0\" encoding=\"UTF-8\" ... "; static Fl_Image *image_checker() { static Fl_Image *image = NULL; if (!image) image = new Fl_SVG_Image("checker.svg", idata_checker); return image; }
BTW... have you thought of adding a version switch to fluid? So
it becomes easier to know if I am using the same version as yours?
It's only really an issue with unreleased code. FLUID releases in 1.3 follow the FLTK release scheme and the About box shows the version. I should try to add the GitHub tag or a running "build" number to prereleases. Open for suggestions.
--
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/ff0232a9-9a23-410f-9f8d-7e7cc68c7883n%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |