1. 14 Dec, 2016 1 commit
  2. 02 Dec, 2016 1 commit
  3. 01 Dec, 2016 1 commit
  4. 22 Nov, 2016 3 commits
  5. 18 Nov, 2016 1 commit
  6. 17 Nov, 2016 2 commits
    • Federico Mena Quintero's avatar
      Dispatch creation of new nodes from an array of element names, not a chain of strcmp() · 4b22ec83
      Federico Mena Quintero authored
      Also, the rsvg_new_SOME_NODE_TYPE () constructor functions now take the
      element name.
      
      This lets us:
      
      * Use bsearch() on the sorted array of element names, instead of an
        unordered chain of if (strcmp (...)).  We can replace this later with
        something better like a trie.
      
      * Port things to Rust more easily, since the constructor functions can
        dispatch on their own based on the element name.
      
      * Avoid special cases in the way
        rsvg_new_node_component_transfer_function() and
        rsvg_new_node_light_source() are called; now they dispatch on their
        own based on the element name.
      4b22ec83
    • Federico Mena Quintero's avatar
      node_set_atts(): Check here for the property bag being empty · 58a645cc
      Federico Mena Quintero authored
      Every ::set_atts() implementation used to check on its own whether the
      property bag is empty (common for "plain" SVG elements with no defined
      attributes?) before actually querying the property bag.
      
      Now we do that check in a single place, in the toplevel node_set_atts()
      helper, instead of having each node type do it on its own.
      
      This means that ::set_atts() implementation which do "validation" work
      or any other post-initialization after the attributes have been set,
      will have to support their ::set_atts() not being called at all if there
      are no attributes in the first place.
      58a645cc
  7. 11 Nov, 2016 4 commits
    • Federico Mena Quintero's avatar
      Do not inherit gradient stop color and opacity from the gradient's parent object · e28afe42
      Federico Mena Quintero authored
      Per the spec, stop-color and stop-opacity don't inherit from the
      parent object of a gradient, unless explicitly requested.
      
      This makes the test pservers-grad-18-b.svg pass.
      e28afe42
    • Federico Mena Quintero's avatar
      RsvgGradientStop: store whether the stop's values are valid · 4006aff6
      Federico Mena Quintero authored
      The spec mandates that values for stop offsets are only plain numbers or
      percentages.  We used to handle this more or less implicitly by calling
      _rsvg_css_hand_normalize_length(), using the resulting value, and
      dropping the units.  Now we actually ensure that we get plain numbers
      or percentages, and eliminate this one use of _rsvg_css_hand_normalize_length().
      
      Now, RsvgGradientStop has an is_valid field that says whether the stop
      has valid units.  At rendering time, we can decide what to do about
      gradients with invalid stops:  currently we don't add invalid stops to
      the gradient, but we still render it up to the last valid stop -
      hopefully to make it easier to debug SVG files.
      
      Also, we now ensure that stop offsets are actually in nondecreasing
      order, per the spec.
      
      (I really want to get rid of _rsvg_css_hand_normalize_length(), but
      found these things along the way...)
      4006aff6
    • Federico Mena Quintero's avatar
      Gradients: Don't store "current color" for gradient nodes · b491f38f
      Federico Mena Quintero authored
      Gradient nodes don't need to store a has_current_color flag nor the
      current color:  nodes for gradient stops already contain this
      information, and they already resolve the current color themselves.
      b491f38f
    • Federico Mena Quintero's avatar
      length.rs: New file with RsvgLength and a public rsvg_length_parse() · 03d7716b
      Federico Mena Quintero authored
      This is the parser for SVG length values, converted to Rust.
      
      The new rsvg_length_parse() replaces the old _rsvg_css_parse_length()
      throughout the code.
      03d7716b
  8. 09 Nov, 2016 4 commits
    • Federico Mena Quintero's avatar
      Make rsvg_state_new() / rsvg_state_free() the only way of getting new states · 468f9251
      Federico Mena Quintero authored
      Previously they were allocated on the stack, allocated by hand on the
      heap, allocated with g_slice by rsvg_state_push()...
      
      Make all of that consistent; rsvg_state_new() is the only way to get
      a new state now.
      468f9251
    • Federico Mena Quintero's avatar
      Register newly-created nodes in the defs as soon as possible · c8b08f1d
      Federico Mena Quintero authored
      Don't defer it until each node's implementation of ::set_atts().
      
      This reduces the amount of duplicated code in each implementation of
      ::set_atts().
      c8b08f1d
    • Federico Mena Quintero's avatar
      Rename function to rsvg_defs_register_node_by_id() · e478a290
      Federico Mena Quintero authored
      To make it more clear that the "id" is the XML's id="foo" attribute.
      
      Also, instead of the &something->super.super nonsense, use "self" or
      simply "node" where available.
      e478a290
    • Federico Mena Quintero's avatar
      Make RsvgLength carry its own direction for normalization · 5a85e7cf
      Federico Mena Quintero authored
      This is the pattern that was there before:
      
        foo.some_len = _rsvg_css_parse_length (str);   /* at creation time */
      
        ...
      
        double real_len = _rsvg_css_normalize_length (&foo.some_len, ctx, LENGTH_DIR_HORIZONTAL); /* at rendering time */
      
      This led to a few inconsistencies in the way directions got used -
      sometimes cut&paste errors could creep in and a vertical direction
      would be used for a horizontal length, for example.
      
      This change makes the pattern be
      
        foo.some_len = _rsvg_css_parse_length (str, LENGTH_DIR_HORIZONTAL);   /* at creation time */
      
        ...
      
        double real_len = _rsvg_css_normalize_length (&foo.some_len, ctx); /* at rendering time */
      
      I.e. lengths get their direction-to-be-resolved-as at creation time,
      during parse_length(); this gets stored in a new field length.dir.
      Later, normalize_length() knows which direction to use.
      5a85e7cf
  9. 12 Apr, 2016 1 commit
  10. 22 Oct, 2015 5 commits
  11. 11 Feb, 2015 1 commit
  12. 06 Feb, 2015 1 commit
  13. 10 Jun, 2014 2 commits
  14. 04 Oct, 2013 1 commit
  15. 20 Jun, 2012 1 commit
  16. 07 Nov, 2011 2 commits
  17. 05 Nov, 2011 1 commit
  18. 06 Sep, 2011 1 commit
  19. 30 Apr, 2010 1 commit
  20. 28 Apr, 2010 1 commit
  21. 07 Apr, 2010 1 commit
  22. 30 Mar, 2010 1 commit
  23. 19 Feb, 2009 1 commit
  24. 12 Jan, 2007 2 commits