public final class PdfPatternPainter extends PdfTemplate
PdfContentByte.GraphicState
accessibleAttributes, bBox, contentTagged, group, layer, matrix, pageReference, pageResources, role, thisReference, type, TYPE_IMPORTED, TYPE_PATTERN, TYPE_TEMPLATE
ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, content, duplicatedFrom, layerDepth, LINE_CAP_BUTT, LINE_CAP_PROJECTING_SQUARE, LINE_CAP_ROUND, LINE_JOIN_BEVEL, LINE_JOIN_MITER, LINE_JOIN_ROUND, markedContentSize, 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.
|
BaseColor |
getDefaultColor()
Returns the default color of the pattern.
|
PdfContentByte |
getDuplicate()
Gets a duplicate of this PdfPatternPainter .
|
PdfPattern |
getPattern()
Gets the stream representing this pattern
|
PdfPattern |
getPattern(int compressionLevel)
Gets the stream representing this pattern
|
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(BaseColor color)
Sets the fill color.
|
void |
setColorFill(PdfSpotColor sp, float tint)
Sets the fill color to a spot color.
|
void |
setColorStroke(BaseColor 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, BaseColor 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, BaseColor 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, getAccessibleAttribute, getAccessibleAttributes, getAdditional, getBoundingBox, getCurrentPage, getFormXObject, getGroup, getHeight, getId, getIndirectReference, getLayer, getPageReference, getRole, getType, getWidth, isContentTagged, isInline, isTagged, setAccessibleAttribute, setAdditional, setBoundingBox, setContentTagged, setGroup, setHeight, setId, setLayer, setMatrix, setPageReference, setRole, setWidth
add, addAnnotation, addFormXObj, addFormXObj, addImage, addImage, addImage, addImage, addImage, addImage, addImage, addImage, addOutline, addPSXObject, addTemplate, addTemplate, addTemplate, addTemplate, addTemplate, addTemplate, addTemplate, addTemplate, addTemplate, addTemplate, addTemplate, arc, arc, beginLayer, beginMarkedContentSequence, beginMarkedContentSequence, beginMarkedContentSequence, beginText, beginText, bezierArc, bezierArc, checkState, checkWriter, circle, circle, clip, closeMCBlock, closePath, closePathEoFillStroke, closePathFillStroke, closePathStroke, concatCTM, concatCTM, concatCTM, concatCTM, createAppearance, createGraphics, createGraphics, createGraphics, createGraphics, createGraphicsShapes, createGraphicsShapes, createPattern, createPattern, createPattern, createPattern, createPrinterGraphics, createPrinterGraphics, createPrinterGraphics, createPrinterGraphics, createPrinterGraphicsShapes, createPrinterGraphicsShapes, createTemplate, curveFromTo, curveFromTo, curveTo, curveTo, curveTo, curveTo, drawButton, drawButton, drawRadioField, drawRadioField, drawTextField, drawTextField, ellipse, ellipse, endLayer, endMarkedContentSequence, endText, eoClip, eoFill, eoFillStroke, fill, fillStroke, getCharacterSpacing, getDuplicate, getEffectiveStringWidth, getHorizontalScaling, getInternalBuffer, getInText, getKernArray, getLeading, getMcDepth, getMcElements, getPdfDocument, getPdfWriter, getRootOutline, getWordSpacing, getXTLM, getYTLM, inheritGraphicState, isTaggingSuppressed, lineTo, lineTo, localDestination, localGoto, moveText, moveTextWithLeading, moveTo, moveTo, newlineShowText, newlineShowText, newlineText, newPath, openMCBlock, paintShading, paintShading, rectangle, rectangle, rectangle, remoteGoto, remoteGoto, reset, reset, restoreMCBlocks, restoreState, roundRectangle, roundRectangle, sanityCheck, saveMCBlocks, saveState, setAction, setCharacterSpacing, setColorFill, setColorFill, setColorStroke, setColorStroke, setDefaultColorspace, setFlatness, setFlatness, setFontAndSize, setGState, setHorizontalScaling, setLeading, setLineCap, setLineDash, setLineDash, setLineDash, setLineDash, setLineDash, setLineDash, setLineDash, setLineDash, setLineJoin, setLineWidth, setLineWidth, setLiteral, setLiteral, setLiteral, setMcDepth, setMcElements, setMiterLimit, setMiterLimit, setPatternFill, setPatternStroke, setRenderingIntent, setShadingFill, setShadingStroke, setSuppressTagging, setTextMatrix, setTextMatrix, setTextMatrix, setTextMatrix, setTextRenderingMode, setTextRise, setTextRise, setWordSpacing, showText, showText, showTextAligned, showTextAlignedKerned, showTextGid, showTextKerned, stroke, toPdf, toString, transform, transform, updateTx, variableRectangle
public void setXStep(float xstep)
xstep
- the xstep in horizontal painting
public void setYStep(float ystep)
ystep
- in vertical painting
public 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 PdfPattern getPattern()
public PdfPattern getPattern(int compressionLevel)
compressionLevel
- the compression level of the stream
public PdfContentByte getDuplicate()
PdfPatternPainter
. All the members are copied by reference but the buffer stays different.
getDuplicate
in class PdfTemplate
PdfPatternPainter
public BaseColor 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 1
green
- the intensity of green. A value between 0 and 1
blue
- the intensity of blue. A value between 0 and 1
PdfContentByte.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 1
green
- the intensity of green. A value between 0 and 1
blue
- the intensity of blue. A value between 0 and 1
PdfContentByte.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 1
magenta
- the intensity of magenta. A value between 0 and 1
yellow
- the intensity of yellow. A value between 0 and 1
black
- the intensity of black. A value between 0 and 1
PdfContentByte.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 1
magenta
- the intensity of magenta. A value between 0 and 1
yellow
- the intensity of yellow. A value between 0 and 1
black
- the intensity of black. A value between 0 and 1
PdfContentByte.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
object
a
- an element of the transformation matrix
b
- an element of the transformation matrix
c
- an element of the transformation matrix
d
- an element of the transformation matrix
e
- an element of the transformation matrix
f
- an element of the transformation matrix
DocumentException
- on error
PdfContentByte.addImage(com.itextpdf.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 cyan
magenta
- the intensity of magenta
yellow
- the intensity of yellow
black
- the intensity of black
PdfContentByte.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 red
magenta
- the intensity of green
yellow
- the intensity of blue
black
- the intensity of black
PdfContentByte.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 red
green
- the intensity of green
blue
- the intensity of blue
PdfContentByte.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 red
green
- the intensity of green
blue
- the intensity of blue
PdfContentByte.setRGBColorStroke(int, int, int)
public void setColorStroke(BaseColor color)
PdfContentByte
color
can be an ExtendedColor
.
setColorStroke
in class PdfContentByte
color
- the color
PdfContentByte.setColorStroke(com.itextpdf.text.BaseColor)
public void setColorFill(BaseColor color)
PdfContentByte
color
can be an ExtendedColor
.
setColorFill
in class PdfContentByte
color
- the color
PdfContentByte.setColorFill(com.itextpdf.text.BaseColor)
public void setColorFill(PdfSpotColor sp, float tint)
PdfContentByte
setColorFill
in class PdfContentByte
sp
- the spot color
tint
- the tint for the spot color. 0 is no color and 1 is 100% color
PdfContentByte.setColorFill(com.itextpdf.text.pdf.PdfSpotColor, float)
public void setColorStroke(PdfSpotColor sp, float tint)
PdfContentByte
setColorStroke
in class PdfContentByte
sp
- the spot color
tint
- the tint for the spot color. 0 is no color and 1 is 100% color
PdfContentByte.setColorStroke(com.itextpdf.text.pdf.PdfSpotColor, float)
public void setPatternFill(PdfPatternPainter p)
PdfContentByte
setPatternFill
in class PdfContentByte
p
- the pattern
PdfContentByte.setPatternFill(com.itextpdf.text.pdf.PdfPatternPainter)
public void setPatternFill(PdfPatternPainter p, BaseColor color, float tint)
PdfContentByte
setPatternFill
in class PdfContentByte
p
- the pattern
color
- the color of the pattern
tint
- the tint if the color is a spot color, ignored otherwise
PdfContentByte.setPatternFill(com.itextpdf.text.pdf.PdfPatternPainter, com.itextpdf.text.BaseColor, float)
public void setPatternStroke(PdfPatternPainter p, BaseColor color, float tint)
PdfContentByte
setPatternStroke
in class PdfContentByte
p
- the pattern
color
- the color of the pattern
tint
- the tint if the color is a spot color, ignored otherwise
PdfContentByte.setPatternStroke(com.itextpdf.text.pdf.PdfPatternPainter, com.itextpdf.text.BaseColor, float)
public void setPatternStroke(PdfPatternPainter p)
PdfContentByte
setPatternStroke
in class PdfContentByte
p
- the pattern
PdfContentByte.setPatternStroke(com.itextpdf.text.pdf.PdfPatternPainter)
Copyright © 1998–2016. All rights reserved.