]> gitweb.michael.orlitzky.com - libsvgtiny.git/log
libsvgtiny.git
6 months agosrc/svgtiny_css.c: implement node_count_siblings() select handler
Michael Orlitzky [Sat, 14 Oct 2023 14:31:14 +0000 (10:31 -0400)]
src/svgtiny_css.c: implement node_count_siblings() select handler

6 months agosrc/svgtiny_css.c: implement node_is_root() select handler
Michael Orlitzky [Sat, 14 Oct 2023 00:42:35 +0000 (20:42 -0400)]
src/svgtiny_css.c: implement node_is_root() select handler

6 months agosrc/svgtiny_css.c: implement node_has_attribute_substring() select handler
Michael Orlitzky [Sat, 14 Oct 2023 00:22:49 +0000 (20:22 -0400)]
src/svgtiny_css.c: implement node_has_attribute_substring() select handler

6 months agosrc/svgtiny_css.c: implement node_has_attribute_suffix() select handler
Michael Orlitzky [Fri, 13 Oct 2023 23:53:16 +0000 (19:53 -0400)]
src/svgtiny_css.c: implement node_has_attribute_suffix() select handler

6 months agosrc/svgtiny_css.c: implement node_has_attribute_prefix() select handler
Michael Orlitzky [Fri, 13 Oct 2023 23:33:06 +0000 (19:33 -0400)]
src/svgtiny_css.c: implement node_has_attribute_prefix() select handler

6 months agosrc/svgtiny_css.c: implement node_has_attribute_includes() select handler
Michael Orlitzky [Fri, 13 Oct 2023 01:40:34 +0000 (21:40 -0400)]
src/svgtiny_css.c: implement node_has_attribute_includes() select handler

6 months agosrc/svgtiny_css.c: implement node_has_attribute_dashmatch() select handler
Michael Orlitzky [Fri, 13 Oct 2023 01:00:53 +0000 (21:00 -0400)]
src/svgtiny_css.c: implement node_has_attribute_dashmatch() select handler

6 months agosrc/svgtiny_css.c: implement node_has_attribute_equal() select handler
Michael Orlitzky [Thu, 12 Oct 2023 23:42:45 +0000 (19:42 -0400)]
src/svgtiny_css.c: implement node_has_attribute_equal() select handler

6 months agosrc/svgtiny_css.c: implement node_has_attribute() select handler
Michael Orlitzky [Thu, 12 Oct 2023 22:38:45 +0000 (18:38 -0400)]
src/svgtiny_css.c: implement node_has_attribute() select handler

6 months agosrc/svgtiny_css.c: implement node_has_id() select handler
Michael Orlitzky [Thu, 12 Oct 2023 22:28:40 +0000 (18:28 -0400)]
src/svgtiny_css.c: implement node_has_id() select handler

6 months agosrc/svgtiny_css.c: implement node_has_class() select handler
Michael Orlitzky [Thu, 12 Oct 2023 22:18:30 +0000 (18:18 -0400)]
src/svgtiny_css.c: implement node_has_class() select handler

6 months agosrc/svgtiny_css.c: implement node_has_name() select handler
Michael Orlitzky [Thu, 12 Oct 2023 22:10:05 +0000 (18:10 -0400)]
src/svgtiny_css.c: implement node_has_name() select handler

6 months agosrc/svgtiny_strings.h: intern the universal selector string "*"
Michael Orlitzky [Thu, 12 Oct 2023 22:07:44 +0000 (18:07 -0400)]
src/svgtiny_strings.h: intern the universal selector string "*"

This is a prerequisite for implementing the node_has_name() select
handler.

6 months agosrc/svgtiny_css.c: implement sibling_node() select handler
Michael Orlitzky [Thu, 12 Oct 2023 18:43:39 +0000 (14:43 -0400)]
src/svgtiny_css.c: implement sibling_node() select handler

6 months agosrc/svgtiny_css.c: implement parent_node() select handler
Michael Orlitzky [Thu, 12 Oct 2023 18:20:05 +0000 (14:20 -0400)]
src/svgtiny_css.c: implement parent_node() select handler

6 months agosrc/svgtiny_css.c: implement named_generic_sibling_node() select handler
Michael Orlitzky [Thu, 12 Oct 2023 18:07:44 +0000 (14:07 -0400)]
src/svgtiny_css.c: implement named_generic_sibling_node() select handler

6 months agosrc/svgtiny_css.c: implement named_sibling_node() select handler
Michael Orlitzky [Thu, 12 Oct 2023 12:17:45 +0000 (08:17 -0400)]
src/svgtiny_css.c: implement named_sibling_node() select handler

6 months agosrc/svgtiny_css.c: implement named_parent_node() select handler
Michael Orlitzky [Thu, 12 Oct 2023 11:42:02 +0000 (07:42 -0400)]
src/svgtiny_css.c: implement named_parent_node() select handler

6 months agosrc/svgtiny_css.c: implement node_id() select handler
Michael Orlitzky [Thu, 12 Oct 2023 02:25:00 +0000 (22:25 -0400)]
src/svgtiny_css.c: implement node_id() select handler

6 months agosrc/svgtiny_strings.h: intern "id" for libcss
Michael Orlitzky [Thu, 12 Oct 2023 02:17:34 +0000 (22:17 -0400)]
src/svgtiny_strings.h: intern "id" for libcss

As a prerequisite for implementing a libcss node_id() select handler,
we intern the string "id" that it will need access to.

6 months agosrc/svgtiny_css.c: implement node_classes() select handler
Michael Orlitzky [Wed, 11 Oct 2023 23:57:56 +0000 (19:57 -0400)]
src/svgtiny_css.c: implement node_classes() select handler

6 months agosrc/svgtiny_css.c: implement node_name() select handler
Michael Orlitzky [Wed, 11 Oct 2023 23:40:08 +0000 (19:40 -0400)]
src/svgtiny_css.c: implement node_name() select handler

6 months agosrc/svgtiny{.c,_internal.h}: intern SVG's XML namespace URI
Michael Orlitzky [Thu, 12 Oct 2023 02:04:53 +0000 (22:04 -0400)]
src/svgtiny{.c,_internal.h}: intern SVG's XML namespace URI

Intern the string "http://www.w3.org/2000/svg" in the parser state for
later use in libcss's node_name() select handler.

6 months agosrc/svgtiny.c: parse inline stylesheet in svgtiny_parse_paint_attributes()
Michael Orlitzky [Wed, 11 Oct 2023 19:17:08 +0000 (15:17 -0400)]
src/svgtiny.c: parse inline stylesheet in svgtiny_parse_paint_attributes()

...and do nothing with it, for the moment. We are able to parse the
inline style="..." attributes right now but more scaffolding is needed
before we can utilize css_select_style().

6 months agosrc/svgtiny.c: add svgtiny_parse_style_inline() function
Michael Orlitzky [Wed, 11 Oct 2023 16:09:57 +0000 (12:09 -0400)]
src/svgtiny.c: add svgtiny_parse_style_inline() function

This function parses the contents of an inline style="..." attribute
into a libcss stylesheet, or NULL if anything went wrong.

6 months agosrc/svgtiny_internal.h: drop svgtiny_resolve_url() prototype
Michael Orlitzky [Wed, 11 Oct 2023 12:44:54 +0000 (08:44 -0400)]
src/svgtiny_internal.h: drop svgtiny_resolve_url() prototype

This is no longer needed now that svgtiny_resolve_url() lives in the
same file as its sole consumer, svgtiny_create_stylesheet().

6 months agosrc/svgtiny.c: use svgtiny_create_stylesheet() to parse <style>
Michael Orlitzky [Wed, 11 Oct 2023 12:41:51 +0000 (08:41 -0400)]
src/svgtiny.c: use svgtiny_create_stylesheet() to parse <style>

The new function handles all of the boilerplate parameter creation
that was originally done in svgtiny_parse_style_element().

6 months agosrc/svgtiny_internal.h: add svgtiny_create_stylesheet() prototype
Michael Orlitzky [Wed, 11 Oct 2023 12:40:51 +0000 (08:40 -0400)]
src/svgtiny_internal.h: add svgtiny_create_stylesheet() prototype

Needed to let src/svgtiny.c know about the new function.

6 months agosrc/svgtiny_css.c: new function svgtiny_create_stylesheet()
Michael Orlitzky [Wed, 11 Oct 2023 12:27:22 +0000 (08:27 -0400)]
src/svgtiny_css.c: new function svgtiny_create_stylesheet()

We add a function to handle the creation of a new stylesheet with the
default set of parameters. This is in preparation for parsing the
inline styles, which a priori would involve copy/pasting a lot of

  params.foo = bar;

lines from svgtiny_parse_style_element(). The goal is to factor the
common bits out of both the <style> and style= implementations.

6 months agosrc/svgtiny.c: add svgtiny_parse_style_element() function and use it
Michael Orlitzky [Wed, 4 Oct 2023 12:20:40 +0000 (08:20 -0400)]
src/svgtiny.c: add svgtiny_parse_style_element() function and use it

The new function parses the contents of a <style> element. We add a
call to it in svgtiny_preparse_styles() where previously a placeholder
was left.

7 months agosrc/Makefile: add the new svgtiny_css.c to the list of sources
Michael Orlitzky [Wed, 4 Oct 2023 12:30:37 +0000 (08:30 -0400)]
src/Makefile: add the new svgtiny_css.c to the list of sources

7 months agosrc/svgtiny_internal.h: add svgtiny_resolve_url() prototype
Michael Orlitzky [Wed, 4 Oct 2023 12:30:09 +0000 (08:30 -0400)]
src/svgtiny_internal.h: add svgtiny_resolve_url() prototype

7 months agosrc/svgtiny_css.c: new file with new svgtiny_resolve_url() function
Michael Orlitzky [Wed, 4 Oct 2023 12:27:28 +0000 (08:27 -0400)]
src/svgtiny_css.c: new file with new svgtiny_resolve_url() function

Define a stub relative-URL resolver that assumes all URLs are absolute
and returns them unmodified. Some method of doing this is required by
libcss. At the moment, libcss does not support any SVG properties that
take url() values, so not much is lost.

7 months agosrc/svgtiny.c: add impotent svgtiny_preparse_styles() function
Michael Orlitzky [Wed, 4 Oct 2023 11:49:17 +0000 (07:49 -0400)]
src/svgtiny.c: add impotent svgtiny_preparse_styles() function

We declare and add the svgtiny_preparse_styles() function that will be
used to make a first pass through the SVG document and parse all of
the <style> elements. At the moment it is only half implemented:
once we find a <style> element, we do nothing with it. A separate
function will be used to parse a <style> once we have it.

7 months agosrc/svgtiny.c: initialize the libcss context in svgtiny_parse()
Michael Orlitzky [Wed, 4 Oct 2023 04:11:11 +0000 (00:11 -0400)]
src/svgtiny.c: initialize the libcss context in svgtiny_parse()

Before we begin parsing, we have to initialize our new css_select_ctx
by calling css_select_ctx_create(). Later, when parsing is complete,
we css_select_ctx_destroy() it.

7 months agoREADME: document the new svgtiny_LIBCSS_ERROR code
Michael Orlitzky [Wed, 4 Oct 2023 03:51:14 +0000 (23:51 -0400)]
README: document the new svgtiny_LIBCSS_ERROR code

7 months agoinclude/svgtiny.h: add new error constant svgtiny_LIBCSS_ERROR
Michael Orlitzky [Wed, 4 Oct 2023 03:50:00 +0000 (23:50 -0400)]
include/svgtiny.h: add new error constant svgtiny_LIBCSS_ERROR

Analogous to svgtiny_LIBDOM_ERROR, we add svgtiny_LIBCSS_ERROR to
indicate an error related to CSS.

7 months agosrc/svgtiny_strings.h: add "media" to the list of strings
Michael Orlitzky [Wed, 4 Oct 2023 03:03:30 +0000 (23:03 -0400)]
src/svgtiny_strings.h: add "media" to the list of strings

The "media" attribute is arguably the only meaningful attribute a
<style> element has within an SVG document. Here we intern the string
"media" in preparation for parsing <style>. Libcss can at least store
the media information even if we decide not to use it.

7 months agosrc/svgtiny_internal.h: add CSS context to parser state
Michael Orlitzky [Wed, 4 Oct 2023 02:51:38 +0000 (22:51 -0400)]
src/svgtiny_internal.h: add CSS context to parser state

Add a css_select_ctx pointer to the svgtiny_parse_state that is
threaded through each phase of SVG parsing. This will allow us to
populate the context with any <style> sheets we find; later, we can
consult those stylesheets while constructing our svgtiny_diagram (the
abstract representation into which we parse an SVG).

7 months agoREADME: mention that libcss is required
Michael Orlitzky [Wed, 4 Oct 2023 03:12:37 +0000 (23:12 -0400)]
README: mention that libcss is required

7 months agoMakefile: build against libcss
Michael Orlitzky [Wed, 4 Oct 2023 02:03:29 +0000 (22:03 -0400)]
Makefile: build against libcss

The first step towards adding libcss support is to build against
libcss. For now that means getting its "cflags" and "libs" from
pkg-config and putting them into CFLAGS and LDFLAGS.

7 months agosrc/svgtiny.c: remove old misleading libcss comments
Michael Orlitzky [Wed, 4 Oct 2023 00:13:53 +0000 (20:13 -0400)]
src/svgtiny.c: remove old misleading libcss comments

There were a few comments in this file suggesting some future libcss
integration. However, now that we are beginning that integration (much
later), it is probably best to start with a clean slate. So, we remove
those comments.

7 months agosrc/svgtiny_internal.h: removed commented libcss stub
Michael Orlitzky [Wed, 4 Oct 2023 00:10:13 +0000 (20:10 -0400)]
src/svgtiny_internal.h: removed commented libcss stub

This files once thought about declaring,

  /*struct css_style style;*/

as a member of the svgtiny_parse_state struct. We delete that comment
now so that we can begin libcss integration with a clean slate.

9 months agoexamples/svgtiny_display_x11.c: include the system copy of svgtiny.h master
Michael Orlitzky [Sun, 6 Aug 2023 00:36:05 +0000 (20:36 -0400)]
examples/svgtiny_display_x11.c: include the system copy of svgtiny.h

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.

9 months agoexamples/svgtiny_display_x11.c: add missing stdlib.h include
Michael Orlitzky [Sun, 6 Aug 2023 00:36:04 +0000 (20:36 -0400)]
examples/svgtiny_display_x11.c: add missing stdlib.h include

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.

9 months agoexamples/svgtiny_display_x11.c: update LIBXML -> LIBDOM
Michael Orlitzky [Sun, 6 Aug 2023 00:36:03 +0000 (20:36 -0400)]
examples/svgtiny_display_x11.c: update LIBXML -> LIBDOM

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.

9 months agoREADME: update LIBXML -> LIBDOM
Michael Orlitzky [Sun, 6 Aug 2023 00:36:02 +0000 (20:36 -0400)]
README: update LIBXML -> LIBDOM

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 :)

3 years agoimplement svg path arc correctly
Vincent Sanders [Sat, 3 Oct 2020 14:12:30 +0000 (15:12 +0100)]
implement svg path arc correctly

5 years agoUpdate component version for release
Vincent Sanders [Tue, 28 Aug 2018 10:18:37 +0000 (11:18 +0100)]
Update component version for release

5 years agoFix various bugs which caused ASAN and UBSAN to be upset
Daniel Silverstone [Sun, 29 Jul 2018 09:20:38 +0000 (10:20 +0100)]
Fix various bugs which caused ASAN and UBSAN to be upset

5 years agoEnsure we report failures better
Daniel Silverstone [Sun, 29 Jul 2018 09:20:24 +0000 (10:20 +0100)]
Ensure we report failures better

5 years agoIgnore the autogenerated colours file
Daniel Silverstone [Sun, 29 Jul 2018 09:20:16 +0000 (10:20 +0100)]
Ignore the autogenerated colours file

6 years agoUpdate component version for 0.1.6 release
Vincent Sanders [Fri, 13 Oct 2017 09:00:16 +0000 (10:00 +0100)]
Update component version for 0.1.6 release

6 years agoFix parsing of multiple vertical lineto commands
Michael Drake [Mon, 24 Jul 2017 13:18:53 +0000 (14:18 +0100)]
Fix parsing of multiple vertical lineto commands

Thanks to Nils for spotting this.

7 years agoBuildsystem: OpenBSD `sed` doesn't handle -i option.
Michael Drake [Thu, 20 Apr 2017 10:50:01 +0000 (11:50 +0100)]
Buildsystem: OpenBSD `sed` doesn't handle -i option.

7 years agoBuildsystem: Squash "no previous declaration for 'svgtiny_color_lookup'"
Michael Drake [Thu, 20 Apr 2017 10:39:32 +0000 (11:39 +0100)]
Buildsystem: Squash "no previous declaration for 'svgtiny_color_lookup'"

7 years agoBuild: Include gperf-generated code directly.
Michael Drake [Thu, 20 Apr 2017 09:51:07 +0000 (10:51 +0100)]
Build: Include gperf-generated code directly.

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.

7 years agoPrepare for release of 0.1.5
Daniel Silverstone [Sat, 19 Nov 2016 09:41:47 +0000 (09:41 +0000)]
Prepare for release of 0.1.5

7 years agoTest data: Move file to correct place.
Michael Drake [Wed, 26 Oct 2016 15:12:32 +0000 (16:12 +0100)]
Test data: Move file to correct place.

7 years agoMerge branch 'tlsa/fix-gradients'
Michael Drake [Wed, 26 Oct 2016 15:10:49 +0000 (16:10 +0100)]
Merge branch 'tlsa/fix-gradients'

7 years agoTest data: Add SVG with missing stroke gradient definition.
Michael Drake [Wed, 26 Oct 2016 15:06:45 +0000 (16:06 +0100)]
Test data: Add SVG with missing stroke gradient definition.

7 years agoParse: Ensure consumed characters count is initiliased.
Michael Drake [Wed, 26 Oct 2016 14:56:32 +0000 (15:56 +0100)]
Parse: Ensure consumed characters count is initiliased.

7 years agoParse: Make the parse state have two sets of gradient details.
Michael Drake [Wed, 26 Oct 2016 14:21:51 +0000 (15:21 +0100)]
Parse: Make the parse state have two sets of gradient details.

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.

7 years agoParse: Avoid strndup with unchecked return value.
Michael Drake [Wed, 26 Oct 2016 13:32:30 +0000 (14:32 +0100)]
Parse: Avoid strndup with unchecked return value.

7 years agoParse: Remove explicit init of gradient state; gets memset anyway.
Michael Drake [Wed, 26 Oct 2016 13:15:28 +0000 (14:15 +0100)]
Parse: Remove explicit init of gradient state; gets memset anyway.

7 years agoadd polyline test case with floating point colour percentages
Vincent Sanders [Sun, 11 Sep 2016 15:57:35 +0000 (16:57 +0100)]
add polyline test case with floating point colour percentages

7 years agoSVG dictionary for use with AFL tool
Vincent Sanders [Sun, 11 Sep 2016 15:13:29 +0000 (16:13 +0100)]
SVG dictionary for use with AFL tool

7 years agoAdd test set derived from AFL
Vincent Sanders [Sun, 11 Sep 2016 15:08:17 +0000 (16:08 +0100)]
Add test set derived from AFL

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

7 years agoprevent division by zero for gradient with no points and add test
Vincent Sanders [Wed, 31 Aug 2016 14:19:46 +0000 (15:19 +0100)]
prevent division by zero for gradient with no points and add test

7 years agoimprove test suite runner
Vincent Sanders [Wed, 31 Aug 2016 14:18:58 +0000 (15:18 +0100)]
improve test suite runner

7 years agoadd crash test generated with AFL
Vincent Sanders [Sat, 27 Aug 2016 19:45:07 +0000 (20:45 +0100)]
add crash test generated with AFL

7 years agocope with lack of root svg element
Vincent Sanders [Wed, 24 Aug 2016 21:02:47 +0000 (22:02 +0100)]
cope with lack of root svg element

7 years agoadd file output to test decoder
Vincent Sanders [Tue, 23 Aug 2016 20:13:22 +0000 (21:13 +0100)]
add file output to test decoder

8 years agoUpdate component version for release
Vincent Sanders [Sun, 3 Jan 2016 11:57:27 +0000 (11:57 +0000)]
Update component version for release

8 years agoFix build with certain C libraries.
Michael Drake [Sun, 1 Nov 2015 10:04:47 +0000 (10:04 +0000)]
Fix build with certain C libraries.

8 years agoenable decode tests for svg files
Vincent Sanders [Wed, 2 Sep 2015 08:21:05 +0000 (09:21 +0100)]
enable decode tests for svg files

These svg files have caused the library to crash and to render poorly.

8 years agoFix reallocation of path buffer length to cope with differng path lengths
Vincent Sanders [Sun, 23 Aug 2015 21:44:54 +0000 (22:44 +0100)]
Fix reallocation of path buffer length to cope with differng path lengths

9 years agoUpdate CFLAGS to avoid deprication warning for glibc 2.21 and later.
Vincent Sanders [Sun, 22 Mar 2015 00:22:24 +0000 (00:22 +0000)]
Update CFLAGS to avoid deprication warning for glibc 2.21 and later.

9 years agoFix paths for Haiku.
Adrien Destugues [Mon, 9 Jun 2014 18:32:12 +0000 (20:32 +0200)]
Fix paths for Haiku.

9 years agoUpdate the component version for release
Vincent Sanders [Sun, 8 Mar 2015 23:24:51 +0000 (23:24 +0000)]
Update the component version for release

9 years agoEnsure path generation does not overrun allocated storage.
Vincent Sanders [Thu, 15 Jan 2015 12:38:04 +0000 (12:38 +0000)]
Ensure path generation does not overrun allocated storage.

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.

9 years agoUpdate README to cover dependancies and core buildsystem
Vincent Sanders [Sun, 7 Dec 2014 12:33:26 +0000 (12:33 +0000)]
Update README to cover dependancies and core buildsystem

Fix various issues with the test target and update the documentation
to be more correct.

9 years agoFix up for new buildsystem
John-Mark Bell [Sun, 16 Nov 2014 10:33:50 +0000 (10:33 +0000)]
Fix up for new buildsystem

9 years agofix parsing of whitespace in transform operators
Vincent Sanders [Thu, 23 Oct 2014 21:18:16 +0000 (22:18 +0100)]
fix parsing of whitespace in transform operators

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

9 years agoFix relative move commands following a path close.
Paul Mecklenburg [Fri, 10 Oct 2014 22:13:02 +0000 (23:13 +0100)]
Fix relative move commands following a path close.

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.

9 years agoAdd test case image for broken behaviour of relative move.
Michael Drake [Fri, 10 Oct 2014 22:09:30 +0000 (23:09 +0100)]
Add test case image for broken behaviour of relative move.

9 years agoUpdate component version for release
Vincent Sanders [Tue, 26 Aug 2014 14:44:29 +0000 (07:44 -0700)]
Update component version for release

10 years agoHopefully silence warnings about inlines and non inlines calling one
Daniel Silverstone [Sat, 26 Apr 2014 15:24:54 +0000 (16:24 +0100)]
Hopefully silence warnings about inlines and non inlines calling one
another.

10 years agoUpdate component version for release
Vincent Sanders [Fri, 18 Apr 2014 11:19:22 +0000 (12:19 +0100)]
Update component version for release

10 years agoAdd support for multilib
John-Mark Bell [Mon, 13 Jan 2014 01:07:38 +0000 (01:07 +0000)]
Add support for multilib

10 years agoFix to use list_size accessor.
Michael Drake [Fri, 23 Aug 2013 09:48:36 +0000 (10:48 +0100)]
Fix to use list_size accessor.

10 years agoMinor tidyup.
Michael Drake [Fri, 23 Aug 2013 09:47:56 +0000 (10:47 +0100)]
Minor tidyup.

10 years agoMove gradient logging to svgtiny_gradient.c, and suppress when not debugging gradients.
Michael Drake [Fri, 23 Aug 2013 08:26:38 +0000 (09:26 +0100)]
Move gradient logging to svgtiny_gradient.c, and suppress when not debugging gradients.

10 years agoFix leak of gradient dom strings.
Michael Drake [Fri, 23 Aug 2013 08:21:51 +0000 (09:21 +0100)]
Fix leak of gradient dom strings.

10 years agoSuppress most gradient debug.
Michael Drake [Thu, 22 Aug 2013 22:14:56 +0000 (23:14 +0100)]
Suppress most gradient debug.

11 years agoupdate component version for release
Vincent Sanders [Fri, 19 Apr 2013 19:26:48 +0000 (20:26 +0100)]
update component version for release

11 years agoadd a .gitattributes so .gitignore is not exported
Vincent Sanders [Thu, 18 Apr 2013 16:44:01 +0000 (17:44 +0100)]
add a .gitattributes so .gitignore is not exported

11 years agoExplicitly check if r0 or r1 are NaN, as if they are, on x86 the function evaluates...
Chris Young [Sat, 5 Jan 2013 21:11:31 +0000 (21:11 +0000)]
Explicitly check if r0 or r1 are NaN, as if they are, on x86 the function evaluates as 0 (which is already handled), but on PPC the function evaluates to a negative value, causing the following for loop to become infinite.

11 years agoHandle empty text nodes correctly.
John-Mark Bell [Mon, 31 Dec 2012 00:10:38 +0000 (00:10 +0000)]
Handle empty text nodes correctly.

11 years agoDrop const, as this can't work with libdom.
John-Mark Bell [Sun, 30 Dec 2012 23:38:32 +0000 (23:38 +0000)]
Drop const, as this can't work with libdom.