com.lowagie.text.pdf

Class PdfPatternPainter

public final class PdfPatternPainter extends PdfTemplate

Implements the pattern.
Field Summary
ColordefaultColor
booleanstencil
floatxstep
floatystep
Constructor Summary
PdfPatternPainter()
Creates a PdfPattern.
PdfPatternPainter(PdfWriter wr)
Creates new PdfPattern
PdfPatternPainter(PdfWriter wr, Color defaultColor)
Method Summary
voidaddImage(Image image, float a, float b, float c, float d, float e, float f)
voidcheckNoColor()
ColorgetDefaultColor()
Returns the default color of the pattern.
PdfContentBytegetDuplicate()
Gets a duplicate of this PdfPatternPainter.
PdfPatterngetPattern()
Gets the stream representing this pattern
PdfPatterngetPattern(int compressionLevel)
Gets the stream representing this pattern
floatgetXStep()
Returns the horizontal interval when repeating the pattern.
floatgetYStep()
Returns the vertical interval when repeating the pattern.
booleanisStencil()
Tells you if this pattern is colored/uncolored (stencil = uncolored, you need to set a default color).
voidresetCMYKColorFill()
voidresetCMYKColorStroke()
voidresetGrayFill()
voidresetGrayStroke()
voidresetRGBColorFill()
voidresetRGBColorStroke()
voidsetCMYKColorFill(int cyan, int magenta, int yellow, int black)
voidsetCMYKColorFillF(float cyan, float magenta, float yellow, float black)
voidsetCMYKColorStroke(int cyan, int magenta, int yellow, int black)
voidsetCMYKColorStrokeF(float cyan, float magenta, float yellow, float black)
voidsetColorFill(Color color)
voidsetColorFill(PdfSpotColor sp, float tint)
voidsetColorStroke(Color color)
voidsetColorStroke(PdfSpotColor sp, float tint)
voidsetGrayFill(float gray)
voidsetGrayStroke(float gray)
voidsetPatternFill(PdfPatternPainter p)
voidsetPatternFill(PdfPatternPainter p, Color color, float tint)
voidsetPatternMatrix(float a, float b, float c, float d, float e, float f)
Sets the transformation matrix for the pattern.
voidsetPatternStroke(PdfPatternPainter p, Color color, float tint)
voidsetPatternStroke(PdfPatternPainter p)
voidsetRGBColorFill(int red, int green, int blue)
voidsetRGBColorFillF(float red, float green, float blue)
voidsetRGBColorStroke(int red, int green, int blue)
voidsetRGBColorStrokeF(float red, float green, float blue)
voidsetXStep(float xstep)
Sets the horizontal interval of this pattern.
voidsetYStep(float ystep)
Sets the vertical interval of this pattern.

Field Detail

defaultColor

Color defaultColor

stencil

boolean stencil

xstep

float xstep

ystep

float ystep

Constructor Detail

PdfPatternPainter

private PdfPatternPainter()
Creates a PdfPattern.

PdfPatternPainter

PdfPatternPainter(PdfWriter wr)
Creates new PdfPattern

Parameters: wr the PdfWriter

PdfPatternPainter

PdfPatternPainter(PdfWriter wr, Color defaultColor)

Method Detail

addImage

public void addImage(Image image, float a, float b, float c, float d, float e, float f)

See Also: PdfContentByte

checkNoColor

void checkNoColor()

getDefaultColor

public Color getDefaultColor()
Returns the default color of the pattern.

Returns: a Color

getDuplicate

public PdfContentByte getDuplicate()
Gets a duplicate of this PdfPatternPainter. All the members are copied by reference but the buffer stays different.

Returns: a copy of this PdfPatternPainter

getPattern

PdfPattern getPattern()
Gets the stream representing this pattern

Returns: the stream representing this pattern

getPattern

PdfPattern getPattern(int compressionLevel)
Gets the stream representing this pattern

Parameters: compressionLevel the compression level of the stream

Returns: the stream representing this pattern

Since: 2.1.3

getXStep

public float getXStep()
Returns the horizontal interval when repeating the pattern.

Returns: a value

getYStep

public float getYStep()
Returns the vertical interval when repeating the pattern.

Returns: a value

isStencil

public boolean isStencil()
Tells you if this pattern is colored/uncolored (stencil = uncolored, you need to set a default color).

Returns: true if the pattern is an uncolored tiling pattern (stencil).

resetCMYKColorFill

public void resetCMYKColorFill()

See Also: resetCMYKColorFill

resetCMYKColorStroke

public void resetCMYKColorStroke()

See Also: resetCMYKColorStroke

resetGrayFill

public void resetGrayFill()

See Also: resetGrayFill

resetGrayStroke

public void resetGrayStroke()

See Also: resetGrayStroke

resetRGBColorFill

public void resetRGBColorFill()

See Also: resetRGBColorFill

resetRGBColorStroke

public void resetRGBColorStroke()

See Also: resetRGBColorStroke

setCMYKColorFill

public void setCMYKColorFill(int cyan, int magenta, int yellow, int black)

See Also: PdfContentByte

setCMYKColorFillF

public void setCMYKColorFillF(float cyan, float magenta, float yellow, float black)

See Also: PdfContentByte

setCMYKColorStroke

public void setCMYKColorStroke(int cyan, int magenta, int yellow, int black)

See Also: PdfContentByte

setCMYKColorStrokeF

public void setCMYKColorStrokeF(float cyan, float magenta, float yellow, float black)

See Also: PdfContentByte

setColorFill

public void setColorFill(Color color)

See Also: setColorFill

setColorFill

public void setColorFill(PdfSpotColor sp, float tint)

See Also: PdfContentByte

setColorStroke

public void setColorStroke(Color color)

See Also: setColorStroke

setColorStroke

public void setColorStroke(PdfSpotColor sp, float tint)

See Also: PdfContentByte

setGrayFill

public void setGrayFill(float gray)

See Also: PdfContentByte

setGrayStroke

public void setGrayStroke(float gray)

See Also: PdfContentByte

setPatternFill

public void setPatternFill(PdfPatternPainter p)

See Also: setPatternFill

setPatternFill

public void setPatternFill(PdfPatternPainter p, Color color, float tint)

See Also: PdfContentByte

setPatternMatrix

public void setPatternMatrix(float a, float b, float c, float d, float e, float f)
Sets the transformation matrix for the pattern.

Parameters: a b c d e f

setPatternStroke

public void setPatternStroke(PdfPatternPainter p, Color color, float tint)

See Also: PdfContentByte

setPatternStroke

public void setPatternStroke(PdfPatternPainter p)

See Also: setPatternStroke

setRGBColorFill

public void setRGBColorFill(int red, int green, int blue)

See Also: PdfContentByte

setRGBColorFillF

public void setRGBColorFillF(float red, float green, float blue)

See Also: PdfContentByte

setRGBColorStroke

public void setRGBColorStroke(int red, int green, int blue)

See Also: PdfContentByte

setRGBColorStrokeF

public void setRGBColorStrokeF(float red, float green, float blue)

See Also: PdfContentByte

setXStep

public void setXStep(float xstep)
Sets the horizontal interval of this pattern.

Parameters: xstep the xstep in horizontal painting

setYStep

public void setYStep(float ystep)
Sets the vertical interval of this pattern.

Parameters: ystep in vertical painting