Lines 137-147
Link Here
|
137 |
} |
137 |
} |
138 |
} |
138 |
} |
139 |
|
139 |
|
140 |
// 'stroke-width' property |
|
|
141 |
Value val = CSSUtilities.getComputedStyle |
142 |
(paintedElement, SVGCSSEngine.STROKE_WIDTH_INDEX); |
143 |
float strokeWidth = val.getFloatValue(); |
144 |
|
145 |
// 'markerUnits' attribute - default is 'strokeWidth' |
140 |
// 'markerUnits' attribute - default is 'strokeWidth' |
146 |
short unitsType; |
141 |
short unitsType; |
147 |
s = markerElement.getAttributeNS(null, SVG_MARKER_UNITS_ATTRIBUTE); |
142 |
s = markerElement.getAttributeNS(null, SVG_MARKER_UNITS_ATTRIBUTE); |
Lines 152-168
Link Here
|
152 |
(markerElement, SVG_MARKER_UNITS_ATTRIBUTE, s, ctx); |
147 |
(markerElement, SVG_MARKER_UNITS_ATTRIBUTE, s, ctx); |
153 |
} |
148 |
} |
154 |
|
149 |
|
155 |
// |
150 |
// compute an additional transform for 'strokeWidth' coordinate system; |
156 |
// |
151 |
// else set strokeWidth to 1 for correct calculation of the clipping |
157 |
// |
152 |
// rectangle |
158 |
|
153 |
float strokeWidth = 1; |
159 |
// compute an additional transform for 'strokeWidth' coordinate system |
154 |
AffineTransform markerTxf = new AffineTransform(); |
160 |
AffineTransform markerTxf; |
|
|
161 |
if (unitsType == SVGUtilities.STROKE_WIDTH) { |
155 |
if (unitsType == SVGUtilities.STROKE_WIDTH) { |
162 |
markerTxf = new AffineTransform(); |
156 |
// 'stroke-width' property |
|
|
157 |
Value val = CSSUtilities.getComputedStyle |
158 |
(paintedElement, SVGCSSEngine.STROKE_WIDTH_INDEX); |
159 |
strokeWidth = val.getFloatValue(); |
163 |
markerTxf.scale(strokeWidth, strokeWidth); |
160 |
markerTxf.scale(strokeWidth, strokeWidth); |
164 |
} else { |
|
|
165 |
markerTxf = new AffineTransform(); |
166 |
} |
161 |
} |
167 |
|
162 |
|
168 |
// 'viewBox' and 'preserveAspectRatio' attributes |
163 |
// 'viewBox' and 'preserveAspectRatio' attributes |