DrawingTemplate Class |
Namespace: Atalasoft.PdfDoc.Generating.Templates
The DrawingTemplate type exposes the following members.
Name | Description | |
---|---|---|
DrawingTemplate(PdfBounds) |
Initializes a new instance of the DrawingTemplate class with the supplied bounds.
| |
DrawingTemplate(Double, Double) |
Initializes a new instance of the DrawingTemplate class with the supplied width and height.
|
Name | Description | |
---|---|---|
Bounds |
Gets or sets the bounds for the template. All drawing will be limited to the interior of the bounds.
| |
ColorSpace |
Gets or sets the color space preferred by the template. In general, this is used by the PDF viewer when the
template is rendered transparently. In such a case, the template will be rendered to this color space before
compositing with other elements.
| |
DrawingList |
Gets the drawing list that represents shapes in the template.
| |
ICCResourceName |
Gets or sets the name of the ICC resource to be used as a ColorSpace if the template should be rendered
with a calibrated color space.
| |
ImportedFonts |
If the template was imported from an existing PDF, this will contain a list of fonts that were successfully imported
into the resource dictionary.
| |
Kind |
Gets or sets the kind of drawing template. Currently only Normal or Transparency are supported.
| |
TransformationMatrix |
Gets or sets the transformation matrix that maps the coordinates of elements in the template to the surface
on which it's drawn. The default is the identity matrix.
| |
TransparencyIsIsolated |
Gets or sets a value indicating whether transparency for this template will be isolated from the rest of the backdrop.
| |
TransparencyIsKnockout |
Gets or sets a value indicating whether transparency is a knockout, meaning that it will be composited with
the template's backdrop rather than preceding elements in the template.
|
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
DrawingTemplate template = new DrawingTemplate(new PdfBounds(0, 0, 100, 100)); PdfPath path = new PdfPath(PdfColorFactory.FromRgb(0, 0, 0), 2, PdfColorFactory.FromRgb(1, 1, 0)); path.MoveTo(2, 2); path.LineTo(98, 2); path.LineTo(50, 98); path.Close(); template.DrawingList.Add(path); string resourceName = doc.Resources.Templates.Add(template); PdfTemplateShape shape = new PdfTemplateShape(resourceName, template.Bounds); page.DrawingList.Add(shape); // this puts the template on the page