summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update component version for releaseHEADrelease/0.1.8masterVincent Sanders2023-12-271-1/+1
|
* examples/svgtiny_display_x11.c: include the system copy of svgtiny.hMichael Orlitzky2023-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | The header of this file includes instructions for how to build it: Compile using: gcc -g -W -Wall -o svgtiny_display_x11 svgtiny_display_x11.c \ `pkg-config --cflags --libs libsvgtiny cairo` -lX11 That pkg-config command will generate the flags to link against the installed copy of libsvgtiny. The line, #include "svgtiny.h" on the other hand, attempts to use a local header. This commit changes that line to, #include <svgtiny.h> which will use the corresponding system header from whatever include directory pkg-config hands us for libsvgtiny.
* examples/svgtiny_display_x11.c: add missing stdlib.h includeMichael Orlitzky2023-08-091-0/+1
| | | | | | This file uses malloc(), free(), and exit() -- all of which are defined in stdlib.h. GCC seems unhappy about the situation, so we now include it. This allows the file to be compiled once again.
* examples/svgtiny_display_x11.c: update LIBXML -> LIBDOMMichael Orlitzky2023-08-091-2/+2
| | | | | | The svgtiny_LIBXML_ERROR constant was changed to throughout the codebase to svgtiny_LIBDOM_ERROR a long time ago, in 9275ab308, but this example was missed, probably because it isn't built by default.
* README: update LIBXML -> LIBDOMMichael Orlitzky2023-08-091-1/+1
| | | | | | This constant svgtiny_LIBXML_ERROR was changed throughout the codebase to svgtiny_LIBDOM_ERROR a long time ago, in 9275ab308, but the README was missed because nobody reads the documentation :)
* implement svg path arc correctlyVincent Sanders2020-10-032-18/+512
|
* Update component version for releaserelease/0.1.7Vincent Sanders2018-08-281-1/+1
|
* Fix various bugs which caused ASAN and UBSAN to be upsetDaniel Silverstone2018-07-292-3/+9
|
* Ensure we report failures betterDaniel Silverstone2018-07-291-1/+4
|
* Ignore the autogenerated colours fileDaniel Silverstone2018-07-291-0/+1
|
* Update component version for 0.1.6 releaserelease/0.1.6Vincent Sanders2017-10-131-1/+1
|
* Fix parsing of multiple vertical lineto commandsMichael Drake2017-07-241-1/+1
| | | | Thanks to Nils for spotting this.
* Buildsystem: OpenBSD `sed` doesn't handle -i option.Michael Drake2017-04-201-2/+3
|
* Buildsystem: Squash "no previous declaration for 'svgtiny_color_lookup'"Michael Drake2017-04-201-0/+2
|
* Build: Include gperf-generated code directly.Michael Drake2017-04-204-19/+10
| | | | | | | Previously we built the generated code separatly and then linked to it. However, this caused problems with certain compilers and gperf versions. This change includes the generated code directly in svgtiny.c instead, which is the only place its used.
* Prepare for release of 0.1.5release/0.1.5Daniel Silverstone2016-11-191-1/+1
|
* Test data: Move file to correct place.Michael Drake2016-10-261-0/+0
|
* Merge branch 'tlsa/fix-gradients'Michael Drake2016-10-264-120/+165
|\
| * Test data: Add SVG with missing stroke gradient definition.tlsa/fix-gradientsMichael Drake2016-10-261-0/+10
| |
| * Parse: Ensure consumed characters count is initiliased.Michael Drake2016-10-261-0/+1
| |
| * Parse: Make the parse state have two sets of gradient details.Michael Drake2016-10-263-113/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One for fills and another for strokes. This stops an SVG such as <svg viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg"> <defs> <linearGradient id="foo"> <stop stop-color="#69f" offset="0"/> <stop stop-color="#468" offset="1"/> </linearGradient> </defs> <path fill="url(#foo)" stroke='url(#bar)' d='M10 10 H 90 V 90 H 10 Z' /> </svg> from getting its fill gradient details trampled when we reset the gradient for the the missing bar gadient definition. Note, we only handle linearGradient on the fill anyway.
| * Parse: Avoid strndup with unchecked return value.Michael Drake2016-10-261-3/+3
| |
| * Parse: Remove explicit init of gradient state; gets memset anyway.Michael Drake2016-10-261-5/+0
|/
* add polyline test case with floating point colour percentagesVincent Sanders2016-09-111-0/+9
|
* SVG dictionary for use with AFL toolVincent Sanders2016-09-111-0/+170
|
* Add test set derived from AFLVincent Sanders2016-09-112613-0/+170475
| | | | | | | Generated with AFL using custom dictionary then minimised with cmin and tmin tools to be the smallest test set possible The run used two thousand processor hours on a 24way xeon 2.3GHz system
* prevent division by zero for gradient with no points and add testVincent Sanders2016-08-312-2/+53
|
* improve test suite runnerVincent Sanders2016-08-311-4/+61
|
* add crash test generated with AFLVincent Sanders2016-08-271-0/+22
|
* cope with lack of root svg elementVincent Sanders2016-08-241-0/+6
|
* add file output to test decoderVincent Sanders2016-08-233-150/+192
|
* Update component version for releaserelease/0.1.4Vincent Sanders2016-01-031-2/+2
|
* Fix build with certain C libraries.Michael Drake2015-11-011-1/+1
|
* enable decode tests for svg filesVincent Sanders2015-09-0210-2/+26
| | | | These svg files have caused the library to crash and to render poorly.
* Fix reallocation of path buffer length to cope with differng path lengthsVincent Sanders2015-08-231-21/+41
|
* Update CFLAGS to avoid deprication warning for glibc 2.21 and later.Vincent Sanders2015-03-221-2/+9
|
* Fix paths for Haiku.Adrien Destugues2015-03-222-2/+2
|
* Update the component version for releaserelease/0.1.3Vincent Sanders2015-03-081-1/+1
|
* Ensure path generation does not overrun allocated storage.Vincent Sanders2015-01-151-6/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes bug #2251 which was caused by the svg: <svg width="11" height="11" id="support-entry-icon" y="3389"><g><g><path fill-rule="evenodd" clip-rule="evenodd" fill="#D6D6D6" d="M0,0v11h11V0H0z M10,10H1V1h9V10z M9,3H2v1h7V3z M9,5H2v1h7V5z M9,7H2v1h7V7z"/></g></g></svg> The svg was causing more path elements to be generated in the internal representation than space was allocated for and overrunning heap blocks. The path element parsing was using a fixed size allocation for the path elements and never bounds checked. Further it did not cope with zero length paths (which the spec says are permitted). It was also grossly overallocating for the common case. This changes the path element array to be bounds checked and then extended if required, the initial allocation is generally sufficient and in testing very few resizes occurred. The reallocation strategy grows the element storage by 2.5 each time this means even in the degenerate case very few reallocations are required. In testing no more than a single reallocation has been observed. The final path element array will always be reallocted to the minimum required size. This reduces overall memory usage which is useful with complex scenes.
* Update README to cover dependancies and core buildsystemVincent Sanders2014-12-073-47/+91
| | | | | Fix various issues with the test target and update the documentation to be more correct.
* Fix up for new buildsystemJohn-Mark Bell2014-11-161-2/+2
|
* fix parsing of whitespace in transform operatorsVincent Sanders2014-10-231-18/+18
| | | | | | | | The SVG spec for the transform attribute allows whitespace in places that were causing the %n specifier in the ssanf to return 0 as the match failed before it completed the parse. http://www.w3.org/TR/SVG/coords.html#TransformAttribute
* Fix relative move commands following a path close.Paul Mecklenburg2014-10-101-0/+7
| | | | | | | | | Both 'M' and 'm' are moves and therefore start a new (sub)path. In either case the location should be cached so that a later 'close path' (z or Z) knows the location it is returning to. The location is not written to 'p', since it is assumed that the client code remembers. If the next move is relative (lowercase), then it's important that last_x, last_y were correctly updated while processing Z/z.
* Add test case image for broken behaviour of relative move.Michael Drake2014-10-101-0/+8
|
* Update component version for releaserelease/0.1.2Vincent Sanders2014-08-261-1/+1
|
* Hopefully silence warnings about inlines and non inlines calling oneDaniel Silverstone2014-04-261-0/+9
| | | | another.
* Update component version for releaserelease/0.1.1Vincent Sanders2014-04-181-1/+1
|
* Add support for multilibJohn-Mark Bell2014-01-132-3/+3
|
* Fix to use list_size accessor.Michael Drake2013-08-231-1/+1
|
* Minor tidyup.Michael Drake2013-08-231-10/+7
|