com.sun.pdfview

Class PDFShapeCmd

public class PDFShapeCmd extends PDFCmd

Encapsulates a path. Also contains extra fields and logic to check for consecutive abutting anti-aliased regions. We stroke the shared line between these regions again with a 1-pixel wide line so that the background doesn't show through between them.
Field Summary
static intBOTH
perform both stroke and fill
static intCLIP
set the clip region to the path
static intFILL
fill the path with the fill paint
static intSTROKE
stroke the outline of the path with the stroke paint
Constructor Summary
PDFShapeCmd(GeneralPath gp, int style)
create a new PDFShapeCmd and check it against the previous one to find any shared edges.
Method Summary
Rectangle2Dexecute(PDFRenderer state)
perform the stroke and record the dirty region

Field Detail

BOTH

public static final int BOTH
perform both stroke and fill

CLIP

public static final int CLIP
set the clip region to the path

FILL

public static final int FILL
fill the path with the fill paint

STROKE

public static final int STROKE
stroke the outline of the path with the stroke paint

Constructor Detail

PDFShapeCmd

public PDFShapeCmd(GeneralPath gp, int style)
create a new PDFShapeCmd and check it against the previous one to find any shared edges.

Parameters: gp the path style the style: an OR of STROKE, FILL, or CLIP. As a convenience, BOTH = STROKE | FILL.

Method Detail

execute

public Rectangle2D execute(PDFRenderer state)
perform the stroke and record the dirty region