use of org.apache.poi.hwmf.record.HwmfPenStyle.HwmfLineDash in project poi by apache.
the class HwmfGraphics method draw.
public void draw(Shape shape) {
HwmfLineDash lineDash = prop.getPenStyle().getLineDash();
if (lineDash == HwmfLineDash.NULL) {
// line is not drawn
return;
}
BasicStroke stroke = getStroke();
// only makes sense if the line is not solid
if (prop.getBkMode() == HwmfBkMode.OPAQUE && (lineDash != HwmfLineDash.SOLID && lineDash != HwmfLineDash.INSIDEFRAME)) {
graphicsCtx.setStroke(new BasicStroke(stroke.getLineWidth()));
graphicsCtx.setColor(prop.getBackgroundColor().getColor());
graphicsCtx.draw(shape);
}
// then draw the (dashed) line
graphicsCtx.setStroke(stroke);
graphicsCtx.setColor(prop.getPenColor().getColor());
graphicsCtx.draw(shape);
}
Aggregations