# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: C:\Users\Tilman Hausherr\Documents\Java\PDFBox reactor\pdfbox\src\main\java\org\apache\pdfbox\util\operator\pagedrawer
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: StrokePath.java
--- StrokePath.java Base (BASE)
+++ StrokePath.java Locally Modified (Based On LOCAL)
@@ -27,7 +27,6 @@
 import org.apache.pdfbox.util.operator.OperatorProcessor;
 
 import java.awt.BasicStroke;
-import java.awt.Graphics2D;
 import java.io.IOException;
 
 /**
@@ -46,6 +45,7 @@
 
     /**
      * S stroke the path.
+     *
      * @param operator The operator that is being executed.
      * @param arguments List
      *
@@ -56,25 +56,44 @@
         ///dwilson 3/19/07 refactor
         try
         {
-            PageDrawer drawer = (PageDrawer)context;
+            PageDrawer drawer = (PageDrawer) context;
     
-            float lineWidth = (float)context.getGraphicsState().getLineWidth();
+            float lineWidth = (float) context.getGraphicsState().getLineWidth();
             Matrix ctm = context.getGraphicsState().getCurrentTransformationMatrix();
-            if ( ctm != null && ctm.getXScale() > 0) 
+            if (ctm != null && ctm.getXScale() > 0)
             {
                 lineWidth = lineWidth * ctm.getXScale();
             }
             
-            BasicStroke stroke = (BasicStroke)drawer.getStroke();
+            if (lineWidth < 0.25)
+            {
+                lineWidth = 0.25f;
+            }
+
+            BasicStroke stroke = (BasicStroke) drawer.getStroke();
             if (stroke == null)
             {
-                drawer.setStroke( new BasicStroke( lineWidth ) );
+                drawer.setStroke(new BasicStroke(lineWidth));
             }
             else
             {
-                drawer.setStroke( new BasicStroke(lineWidth, stroke.getEndCap(), stroke.getLineJoin(), 
-                        stroke.getMiterLimit(), stroke.getDashArray(), stroke.getDashPhase()) );
+                float phaseStart = stroke.getDashPhase();
+                float[] dashArray = stroke.getDashArray();
+                if (dashArray != null)
+                {
+                    if (ctm != null && ctm.getXScale() > 0)
+                    {
+                        for (int i = 0; i < dashArray.length; ++i)
+                        {
+                            dashArray[i] *= ctm.getXScale();
             }
+                    }
+                    phaseStart *= ctm.getXScale();
+                }
+
+                drawer.setStroke(new BasicStroke(lineWidth, stroke.getEndCap(), stroke.getLineJoin(),
+                        stroke.getMiterLimit(), dashArray, phaseStart));
+            }
             drawer.strokePath();
         }
         catch (Exception exception)
