iText 8.0.2 API
iText.Kernel.Pdf.Canvas.PdfPatternCanvas Class Reference

A PdfCanvas instance with an inherent tiling pattern. More...

Inheritance diagram for iText.Kernel.Pdf.Canvas.PdfPatternCanvas:
iText.Kernel.Pdf.Canvas.PdfCanvas

Public Member Functions

  PdfPatternCanvas (PdfStream contentStream, PdfResources resources, PdfDocument document)
  Creates PdfPatternCanvas from content stream of page, form XObject, pattern etc. More...
 
  PdfPatternCanvas (PdfPattern.Tiling pattern, PdfDocument document)
  Creates PdfPatternCanvas for a document from a provided Tiling pattern More...
 
override PdfCanvas  SetColor (PdfColorSpace colorSpace, float[] colorValue, PdfPattern pattern, bool fill)
  Changes the current color for paths with an explicitly defined pattern. More...
 
- Public Member Functions inherited from iText.Kernel.Pdf.Canvas.PdfCanvas
  PdfCanvas (PdfStream contentStream, PdfResources resources, PdfDocument document)
  Creates PdfCanvas from content stream of page, form XObject, pattern etc. More...
 
  PdfCanvas (PdfPage page)
  Convenience method for fast PdfCanvas creation by a certain page. More...
 
  PdfCanvas (PdfPage page, bool wrapOldContent)
  Convenience method for fast PdfCanvas creation by a certain page. More...
 
  PdfCanvas (PdfFormXObject xObj, PdfDocument document)
  Creates a PdfCanvas from a PdfFormXObject. More...
 
  PdfCanvas (PdfDocument doc, int pageNum)
  Convenience method for fast PdfCanvas creation by a certain page. More...
 
virtual PdfResources  GetResources ()
  Get the resources of the page that this canvas belongs to.. More...
 
virtual PdfDocument  GetDocument ()
  Get the document this canvas belongs to More...
 
virtual void  AttachContentStream (PdfStream contentStream)
  Attaches new content stream to the canvas. More...
 
virtual CanvasGraphicsState  GetGraphicsState ()
  Gets current CanvasGraphicsState. More...
 
virtual void  Release ()
  Releases the canvas. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SaveState ()
  Saves graphics state. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  RestoreState ()
  Restores graphics state. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  ConcatMatrix (double a, double b, double c, double d, double e, double f)
  Concatenates the 2x3 affine transformation matrix to the current matrix in the content stream managed by this Canvas. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  ConcatMatrix (PdfArray array)
  Concatenates the 2x3 affine transformation matrix to the current matrix in the content stream managed by this Canvas. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  ConcatMatrix (AffineTransform transform)
  Concatenates the affine transformation matrix to the current matrix in the content stream managed by this Canvas. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  BeginText ()
  Begins text block (PDF BT operator). More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  EndText ()
  Ends text block (PDF ET operator). More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  BeginVariableText ()
  Begins variable text block More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  EndVariableText ()
  Ends variable text block More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetFontAndSize (PdfFont font, float size)
  Sets font and size (PDF Tf operator). More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  MoveText (double x, double y)
  Moves text by shifting text line matrix (PDF Td operator). More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetLeading (float leading)
  Sets the text leading parameter. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  MoveTextWithLeading (float x, float y)
  Moves to the start of the next line, offset from the start of the current line. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  NewlineText ()
  Moves to the start of the next line. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  NewlineShowText (String text)
  Moves to the next line and shows text . More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  NewlineShowText (float wordSpacing, float charSpacing, String text)
  Moves to the next line and shows text string, using the given values of the character and word spacing parameters. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetTextRenderingMode (int textRenderingMode)
  Sets text rendering mode. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetTextRise (float textRise)
  Sets the text rise parameter. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetWordSpacing (float wordSpacing)
  Sets the word spacing parameter. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetCharacterSpacing (float charSpacing)
  Sets the character spacing parameter. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetHorizontalScaling (float scale)
  Sets the horizontal scaling parameter. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetTextMatrix (float a, float b, float c, float d, float x, float y)
  Replaces the text matrix. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetTextMatrix (AffineTransform transform)
  Replaces the text matrix. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetTextMatrix (float x, float y)
  Changes the text matrix. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  ShowText (String text)
  Shows text (operator Tj). More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  ShowText (GlyphLine text)
  Shows text (operator Tj). More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  ShowText (GlyphLine text, IEnumerator< GlyphLine.GlyphLinePart > iterator)
  Shows text (operator Tj). More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  ShowText (PdfArray textArray)
  Shows text (operator TJ) More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  MoveTo (double x, double y)
  Move the current point (x, y), omitting any connecting line segment. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  LineTo (double x, double y)
  Appends a straight line segment from the current point (x, y). More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  CurveTo (double x1, double y1, double x2, double y2, double x3, double y3)
  Appends a Bêzier curve to the path, starting from the current point. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  CurveTo (double x2, double y2, double x3, double y3)
  Appends a Bezier curve to the path, starting from the current point. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  CurveFromTo (double x1, double y1, double x3, double y3)
  Appends a Bezier curve to the path, starting from the current point. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  Arc (double x1, double y1, double x2, double y2, double startAng, double extent)
  Draws a partial ellipse inscribed within the rectangle x1,y1,x2,y2, starting at startAng degrees and covering extent degrees. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  ArcContinuous (double x1, double y1, double x2, double y2, double startAng, double extent)
  Draws a partial ellipse with the preceding line to the start of the arc to prevent path broking. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  Ellipse (double x1, double y1, double x2, double y2)
  Draws an ellipse inscribed within the rectangle x1,y1,x2,y2. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  Rectangle (double x, double y, double width, double height)
  Draws a rectangle. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  Rectangle (iText.Kernel.Geom.Rectangle rectangle)
  Draws a rectangle. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  RoundRectangle (double x, double y, double width, double height, double radius)
  Draws rounded rectangle. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  Circle (double x, double y, double r)
  Draws a circle. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  PaintShading (PdfShading shading)
  Paints a shading object and adds it to the resources of this canvas More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  ClosePath ()
  Closes the current subpath by appending a straight line segment from the current point to the starting point of the subpath. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  ClosePathEoFillStroke ()
  Closes the path, fills it using the even-odd rule to determine the region to fill and strokes it. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  ClosePathFillStroke ()
  Closes the path, fills it using the non-zero winding number rule to determine the region to fill and strokes it. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  EndPath ()
  Ends the path without filling or stroking it. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  Stroke ()
  Strokes the path. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  Clip ()
  Modify the current clipping path by intersecting it with the current path, using the nonzero winding rule to determine which regions lie inside the clipping path. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  EoClip ()
  Modify the current clipping path by intersecting it with the current path, using the even-odd rule to determine which regions lie inside the clipping path. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  ClosePathStroke ()
  Closes the path and strokes it. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  Fill ()
  Fills current path. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  FillStroke ()
  Fills the path using the non-zero winding number rule to determine the region to fill and strokes it. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  EoFill ()
  EOFills current path. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  EoFillStroke ()
  Fills the path, using the even-odd rule to determine the region to fill and strokes it. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetLineWidth (float lineWidth)
  Sets line width. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetLineCapStyle (int lineCapStyle)
  Sets the line cap style, the shape to be used at the ends of open subpaths when they are stroked. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetLineJoinStyle (int lineJoinStyle)
  Sets the line join style, the shape to be used at the corners of paths when they are stroked. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetMiterLimit (float miterLimit)
  Sets the miter limit, a parameter specifying the maximum length a miter join may extend beyond the join point, relative to the angle of the line segments. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetLineDash (float phase)
  Changes the value of the line dash pattern. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetLineDash (float unitsOn, float phase)
  Changes the value of the line dash pattern. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetLineDash (float unitsOn, float unitsOff, float phase)
  Changes the value of the line dash pattern. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetLineDash (float[] array, float phase)
  Changes the value of the line dash pattern. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetRenderingIntent (PdfName renderingIntent)
  Set the rendering intent. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetFlatnessTolerance (float flatnessTolerance)
  Changes the Flatness. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetFillColor (Color color)
  Changes the current color for filling paths. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetStrokeColor (Color color)
  Changes the current color for stroking paths. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetColor (Color color, bool fill)
  Changes the current color for paths. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetColor (PdfColorSpace colorSpace, float[] colorValue, bool fill)
  Changes the current color for paths. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetFillColorGray (float g)
  Changes the current color for filling paths to a grayscale value. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetStrokeColorGray (float g)
  Changes the current color for stroking paths to a grayscale value. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  ResetFillColorGray ()
  Changes the current color for filling paths to black. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  ResetStrokeColorGray ()
  Changes the current color for stroking paths to black. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetFillColorRgb (float r, float g, float b)
  Changes the current color for filling paths to an RGB value. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetStrokeColorRgb (float r, float g, float b)
  Changes the current color for stroking paths to an RGB value. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetFillColorShading (PdfPattern.Shading shading)
  Adds or changes the shading of the current fill color path. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetStrokeColorShading (PdfPattern.Shading shading)
  Adds or changes the shading of the current stroke color path. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  ResetFillColorRgb ()
  Changes the current color for filling paths to black. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  ResetStrokeColorRgb ()
  Changes the current color for stroking paths to black. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetFillColorCmyk (float c, float m, float y, float k)
  Changes the current color for filling paths to a CMYK value. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetStrokeColorCmyk (float c, float m, float y, float k)
  Changes the current color for stroking paths to a CMYK value. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  ResetFillColorCmyk ()
  Changes the current color for filling paths to black. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  ResetStrokeColorCmyk ()
  Changes the current color for stroking paths to black. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  BeginLayer (IPdfOCG layer)
  Begins a graphic block whose visibility is controlled by the layer. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  EndLayer ()
  Ends OCG layer. More...
 
virtual PdfXObject  AddImageWithTransformationMatrix (ImageData image, float a, float b, float c, float d, float e, float f)
  Creates iText.Kernel.Pdf.Xobject.PdfImageXObject from image and adds it to canvas. More...
 
virtual PdfXObject  AddImageWithTransformationMatrix (ImageData image, float a, float b, float c, float d, float e, float f, bool asInline)
  Creates iText.Kernel.Pdf.Xobject.PdfImageXObject from image and adds it to canvas. More...
 
virtual PdfXObject  AddImageFittedIntoRectangle (ImageData image, iText.Kernel.Geom.Rectangle rect, bool asInline)
  Creates iText.Kernel.Pdf.Xobject.PdfImageXObject from image and fitted into specific rectangle on canvas. More...
 
virtual PdfXObject  AddImageAt (ImageData image, float x, float y, bool asInline)
  Creates iText.Kernel.Pdf.Xobject.PdfImageXObject from image and adds it to the specified position. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  AddXObjectWithTransformationMatrix (PdfXObject xObject, float a, float b, float c, float d, float e, float f)
  Adds iText.Kernel.Pdf.Xobject.PdfXObject to canvas. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  AddXObjectAt (PdfXObject xObject, float x, float y)
  Adds iText.Kernel.Pdf.Xobject.PdfXObject to the specified position. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  AddXObjectFittedIntoRectangle (PdfXObject xObject, iText.Kernel.Geom.Rectangle rect)
  Adds iText.Kernel.Pdf.Xobject.PdfXObject fitted into specific rectangle on canvas. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  AddXObject (PdfXObject xObject)
  Adds iText.Kernel.Pdf.Xobject.PdfXObject on canvas. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  SetExtGState (PdfExtGState extGState)
  Sets the ExtGState dictionary for the current graphics state More...
 
virtual PdfExtGState  SetExtGState (PdfDictionary extGState)
  Sets the ExtGState dictionary for the current graphics state More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  BeginMarkedContent (PdfName tag)
  Manually start a Marked Content sequence. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  BeginMarkedContent (PdfName tag, PdfDictionary properties)
  Manually start a Marked Content sequence with properties. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  EndMarkedContent ()
  Manually end a Marked Content sequence. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  OpenTag (CanvasTag tag)
  Manually open a canvas tag, beginning a Marked Content sequence. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  OpenTag (TagReference tagReference)
  Open a tag, beginning a Marked Content sequence. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  CloseTag ()
  Manually close a tag, ending a Marked Content sequence. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  WriteLiteral (String s)
  Outputs a String directly to the content. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  WriteLiteral (char c)
  Outputs a char directly to the content. More...
 
virtual iText.Kernel.Pdf.Canvas.PdfCanvas  WriteLiteral (float n)
  Outputs a float directly to the content. More...
 
virtual PdfStream  GetContentStream ()
  Please, use this method with caution and only if you know what you are doing. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from iText.Kernel.Pdf.Canvas.PdfCanvas
static IList< double[]>  BezierArc (double x1, double y1, double x2, double y2, double startAng, double extent)
  Generates an array of bezier curves to draw an arc. More...
 

Detailed Description

A PdfCanvas instance with an inherent tiling pattern.

Constructor & Destructor Documentation

◆ PdfPatternCanvas() [1/2]

iText.Kernel.Pdf.Canvas.PdfPatternCanvas.PdfPatternCanvas ( PdfStream  contentStream,
PdfResources  resources,
PdfDocument  document 
)
inline

Creates PdfPatternCanvas from content stream of page, form XObject, pattern etc.

Parameters
contentStream The content stream
resources The resources, a specialized dictionary that can be used by PDF instructions in the content stream
document The document that the resulting content stream will be written to

◆ PdfPatternCanvas() [2/2]

iText.Kernel.Pdf.Canvas.PdfPatternCanvas.PdfPatternCanvas ( PdfPattern.Tiling  pattern,
PdfDocument  document 
)
inline

Creates PdfPatternCanvas for a document from a provided Tiling pattern

Parameters
pattern The Tiling pattern must be colored
document The document that the resulting content stream will be written to

Member Function Documentation

◆ SetColor()

override PdfCanvas iText.Kernel.Pdf.Canvas.PdfPatternCanvas.SetColor ( PdfColorSpace  colorSpace,
float[]  colorValue,
PdfPattern  pattern,
bool  fill 
)
inlinevirtual

Changes the current color for paths with an explicitly defined pattern.

Parameters
colorSpace the color space of the new color
colorValue a list of numerical values with a length corresponding to the specs of the color space. Values should be in the range [0,1]
pattern a pattern for the colored line or area
fill set fill color (true) or stroke color (false)
Returns
current canvas.

Reimplemented from iText.Kernel.Pdf.Canvas.PdfCanvas.