use of org.apache.poi.sl.usermodel.FillStyle in project poi by apache.
the class DrawFreeformShape method computeOutlines.
protected Collection<Outline> computeOutlines(Graphics2D graphics) {
List<Outline> lst = new ArrayList<Outline>();
FreeformShape<?, ?> fsh = getShape();
Path2D sh = fsh.getPath();
AffineTransform tx = (AffineTransform) graphics.getRenderingHint(Drawable.GROUP_TRANSFORM);
if (tx == null) {
tx = new AffineTransform();
}
java.awt.Shape canvasShape = tx.createTransformedShape(sh);
FillStyle fs = fsh.getFillStyle();
StrokeStyle ss = fsh.getStrokeStyle();
Path path = new Path(fs != null, ss != null);
lst.add(new Outline(canvasShape, path));
return lst;
}
Aggregations