Click or drag to resize

Element Class

Element is the abstract interface used to access graphical elements used to build the display list. Just like many other classes in PDFNet (e.g. ColorSpace, Font, Annot, etc), Element class follows the composite design pattern. This means that all Elements are accessed through the same interface, but depending on the Element type (that can be obtained using GetType()), only methods related to that type can be called. For example, if GetType() returns e_image, it is illegal to call a method specific to another Element type (i.e. a call to a text specific GetTextData() will throw an Exception).
Inheritance Hierarchy

Namespace:  pdftron.PDF
Assembly:  pdftron (in pdftron.dll) Version:
public sealed class Element

The Element type exposes the following members.

Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetBBox
Obtains the bounding box for a graphical element. Calculates the bounding box for a graphical element (i.e. an Element that belongs to one of following types: e_path, e_text, e_image, e_inline_image, e_shading e_form). The returned bounding box is guaranteed to encompass the Element, but is not guaranteed to be the smallest box that could contain the element. For example, for Bezier curves the bounding box will enclose all control points, not just the curve itself.
Public methodGetBitsPerComponent
Gets the bits per component.
Public methodGetCharIterator
Gets the Char iterator.
Public methodGetComponentNum
Gets the component number.
Public methodGetCTM
Gets the cTM.
Public methodGetDecodeArray
Gets the decode Array.
Public methodGetGState
Gets the g state.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetImageColorSpace
Gets Bitmap
Public methodGetImageData
Gets the image data.
Public methodGetImageDataSize
Gets the image data size.
Public methodGetImageHeight
Gets the image height.
Public methodGetImageRenderingIntent
Gets the image rendering intent.
Public methodGetImageWidth
Gets the image width.
Public methodGetMask
Gets the mask.
Public methodGetMCPropertyDict
Gets the mC property dict.
Public methodGetMCTag
Gets the mC tag.
Public methodGetNewTextLineOffset
Gets the offset (out_x, out_y) to the start of the current line relative to the beginning of the previous line. out_x and out_y are numbers expressed in unscaled text space units. The returned numbers correspond to the arguments of 'Td' operator.
Public methodGetPathData
Get the PathData stored by the path element.
Public methodGetPosAdjustment
Gets the pos adjustment.
Public methodGetShading
Gets the shading.
Public methodGetStructMCID
Gets the parent logical structure element
Public methodGetTextData
Gets the text data.
Public methodGetTextDataSize
Gets the size of the internal text buffer returned in GetTextData().
Public methodGetTextLength
Gets the text length.
Public methodGetTextMatrix
Gets the text matrix.
Public methodGetTextString
Gets the text string.
Public methodGetType
Gets the type.
Public methodGetXObject
Gets the x object.
Public methodHasTextMatrix
Checks for text matrix.
Public methodIsClippingPath
Checks if is clipping path.
Public methodIsClipWindingFill
Checks if is clip winding fill.
Public methodIsFilled
Checks if is filled.
Public methodIsImageInterpolate
Checks if is image interpolate.
Public methodIsImageMask
Checks if is image mask.
Public methodIsOCVisible
Checks if is oC visible.
Public methodIsStroked
Checks if is stroked.
Public methodIsWindingFill
Checks if is winding fill.
Public methodSetClipWindingFill
Sets clipping path's fill rule.
Public methodSetNewTextLineOffset
Sets the offset (dx, dy) to the start of the current line relative to the beginning of the previous line.
Public methodSetPathClip
Indicate whether the path is a clipping path or non-clipping path.
Public methodSetPathData
Set the PathData of this element. The PathData contains the Array of points stored by the element and the Array of path segment types.
Public methodSetPathFill
Indicate whether the path should be filled.
Public methodSetPathStroke
Indicate whether the path should be stroked.
Public methodSetPosAdjustment
Sets the pos adjustment.
Public methodSetTextData
GetTextString() maps the raw text directly into Unicode (as specified by Adobe Glyph List (AGL)). Even if you would prefer to decode text yourself it is more convenient to use CharIterators returned by CharBegin()/CharEnd() and PDF::Font code mapping methods.
Public methodSetTextMatrix(Matrix2D)
Sets the text matrix for a text element.
Public methodSetTextMatrix(Double, Double, Double, Double, Double, Double)
Sets the text matrix for a text element. This method accepts text transformation matrix components directly. A transformation matrix in PDF is specified by six numbers, usually in the form of an Array containing six elements. In its most general form, this Array is denoted [a b c d h v]; it can represent any linear transformation from one coordinate system to another. For more information about PDF matrices please refer to section 4.2.2 'Common Transformations' in PDF Reference Manual, and to documentation for Matrix2D class.
Public methodSetWindingFill
Sets path's fill rule.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUpdateTextMetrics
Recompute the Character positioning information (i.e. CharIterator-s) and text length. Element objects caches text length and Character positioning information. If the user modifies the text data or graphics state the cached information is not correct. UpdateTextMetrics() can be used to recalculate the correct positioning and length information.
See Also