1 31 package org.pdfbox.util.operator.pagedrawer; 32 33 import java.util.List ; 34 import org.pdfbox.pdfviewer.PageDrawer; 35 import org.pdfbox.util.PDFOperator; 36 37 import java.awt.BasicStroke ; 38 import java.io.IOException ; 39 40 46 public class SetLineWidth extends org.pdfbox.util.operator.SetLineWidth 47 { 48 49 55 public void process(PDFOperator operator, List arguments) throws IOException 56 { 57 super.process( operator, arguments ); 58 float lineWidth = (float)context.getGraphicsState().getLineWidth(); 59 if( lineWidth == 0 ) 60 { 61 lineWidth = 1; 62 } 63 ((PageDrawer)context).getGraphics().setStroke( new BasicStroke ( lineWidth ) ); 64 } 65 } 66 | Popular Tags |