PdfVisualContentElement Class
Represents a base class for a PDF content element that has a visual representation.
public abstract class PdfVisualContentElement : PdfContentElement
Public MustInherit Class PdfVisualContentElement
Inherits PdfContentElement
- Inheritance:
- System.ObjectPdfVisualContentElement
- Derived
Properties
Bounds
Gets the bounds of the PdfVisualContentElement.
public abstract PdfQuad Bounds { get; }
Public MustOverride ReadOnly Property Bounds As PdfQuad
Property Value
The bounds of the PdfVisualContentElement.
Remarks
This member, although exposed as a property for easier debugging, performs complex calculations, so instead of accessing it frequently, cache its result instead.
Format
Gets or sets the formatting properties applied to the PdfVisualContentElement.
Property Value
The formatting properties applied to the PdfVisualContentElement.
Remarks
This property always returns a new instance of a PdfContentFormat that points to data associated with this PdfVisualContentElement. This reduces memory footprint since simpler internal structures can be used to hold the data and execution time increase is negligible since Garbage Collector has a very good performance for a short-lived (Generation 0) objects.
When setting a value, instance of a PdfContentFormat won't actually be stored in this PdfVisualContentElement, but the data to which the instance points to will be copied. This enables easy copying of a set of formatting properties from one PdfVisualContentElement to another.
Also, when setting a value on a PdfTextContent, the actual font and size (retrieved with GetFont(out Double) method) remain unchanged because new font might not contain all the necessary information to correctly position, render and/or convert to Unicode all characters of the PdfTextContent. As a workaround, set font and size directly by using SetFont(PdfBasicFont, Double) method.
If value that is being set comes from a PdfVisualContentElement that is contained in another PdfDocument, this property setter will automatically clone all PdfContentResources (PdfBasicFonts, PdfPatterns, PdfShadings, and PdfColorSpaces) contained in the PdfContentFormat and associate the clones with the current PdfDocument.
See Also
Transform
Gets or sets the transformation from the new (transformed) coordinate system to the original (untransformed) coordinate system.
All coordinates used after the transformation are expressed in the transformed coordinate system.
tip
Before setting the Transform, move PdfVisualContentElement into its own PdfContentGroup so that the transformation is confined to that PdfContentGroup and doesn't have any effect on PdfContentElements outside that PdfContentGroup.
Property Value
The transformation from the new (transformed) coordinate system to the original (untransformed) coordinate system.
Inherited Properties
Collection | Gets the PdfContentElementCollection that the PdfContentElement belongs to. (Inherited from PdfContentElement) |
ElementType | Gets the type of the PDF content element. (Inherited from PdfContentElement) |
Next | Gets the next PdfContentElement in the Collection. (Inherited from PdfContentElement) |
Previous | Gets the previous PdfContentElement in the Collection. (Inherited from PdfContentElement) |