aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/afp
diff options
context:
space:
mode:
authorAdrian Cumiskey <acumiskey@apache.org>2008-11-05 09:53:07 +0000
committerAdrian Cumiskey <acumiskey@apache.org>2008-11-05 09:53:07 +0000
commitefbd0e3b92621f3bbeb0cfdc0898098dc5c8b82e (patch)
tree78955dd7d8962d2df2f9f5af8045e35b7cdf73f4 /src/java/org/apache/fop/afp
parentb8f51d3e86bcb3c4f4865f1c8e31ec72d7dcc08f (diff)
downloadxmlgraphics-fop-efbd0e3b92621f3bbeb0cfdc0898098dc5c8b82e.tar.gz
xmlgraphics-fop-efbd0e3b92621f3bbeb0cfdc0898098dc5c8b82e.zip
AFPGraphics2D Line drawing width (Stroke) fix.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@711545 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/afp')
-rw-r--r--src/java/org/apache/fop/afp/AFPGraphics2D.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/java/org/apache/fop/afp/AFPGraphics2D.java b/src/java/org/apache/fop/afp/AFPGraphics2D.java
index d412e2b94..190e5e465 100644
--- a/src/java/org/apache/fop/afp/AFPGraphics2D.java
+++ b/src/java/org/apache/fop/afp/AFPGraphics2D.java
@@ -169,11 +169,12 @@ public class AFPGraphics2D extends AbstractGraphics2D {
protected void applyStroke(Stroke stroke) {
if (stroke instanceof BasicStroke) {
BasicStroke basicStroke = (BasicStroke) stroke;
+
+ // set line width
float lineWidth = basicStroke.getLineWidth();
- if (state.setLineWidth(lineWidth)) {
- getGraphicsObject().setLineWidth(Math.round(lineWidth * 2));
- }
- // note: this is an approximation at best!
+ getGraphicsObject().setLineWidth(Math.round(lineWidth * 2));
+
+ // set line type/style (note: this is an approximation at best!)
float[] dashArray = basicStroke.getDashArray();
if (state.setDashArray(dashArray)) {
byte type = GraphicsSetLineType.DEFAULT; // normally SOLID
@@ -218,7 +219,6 @@ public class AFPGraphics2D extends AbstractGraphics2D {
* true if the shape is to be drawn filled
*/
private void doDrawing(Shape shape, boolean fill) {
- getGraphicsObject();
if (!fill) {
graphicsObj.newSegment();
}