* @throws IOException If an error occurs while processing the font.
*/
public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
{
super.process( operator, arguments );
PDLineDashPattern lineDashPattern = context.getGraphicsState().getLineDashPattern();
Graphics2D graphics = ((PageDrawer)context).getGraphics();
BasicStroke stroke = (BasicStroke)graphics.getStroke();
if (stroke == null)
{
if (lineDashPattern.isDashPatternEmpty())
{
graphics.setStroke(new BasicStroke(1, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER, 10.0f) );
}
else
{
graphics.setStroke(new BasicStroke(1, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER, 10.0f,
lineDashPattern.getCOSDashPattern().toFloatArray(), lineDashPattern.getPhaseStart()) );
}
}
else
{
if (lineDashPattern.isDashPatternEmpty())
{
graphics.setStroke( new BasicStroke(stroke.getLineWidth(), stroke.getEndCap(),
stroke.getLineJoin(), stroke.getMiterLimit()) );
}
else
{
graphics.setStroke( new BasicStroke(stroke.getLineWidth(), stroke.getEndCap(), stroke.getLineJoin(),
stroke.getMiterLimit(), lineDashPattern.getCOSDashPattern().toFloatArray(),
lineDashPattern.getPhaseStart()) );
}
}
}