wanglunhui2012 commented on PR #322:
URL: https://github.com/apache/poi/pull/322#issuecomment-1094027177
In my cade, I change the `org.apache.poi.hwmf.draw.HwmfGraphics`, I do the
change bellow:
```java
public void draw(Shape shape) {
HwmfPenStyle ps = getProperties().getPenStyle();
if (ps == null) {
return;
}
HwmfLineDash lineDash = ps.getLineDash();
if (lineDash == HwmfLineDash.NULL) {
// line is not drawn
return;
}
// --------- Change ---------
if(lineDash == HwmfLineDash.USERSTYLE){
return;
}
// --------- Change ---------
BasicStroke stroke = getStroke();
// first draw a solid background line (depending on bkmode)
// only makes sense if the line is not solid
if (getProperties().getBkMode() == HwmfBkMode.OPAQUE && (lineDash !=
HwmfLineDash.SOLID && lineDash != HwmfLineDash.INSIDEFRAME)) {
graphicsCtx.setStroke(new BasicStroke(stroke.getLineWidth()));
graphicsCtx.setColor(getProperties().getBackgroundColor().getColor());
graphicsCtx.draw(shape);
}
// then draw the (dashed) line
graphicsCtx.setStroke(stroke);
graphicsCtx.setColor(getProperties().getPenColor().getColor());
graphicsCtx.draw(shape);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]