You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SVGGraphics2D.draw(Shape) and SVGGraphics2D.fill(Shape) provide a PathIterator to the function writePathIterator(PathIterator, Properties). In writePathIterator, the PathIterator is first used to draw the shape via result.append(getPath(pi)); . However, when clipping is enabled, the PathIterator is used a second time by appending it to a GeneralPath: gp.append(pi, true);
This second use of the PathIterator doesn't work, because the first use has already used up the iterator. The result is that clipping is skipped because the clip doesn't seem to intersect the (seemingly empty) shape.
Suggestion: Change the function writePathIterator, so that it receives the Shape instead of a PathIterator (new name writeShape(Shape, Properties) ?). Then the two required PathIterators can be acquired in the function when needed.
The text was updated successfully, but these errors were encountered:
benediktmu
added a commit
to benediktmu/freehep-vectorgraphics
that referenced
this issue
Mar 21, 2016
SVGGraphics2D.draw(Shape)
andSVGGraphics2D.fill(Shape)
provide aPathIterator
to the functionwritePathIterator(PathIterator, Properties)
. InwritePathIterator
, thePathIterator
is first used to draw the shape viaresult.append(getPath(pi));
. However, when clipping is enabled, thePathIterator
is used a second time by appending it to aGeneralPath
:gp.append(pi, true);
This second use of the
PathIterator
doesn't work, because the first use has already used up the iterator. The result is that clipping is skipped because the clip doesn't seem to intersect the (seemingly empty) shape.Suggestion: Change the function
writePathIterator
, so that it receives theShape
instead of aPathIterator
(new namewriteShape(Shape, Properties)
?). Then the two requiredPathIterators
can be acquired in the function when needed.The text was updated successfully, but these errors were encountered: