Click or drag to resize

PdfDrawingSurface Class

PdfDrawingSurface is an abstract class that defines the drawing operations that can be performed on PDF page or other PDF content item. In this model, there is a notion of current path. A path a set of possibly disjoint lines or curves. A path or any of its sub paths may be closed open. An existing path may have more paths added to it. When any of the painting operations are performed, the current path will be cleared - unless the user performs a GSave operation in the containing PdfPageRenderer object before painting. Paths may be stroked, painted, painted and stroked, or clipped. Clipping is cumulative. Clipping to a path can only reduce the current clipping region or keep it the same size. Use GSave/GRestore to make temporary changes to the clipping region. In addition, a tranformation matrix may be applied to the drawing surface that will be incorporated into the current transformation. Transformations are cumulative and will affect all subsequent drawing unless managed with a GSave/Grestore operation. Before any operations can be performed on a PdfDrawingSurface, client code is required to call Begin. Client code should also call End when done. Begin and End are very efficient operations.
Inheritance Hierarchy
SystemObject
  Atalasoft.PdfDoc.Generating.RenderingPdfDrawingSurface

Namespace:  Atalasoft.PdfDoc.Generating.Rendering
Assembly:  Atalasoft.PdfDoc (in Atalasoft.PdfDoc.dll) Version: 11.0.0.0.0.297 (.NET 4.5.2, x86)
Syntax
public abstract class PdfDrawingSurface

The PdfDrawingSurface type exposes the following members.

Constructors
  NameDescription
Protected methodPdfDrawingSurface
Initializes a new instance of the PdfDrawingSurface class
Top
Methods
  NameDescription
Public methodCode exampleAddPath(IEnumerablePdfPathOperation)
Adds a set of path operations to the current path. Path should start with a Move operation.
Public methodCode exampleAddPath(IEnumerablePdfPathOperation, PdfPoint)
First applies a translation transform then adds a set of path operations to the current path. Path should start with a Move operation. The translation remains in place after the addition.
Public methodCode exampleAddPath(IEnumerablePdfPathOperation, PdfTransform)
First applies a transform then adds a set of path operations to the current path. Path should start with a Move operation. The transform remains in place after the addition.
Public methodCode exampleAddRect(PdfBounds)
Adds the a closed rectangle to the current path.
Public methodCode exampleAddRect(PdfBounds, PdfPoint)
First applies a translation transform then adds the a closed rectangle to the current path. The translation remains in place after the addition.
Public methodCode exampleAddRect(PdfBounds, PdfTransform)
First applies a transform then adds the a closed rectangle to the current path. The transform remains in place after the addition.
Public methodCode exampleApplyTransformation
Applies the transform to the drawing surface. The transform will be accumulated onto any existing transformation. Previous transforms can be saved and restored via the GSave and GRestore methods in PdfPageRenderer.
Public methodCode exampleBegin
Signal that drawing operations have begun.
Public methodBeginMarkedContent
Marks a stream of PDF content with the given tag. All calls to BeginMarkedContent(String) must have a matching call to EndMarkedContent. The PDF spec does not allow nesting of marked content.
Public methodCode exampleClip(PdfFillMethod)
Reduces the clipping area of the current drawing surface by intersecting the current path with the current clipping area. Clipping is a strictly reductive process. To preserve previous clipping areas, use the GSave and GRestore methods in PdfPageRenderer.
Public methodCode exampleClip(PdfFillMethod, Boolean)
Reduces the clipping area of the current drawing surface by intersecting the current path with the current clipping area. Clipping is a strictly reductive process. To preserve previous clipping areas, use the GSave and GRestore methods in PdfPageRenderer.
Public methodCode exampleEnd
Signal that drawing on the drawing surface is complete.
Public methodEndMarkedContent
Deontes the end of a stream of PDF content marked via BeginMarkedContent(String).
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodCode exampleFill
Paints the current path using the specified fill method and color then clears the current path.
Public methodCode exampleFillAndStroke
Paints then strokes the current path using the specified parameters, then clears the current path.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodPlaceImage(String, String, PdfBounds)
Places the image on the drawing surface within the bounds provided.
Public methodPlaceImage(String, String, PdfPoint)
Places the image on the drawing surface at the given location. The image will be placed such that each pixel is 1 PDF page unit square.
Public methodPlaceImage(String, String, PdfTransform)
Places the image on the drawing surface within the bounds and transformed by the matrix provided.
Public methodPlaceTemplate(String, PdfBounds)
Places the template on the drawing surface within the bounds provided.
Public methodPlaceTemplate(String, PdfPoint)
Places the template on the drawing surface at the given location. The template will be placed such that each pixel is 1 PDF page unit square.
Public methodPlaceTemplate(String, PdfTransform)
Places the template on the drawing surface within the bounds and transformed by the matrix provided.
Public methodCode exampleStroke
Strokes the current path in the specified style and color then clears the current path.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also