Markers not using ViewBox attribute

Bug #167161 reported by Tavmjong
This bug report is a duplicate of:  Bug #166885: ViewBox attribute not supported. Edit Remove
2
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
High
Bryce Harrington

Bug Description

Inkscape draws the example marker from the SVG standard
incorrectly. See:

http://www.w3.org/TR/SVG/painting.html#Markers

I believe this is due to not taking the ViewBox
attribute into consideration when the marker is drawn.

Tags: svg viewbox
Revision history for this message
Tavmjong (tavmjong) wrote :

The W3 SVG test:

http://www.w3.org/Graphics/SVG/Test/20030813/svggen/painting-marker-02-f.svg

also shows the problem.

Inkscape markers do not display correctly in Firefox trunk
and in Opera 9. If viewBox and markerWidth/markerHeight
attributes are added they will display correctly except:

- Opera displays an end marker at the wrong angle.
- Firefox trunk and doesn't like negative viewBox origins
and/or negative path node coordinates.

Markers without these attributes do display correctly in
Firefox 2beta1 and in Batik 1.6.

According to the SVG 1.1 standard the viewBox attribute is
not required. If markerWidth and markerHeight are not given,
they default to 3. Opera seems to be using these values to
set a clipping path (Opera also seems to ignore the
overflow:visible attribute).

A screen shot has been uploaded. The red markers are
Inkscape SquareL markers. The blue are modified to include a
viewBox, markerWidth, and markerHeight (with negative
values). The red dotted squares shows where the markers
should be.

Revision history for this message
Tavmjong (tavmjong) wrote :

Inkscape SVG test file with original SquareL marker and
modified MySquareL marker.

Revision history for this message
Tavmjong (tavmjong) wrote :

This problem is probably related to Inkscape's failure of
the coords-viewattr-01-b.svg test. The default
preserveAspectRatio value is xMidyMid which implies that
there should be uniform scaling in x and y so that the
viewBox fits completely inside the viewPort (viewPort =
markerWidth, markerHeight = 3, 3 by default). If the viewBox
is not specified, it is equal to the viewPort. In the
example, the viewBox is specified with an aspect ratio that
does not match the viewPort's aspect ratio. Inkscape seems
to use a non uniform scaling, calculating x and y
independently, when a uniform scaling using the value
calculated from the height is indicated.

Revision history for this message
Peter Lewerin (vermeil-deactivatedaccount) wrote :

I'm confirming this in accordance with <URL http://wiki.inkscape.org/wiki/index.php/BugTriageProjects>.

Changed in inkscape:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.