summaryrefslogtreecommitdiff
path: root/src/Fl_SVG_Image.cxx
AgeCommit message (Collapse)Author
2024-03-18Move nanosvg to a separate file, don't use 'roundf()' (#937)Albrecht Schlosser
Replacement of roundf() with nsvg__roundf() fixes one aspect of issue #937. Having the nanosvg implementation in its own module was planned anyway.
2022-12-30Fix uninitialised struct in SVG readerMatthias Melcher
2022-12-27Fix doxygen warnings (typos in argument names)Albrecht Schlosser
2022-12-19Fix compiler warning (unused variable)Albrecht Schlosser
2022-12-17Update SVG binary constructor documentationMatthias Melcher
2022-12-17Adding length checks for in-memory image data (see #542) (#592)Matthias Melcher
SVG is now decompressed in memory Bitmap invalid array length handling to return an error RGB Image data reader to return error if image data is too short FLUID: Add size argument to bitmap and JPEG data
2022-11-24Fix two new Visual Studio compiler warningsAlbrecht Schlosser
2022-11-24Remove two "warning: pointer xxx used after void* realloc()" messagesManoloFLTK
2022-11-24Fix two Visual Studio compiler warningsAlbrecht Schlosser
+ fix trailing whitespace (fluid)
2022-11-16Fix whitespace errors and dependenciesAlbrecht Schlosser
(no code changes)
2022-11-15Add support of .svgz image files to fluidManoloFLTK
The prototype of the public Fl_SVG_Image constructor is expanded to allow construction from in-memory, gzip'ed binary data.
2022-04-13Make Fl_Image::copy() 'const', including all derived classesAlbrecht Schlosser
Copying an image does not (and must not) change the original object, hence copy() should always be 'const'. This is *necessary* if the given Fl_Image object is 'const'.
2022-03-19Add missing initialization parts of Fl_SVG_ImageAlbrecht Schlosser
2022-01-16Rename FL/fl_string.h to FL/fl_string_functions.hAlbrecht Schlosser
This is part 1 of the final fix for a previous name clash on case insensitive file systems (fl_string.h vs. Fl_String.H).
2021-05-07Suppress Visual Studio warnings in nanosvg codeAlbrecht Schlosser
- disable warning C4244 (conversion / data loss) - restore #pragma warning after nanosvg includes
2021-02-21Remove VS compilation warnings about implicit type conversions.ManoloFLTK
2020-11-19Rename private member function with trailing underscore.ManoloFLTK
2020-11-12Fix for issue #155 - continuedManoloFLTK
The issue lies in details how floating point scaled coordinates are converted to integer values and its impact on the drawing of large SVG images. This commit fixes the X11 platform. The macOS platform is immune because drawing uses floating point coordinates. The Windows platform still needs fixing.
2020-08-01Implement + deploy fl_strdup()Greg Ercolano
2020-07-30Fix use of an SVG image in Fl_Tiled_Image when display is rescaled.ManoloFLTK
2020-07-06Remove $Id$ tags, update URL's, and moreAlbrecht Schlosser
- remove obsolete svn '$Id$' tags from all source files - update .fl files and generated files accordingly - replace 'http://www.fltk.org' URL's with 'https://...' - replace bug report URL 'str.php' with 'bugs.php' - remove trailing whitespace - fix other whitespace errors flagged by Git - add and/or fix missing or wrong standard headers - convert tabs to spaces in all source files The only relevant code changes are in the fluid/ folder where some .fl files and other source files were used to generate the '$Id' headers and footers.
2020-06-27Add classes Fl_SVG_File_Surface and Fl_EPS_File_Surface to draw to SVG and EPS.ManoloFLTK
Test programs device and pixmap_browser use these new classes. Class Fl_SVG_File_Surface can be optionally made non functional using the --disable-svg configure option or turning off OPTION_USE_SVG in CMake. Class Fl_EPS_File_Surface can be optionally made non functional using the --disable-print configure option or turning off OPTION_PRINT_SUPPORT in CMake.
2020-06-16More detailed documentation of Fl_SVG_Image::normalize().ManoloFLTK
2020-06-15Allow using an Fl_SVG_Image object as window icon.ManoloFLTK
Fix for issue #90: Setting an svg image as a window icon causes a segfault.
2020-06-03Make doc of member function Fl_SVG_Image::resize() more detailed.ManoloFLTK
2019-10-30Restore CMake support of Darwin + XQuartz + fink test platformManoloFLTK
2019-03-26Improve Doxygen doc of the Fl_SVG_Image constructorManoloFLTK
2018-06-26Move Fl_Screen_Driver.H from FL/ to src/Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12975 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-06-18Better handling of very small input file when reading SVG image file.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12945 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-12SVG support: improve printed SVG images by increasing the resolution when ↵Manolo Gouy
printing. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12830 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-26Fix for STR#3457: Fl_SVG_Image handling of invalid width/heightManolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12806 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-19New member function Fl_Image::scale(int width, int height) to set the FLTK ↵Manolo Gouy
size of an image. Each image has now two sizes implemented as follows: - the pixel size is stored in private members pixel_w_ and pixel_h_ with public accessors pixel_w() and pixel_h() - the FLTK size is stored in private members w_ and h_ and read by w() and h() - when the image is constructed, the two sizes have the same value - the protected w(int) and h(int) member functions set both FLTK and pixel sizes. - the public scale(int, int) member function is essentially nothing but set the FLTK size and don't change the pixel size. - when the image is drawn, its FLTK size determines how big it is drawn, its pixel size determines how much data are available to draw it. FLTK 1.3.4 with FL_ABI_VERSION=10304 contained an equivalent member function but only for the Fl_Shared_Image class. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12776 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-11Documentation: homogenize uses of "FLTK units" and "drawing units".Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12734 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-04Reorganize nanosvg bundled library.Albrecht Schlosser
Rename altsvgrast.h to its original name nanosvg.h and use a new GitHub fork of nanosvg to maintain FLTK specific patches. https://github.com/fltk/nanosvg The diff files (altsvgrast.diff and nanosvg.diff) are no longer necessary and have been removed. For more information see README.bundled-libs.txt. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12646 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-18STR#3444: Add MacOS support for application rescaling (not quite complete)Manolo Gouy
With this, most MacOS FLTK app can be scaled with command/+/-/0/ keystrokes. A scaling problem remains, visible in test/cube, where the "Test" string is not positioned correctly. GLUT apps can also be scaled (across platforms). SVG images are re-rasterized after app scaling for optimal drawing. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12594 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-13SVG images: fix image printing under MacOS when not used as a scaled ↵Manolo Gouy
Fl_Shared_Image git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12589 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-05Fix compiler warning [-Wunused-result].Albrecht Schlosser
Full warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] Note: added "FIXME ...": current code ignores file read error. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12546 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-03Doxygen doc: minor rewording for the Fl_SVG_Image class.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12539 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-31Fix for STR#3421: Fl_SVG_Image crashes if passed an svg file that is a ↵Manolo Gouy
static const char* string git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12536 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-21Fl_SVG_Image: remove use of gzdirect() that is absent in some old versions ↵Manolo Gouy
of zlib git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12519 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-15Rename fl_open_ext() parameter 'translation' to 'binary'.Albrecht Schlosser
The default (0) is 'text' mode, non-zero is 'binary' mode on platforms that distinguish text and binary mode. Currently Windows is the only supported platform that needs this. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12500 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-13Remove the Fl_SVG_Image::fl_gzopen() member function that is less useful ↵Manolo Gouy
with the new fl_open_ext() function. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12491 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-12Add fl_open_ext() to control whether the file is opened in binary/text mode.Manolo Gouy
This new function allows to write Fl_SVG_Image::fl_gzopen() in a completely platform-independent way. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12489 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-06Fix compiler warning under Visual Studio.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12481 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-06Fl_SVG_Image::fl_gzopen(): write it more platform-independently (still not ↵Manolo Gouy
completely though) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12480 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-05Fix name clash with zlib gzopen on (64-bit) Linux.Albrecht Schlosser
Compilation error message: src/Fl_SVG_Image.cxx:80:21: error: out-of-line definition of 'gzopen64' does not match any declaration in 'Fl_SVG_Image'; did you mean 'gzopen'? void* Fl_SVG_Image::gzopen(const char *fname) { ^~~~~~ gzopen /usr/include/zlib.h:1709:20: note: expanded from macro 'gzopen' # define gzopen gzopen64 ^ The culprit was the macro defined in zlib.h (above). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12479 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-04Fl_SVG_Image constructor: handle case where file cannot be opened.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12478 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-04Fl_SVG_Image class: add support for compressed .svgz image files.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12477 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-04Undo commit at r.12475 that is not adequate.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12476 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-04Fl_SVG_Image class: add support for compressed .svgz image files.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12475 ea41ed52-d2ee-0310-a9c1-e6b18d33e121