public final class PdfPatternPainter extends PdfTemplate
bBox, group, layer, matrix, pageResources, thisReference, type, TYPE_IMPORTED, TYPE_PATTERN, TYPE_TEMPLATE
ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, content, layerDepth, LINE_CAP_BUTT, LINE_CAP_PROJECTING_SQUARE, LINE_CAP_ROUND, LINE_JOIN_BEVEL, LINE_JOIN_MITER, LINE_JOIN_ROUND, pdf, separator, state, stateList, TEXT_RENDER_MODE_CLIP, TEXT_RENDER_MODE_FILL, TEXT_RENDER_MODE_FILL_CLIP, TEXT_RENDER_MODE_FILL_STROKE, TEXT_RENDER_MODE_FILL_STROKE_CLIP, TEXT_RENDER_MODE_INVISIBLE, TEXT_RENDER_MODE_STROKE, TEXT_RENDER_MODE_STROKE_CLIP, writer
Modifier and Type | Method and Description |
---|---|
void |
addImage(Image image,
float a,
float b,
float c,
float d,
float e,
float f)
Adds an
Image to the page. |
Color |
getDefaultColor()
Returns the default color of the pattern.
|
PdfContentByte |
getDuplicate()
Gets a duplicate of this
PdfPatternPainter . |
float |
getXStep()
Returns the horizontal interval when repeating the pattern.
|
float |
getYStep()
Returns the vertical interval when repeating the pattern.
|
boolean |
isStencil()
Tells you if this pattern is colored/uncolored (stencil = uncolored, you need to set a default color).
|
void |
resetCMYKColorFill()
Changes the current color for filling paths to black.
|
void |
resetCMYKColorStroke()
Changes the current color for stroking paths to black.
|
void |
resetGrayFill()
Changes the current gray tint for filling paths to black.
|
void |
resetGrayStroke()
Changes the current gray tint for stroking paths to black.
|
void |
resetRGBColorFill()
Changes the current color for filling paths to black.
|
void |
resetRGBColorStroke()
Changes the current color for stroking paths to black.
|
void |
setCMYKColorFill(int cyan,
int magenta,
int yellow,
int black)
Changes the current color for filling paths (device dependent colors!).
|
void |
setCMYKColorFillF(float cyan,
float magenta,
float yellow,
float black)
Changes the current color for filling paths (device dependent colors!).
|
void |
setCMYKColorStroke(int cyan,
int magenta,
int yellow,
int black)
Changes the current color for stroking paths (device dependent colors!).
|
void |
setCMYKColorStrokeF(float cyan,
float magenta,
float yellow,
float black)
Changes the current color for stroking paths (device dependent colors!).
|
void |
setColorFill(Color color)
Sets the fill color.
|
void |
setColorFill(PdfSpotColor sp,
float tint)
Sets the fill color to a spot color.
|
void |
setColorStroke(Color color)
Sets the stroke color.
|
void |
setColorStroke(PdfSpotColor sp,
float tint)
Sets the stroke color to a spot color.
|
void |
setGrayFill(float gray)
Changes the currentgray tint for filling paths (device dependent colors!).
|
void |
setGrayStroke(float gray)
Changes the currentgray tint for stroking paths (device dependent colors!).
|
void |
setPatternFill(PdfPatternPainter p)
Sets the fill color to a pattern.
|
void |
setPatternFill(PdfPatternPainter p,
Color color,
float tint)
Sets the fill color to an uncolored pattern.
|
void |
setPatternMatrix(float a,
float b,
float c,
float d,
float e,
float f)
Sets the transformation matrix for the pattern.
|
void |
setPatternStroke(PdfPatternPainter p)
Sets the stroke color to a pattern.
|
void |
setPatternStroke(PdfPatternPainter p,
Color color,
float tint)
Sets the stroke color to an uncolored pattern.
|
void |
setRGBColorFill(int red,
int green,
int blue)
Changes the current color for filling paths (device dependent colors!).
|
void |
setRGBColorFillF(float red,
float green,
float blue)
Changes the current color for filling paths (device dependent colors!).
|
void |
setRGBColorStroke(int red,
int green,
int blue)
Changes the current color for stroking paths (device dependent colors!).
|
void |
setRGBColorStrokeF(float red,
float green,
float blue)
Changes the current color for stroking paths (device dependent colors!).
|
void |
setXStep(float xstep)
Sets the horizontal interval of this pattern.
|
void |
setYStep(float ystep)
Sets the vertical interval of this pattern.
|
beginVariableText, createTemplate, endVariableText, getBoundingBox, getGroup, getHeight, getIndirectReference, getLayer, getType, getWidth, setBoundingBox, setGroup, setHeight, setLayer, setMatrix, setWidth
add, addImage, addImage, addImage, addOutline, addPSXObject, addTemplate, addTemplate, arc, beginLayer, beginMarkedContentSequence, beginMarkedContentSequence, beginMarkedContentSequence, beginMarkedContentSequence, beginText, bezierArc, checkWriter, circle, clip, closePath, closePathEoFillStroke, closePathFillStroke, closePathStroke, concatCTM, createAppearance, createGraphics, createGraphics, createGraphics, createGraphics, createGraphicsShapes, createGraphicsShapes, createPattern, createPattern, createPattern, createPattern, createPrinterGraphics, createPrinterGraphics, createPrinterGraphics, createPrinterGraphics, createPrinterGraphicsShapes, createPrinterGraphicsShapes, createTemplate, curveFromTo, curveTo, curveTo, drawButton, drawRadioField, drawTextField, ellipse, endLayer, endMarkedContentSequence, endText, eoClip, eoFill, eoFillStroke, fill, fillStroke, getCharacterSpacing, getEffectiveStringWidth, getHorizontalScaling, getInternalBuffer, getKernArray, getLeading, getPdfDocument, getPdfWriter, getRootOutline, getWordSpacing, getXTLM, getYTLM, lineTo, localDestination, localGoto, moveText, moveTextWithLeading, moveTo, newlineShowText, newlineShowText, newlineText, newPath, paintShading, paintShading, rectangle, rectangle, remoteGoto, remoteGoto, reset, reset, restoreState, roundRectangle, sanityCheck, saveState, setAction, setCharacterSpacing, setDefaultColorspace, setFlatness, setFontAndSize, setGState, setHorizontalScaling, setLeading, setLineCap, setLineDash, setLineDash, setLineDash, setLineDash, setLineJoin, setLineWidth, setLiteral, setLiteral, setLiteral, setMiterLimit, setPatternFill, setPatternStroke, setShadingFill, setShadingStroke, setTextMatrix, setTextMatrix, setTextRenderingMode, setTextRise, setWordSpacing, showText, showText, showText, showTextAligned, showTextAlignedKerned, showTextKerned, stroke, toPdf, toString, transform, variableRectangle
public void setXStep(float xstep)
xstep
- the xstep in horizontal paintingpublic void setYStep(float ystep)
ystep
- in vertical paintingpublic float getXStep()
public float getYStep()
public boolean isStencil()
public void setPatternMatrix(float a, float b, float c, float d, float e, float f)
a
- b
- c
- d
- e
- f
- public PdfContentByte getDuplicate()
PdfPatternPainter
. All
the members are copied by reference but the buffer stays different.getDuplicate
in class PdfTemplate
PdfPatternPainter
public Color getDefaultColor()
public void setGrayFill(float gray)
PdfContentByte
Sets the color space to DeviceGray (or the DefaultGray color space), and sets the gray tint to use for filling paths.
setGrayFill
in class PdfContentByte
gray
- a value between 0 (black) and 1 (white)PdfContentByte.setGrayFill(float)
public void resetGrayFill()
PdfContentByte
resetGrayFill
in class PdfContentByte
PdfContentByte.resetGrayFill()
public void setGrayStroke(float gray)
PdfContentByte
Sets the color space to DeviceGray (or the DefaultGray color space), and sets the gray tint to use for stroking paths.
setGrayStroke
in class PdfContentByte
gray
- a value between 0 (black) and 1 (white)PdfContentByte.setGrayStroke(float)
public void resetGrayStroke()
PdfContentByte
resetGrayStroke
in class PdfContentByte
PdfContentByte.resetGrayStroke()
public void setRGBColorFillF(float red, float green, float blue)
PdfContentByte
Sets the color space to DeviceRGB (or the DefaultRGB color space), and sets the color to use for filling paths.
Following the PDF manual, each operand must be a number between 0 (minimum intensity) and 1 (maximum intensity).
setRGBColorFillF
in class PdfContentByte
red
- the intensity of red. A value between 0 and 1green
- the intensity of green. A value between 0 and 1blue
- the intensity of blue. A value between 0 and 1PdfContentByte.setRGBColorFillF(float, float, float)
public void resetRGBColorFill()
PdfContentByte
resetRGBColorFill
in class PdfContentByte
PdfContentByte.resetRGBColorFill()
public void setRGBColorStrokeF(float red, float green, float blue)
PdfContentByte
Sets the color space to DeviceRGB (or the DefaultRGB color space), and sets the color to use for stroking paths.
Following the PDF manual, each operand must be a number between 0 (miniumum intensity) and 1 (maximum intensity).
setRGBColorStrokeF
in class PdfContentByte
red
- the intensity of red. A value between 0 and 1green
- the intensity of green. A value between 0 and 1blue
- the intensity of blue. A value between 0 and 1PdfContentByte.setRGBColorStrokeF(float, float, float)
public void resetRGBColorStroke()
PdfContentByte
resetRGBColorStroke
in class PdfContentByte
PdfContentByte.resetRGBColorStroke()
public void setCMYKColorFillF(float cyan, float magenta, float yellow, float black)
PdfContentByte
Sets the color space to DeviceCMYK (or the DefaultCMYK color space), and sets the color to use for filling paths.
Following the PDF manual, each operand must be a number between 0 (no ink) and 1 (maximum ink).
setCMYKColorFillF
in class PdfContentByte
cyan
- the intensity of cyan. A value between 0 and 1magenta
- the intensity of magenta. A value between 0 and 1yellow
- the intensity of yellow. A value between 0 and 1black
- the intensity of black. A value between 0 and 1PdfContentByte.setCMYKColorFillF(float, float, float, float)
public void resetCMYKColorFill()
PdfContentByte
resetCMYKColorFill
in class PdfContentByte
PdfContentByte.resetCMYKColorFill()
public void setCMYKColorStrokeF(float cyan, float magenta, float yellow, float black)
PdfContentByte
Sets the color space to DeviceCMYK (or the DefaultCMYK color space), and sets the color to use for stroking paths.
Following the PDF manual, each operand must be a number between 0 (miniumum intensity) and 1 (maximum intensity).
setCMYKColorStrokeF
in class PdfContentByte
cyan
- the intensity of cyan. A value between 0 and 1magenta
- the intensity of magenta. A value between 0 and 1yellow
- the intensity of yellow. A value between 0 and 1black
- the intensity of black. A value between 0 and 1PdfContentByte.setCMYKColorStrokeF(float, float, float, float)
public void resetCMYKColorStroke()
PdfContentByte
resetCMYKColorStroke
in class PdfContentByte
PdfContentByte.resetCMYKColorStroke()
public void addImage(Image image, float a, float b, float c, float d, float e, float f) throws DocumentException
PdfContentByte
Image
to the page. The positioning of the Image
is done with the transformation matrix. To position an image
at (x,y)
use addImage(image, image_width, 0, 0, image_height, x, y).addImage
in class PdfContentByte
image
- the Image
objecta
- an element of the transformation matrixb
- an element of the transformation matrixc
- an element of the transformation matrixd
- an element of the transformation matrixe
- an element of the transformation matrixf
- an element of the transformation matrixDocumentException
- on errorPdfContentByte.addImage(com.lowagie.text.Image, float, float, float, float, float, float)
public void setCMYKColorFill(int cyan, int magenta, int yellow, int black)
PdfContentByte
Sets the color space to DeviceCMYK (or the DefaultCMYK color space), and sets the color to use for filling paths.
This method is described in the 'Portable Document Format Reference Manual version 1.3' section 8.5.2.1 (page 331).
Following the PDF manual, each operand must be a number between 0 (no ink) and 1 (maximum ink). This method however accepts only integers between 0x00 and 0xFF.
setCMYKColorFill
in class PdfContentByte
cyan
- the intensity of cyanmagenta
- the intensity of magentayellow
- the intensity of yellowblack
- the intensity of blackPdfContentByte.setCMYKColorFill(int, int, int, int)
public void setCMYKColorStroke(int cyan, int magenta, int yellow, int black)
PdfContentByte
Sets the color space to DeviceCMYK (or the DefaultCMYK color space), and sets the color to use for stroking paths.
This method is described in the 'Portable Document Format Reference Manual version 1.3' section 8.5.2.1 (page 331).
Following the PDF manual, each operand must be a number between 0 (minimum intensity) and 1 (maximum intensity). This method however accepts only integers between 0x00 and 0xFF.setCMYKColorStroke
in class PdfContentByte
cyan
- the intensity of redmagenta
- the intensity of greenyellow
- the intensity of blueblack
- the intensity of blackPdfContentByte.setCMYKColorStroke(int, int, int, int)
public void setRGBColorFill(int red, int green, int blue)
PdfContentByte
Sets the color space to DeviceRGB (or the DefaultRGB color space), and sets the color to use for filling paths.
This method is described in the 'Portable Document Format Reference Manual version 1.3' section 8.5.2.1 (page 331).
Following the PDF manual, each operand must be a number between 0 (minimum intensity) and 1 (maximum intensity). This method however accepts only integers between 0x00 and 0xFF.
setRGBColorFill
in class PdfContentByte
red
- the intensity of redgreen
- the intensity of greenblue
- the intensity of bluePdfContentByte.setRGBColorFill(int, int, int)
public void setRGBColorStroke(int red, int green, int blue)
PdfContentByte
Sets the color space to DeviceRGB (or the DefaultRGB color space), and sets the color to use for stroking paths.
This method is described in the 'Portable Document Format Reference Manual version 1.3' section 8.5.2.1 (page 331).
Following the PDF manual, each operand must be a number between 0 (minimum intensity) and 1 (maximum intensity). This method however accepts only integers between 0x00 and 0xFF.setRGBColorStroke
in class PdfContentByte
red
- the intensity of redgreen
- the intensity of greenblue
- the intensity of bluePdfContentByte.setRGBColorStroke(int, int, int)
public void setColorStroke(Color color)
PdfContentByte
color
can be an
ExtendedColor
.setColorStroke
in class PdfContentByte
color
- the colorPdfContentByte.setColorStroke(java.awt.Color)
public void setColorFill(Color color)
PdfContentByte
color
can be an
ExtendedColor
.setColorFill
in class PdfContentByte
color
- the colorPdfContentByte.setColorFill(java.awt.Color)
public void setColorFill(PdfSpotColor sp, float tint)
PdfContentByte
setColorFill
in class PdfContentByte
sp
- the spot colortint
- the tint for the spot color. 0 is no color and 1
is 100% colorPdfContentByte.setColorFill(com.lowagie.text.pdf.PdfSpotColor, float)
public void setColorStroke(PdfSpotColor sp, float tint)
PdfContentByte
setColorStroke
in class PdfContentByte
sp
- the spot colortint
- the tint for the spot color. 0 is no color and 1
is 100% colorPdfContentByte.setColorStroke(com.lowagie.text.pdf.PdfSpotColor, float)
public void setPatternFill(PdfPatternPainter p)
PdfContentByte
setPatternFill
in class PdfContentByte
p
- the patternPdfContentByte.setPatternFill(com.lowagie.text.pdf.PdfPatternPainter)
public void setPatternFill(PdfPatternPainter p, Color color, float tint)
PdfContentByte
setPatternFill
in class PdfContentByte
p
- the patterncolor
- the color of the patterntint
- the tint if the color is a spot color, ignored otherwisePdfContentByte.setPatternFill(com.lowagie.text.pdf.PdfPatternPainter, java.awt.Color, float)
public void setPatternStroke(PdfPatternPainter p, Color color, float tint)
PdfContentByte
setPatternStroke
in class PdfContentByte
p
- the patterncolor
- the color of the patterntint
- the tint if the color is a spot color, ignored otherwisePdfContentByte.setPatternStroke(com.lowagie.text.pdf.PdfPatternPainter, java.awt.Color, float)
public void setPatternStroke(PdfPatternPainter p)
PdfContentByte
setPatternStroke
in class PdfContentByte
p
- the patternPdfContentByte.setPatternStroke(com.lowagie.text.pdf.PdfPatternPainter)
Copyright © 2018. All rights reserved.