You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ac...@apache.org on 2008/11/05 10:53:07 UTC
svn commit: r711545 -
/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/AFPGraphics2D.java
Author: acumiskey
Date: Wed Nov 5 01:53:07 2008
New Revision: 711545
URL: http://svn.apache.org/viewvc?rev=711545&view=rev
Log:
AFPGraphics2D Line drawing width (Stroke) fix.
Modified:
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/AFPGraphics2D.java
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/AFPGraphics2D.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/AFPGraphics2D.java?rev=711545&r1=711544&r2=711545&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/AFPGraphics2D.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/AFPGraphics2D.java Wed Nov 5 01:53:07 2008
@@ -169,11 +169,12 @@
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 @@
* true if the shape is to be drawn filled
*/
private void doDrawing(Shape shape, boolean fill) {
- getGraphicsObject();
if (!fill) {
graphicsObj.newSegment();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org