On 2013-12-24 03:35 +0100, su_v wrote:
On 2013-12-22 21:34 +0100, Campbell Barton wrote:
Hi, we have some icons which are made in inkscape but render differently in RSVG,
Most (all?) of the applications on Linux are using RSVG, so I was wondering if there is a good way to determine if this is some special inkscape feature or a bug/limitation in RSVG.
Comparison:
http://git.blender.org/gitweb/gitweb.cgi/blender.git/blob_plain/HEAD:/releas... http://git.blender.org/gitweb/gitweb.cgi/blender.git/blob_plain/HEAD:/releas...
Note that RSVG seems to fail on groups that have alpha masking.
It appears that librsvg doesn't handle Inkscape's <mask> notation well: when creating a <mask> element, Inkscape always defines 'maskUnits="userSpaceOnUse"' [1], but not the properties 'x', 'y', 'width', 'height' (for the "largest possible offscreen buffer").
AFAICT the SVG 1.1 spec defines relative fallback values (x, y: -10%, width, height: 120%) if the position and size properties are not defined [2], but it's unclear to me how those relate to maskUnits 'userSpaceOnUse'.
librsvg doesn't appear to use fallback values if maskUnits are 'userSpaceOnUse' (setting them explicitly makes the masked objects reappear). If maskUnits are 'objectBoundingBox', or omitted entirely, librsvg renders the masked objects as expected, whether or not position and size of the offscreen buffer are explicitly defined or not.
Steps to reproduce: 1) download sample file from w3.org: http://www.w3.org/TR/SVG11/images/masking/mask01.svg 2) open mask01.svg with rsvg-view-3 --> masked blue text is rendered as expected 3) open mask01.svg in Inkscape, release mask on blue text, reapply same mask, save as new file 4) open file from step 3 with rsvg-view-3: --> the masked object (blue text) is missing
AFAICT this occurs independent of viewBox settings or transform attributes (on parent container elements of the masked object(s), on the masked objects, or on objects in the definition of the mask element). It also does not depend on the usage of gradients in masks (the same affect can be reproduced with masks which use a solid fill color).