Represents a PDF content element.
More...
#include <pdfsdk/cxx/element.h>
Represents a PDF content element.
ISO 32000-2:2020 - 8.2 Graphics objects
◆ Copy()
Element PDF::Element::Copy |
( |
| ) |
const |
Creates a copy of the element.
- Returns
- The copied element.
◆ CreateContainer()
static Element PDF::Element::CreateContainer |
( |
PDAtom | tag, |
|
|
const Object & | dict ) |
|
static |
Creates a container element with the specified tag and dictionary.
- Parameters
-
tag | The tag of the container element. |
dict | The dictionary associated with the container element. |
- Returns
- The created container element.
◆ CreatePath()
static Element PDF::Element::CreatePath |
( |
| ) |
|
|
static |
Creates a path element.
- Returns
- The created path element.
◆ CreateShading()
Creates a shading element with the specified shading.
- Parameters
-
shading | The shading associated with the element. |
- Returns
- The created shading element.
◆ CreateText()
static Element PDF::Element::CreateText |
( |
| ) |
|
|
static |
Creates a text element.
- Returns
- The created text element.
◆ CreateXObject()
Creates an XObject element with the specified XObject.
- Parameters
-
xobject | The XObject associated with the element. |
- Returns
- The created XObject element.
◆ Equals()
bool PDF::Element::Equals |
( |
const Element & | that | ) |
const |
Checks if the element is equal to another element.
- Parameters
-
that | The element to compare. |
- Returns
- True if the elements are equal, false otherwise.
◆ GetBBox()
RectF PDF::Element::GetBBox |
( |
| ) |
const |
Gets the bounding box of the element.
- Returns
- The bounding box of the element.
◆ GetClip()
Clip PDF::Element::GetClip |
( |
| ) |
const |
Gets the clip associated with the element.
- Returns
- The clip associated with the element.
◆ GetContainerContent()
Content PDF::Element::GetContainerContent |
( |
| ) |
const |
Gets the content of the container element.
- Returns
- The content of the container element.
◆ GetContainerDict()
Object PDF::Element::GetContainerDict |
( |
| ) |
const |
Gets the dictionary associated with the container element.
- Returns
- The dictionary associated with the container element.
◆ GetContainerOCMembership()
OCMembership PDF::Element::GetContainerOCMembership |
( |
| ) |
const |
Gets the optional content membership of the container element.
- Returns
- The optional content membership of the container element.
◆ GetContainerTag()
PDAtom PDF::Element::GetContainerTag |
( |
| ) |
const |
Gets the tag of the container element.
- Returns
- The tag of the container element.
◆ GetElementType()
Gets the type of the element.
- Returns
- The type of the element.
◆ GetGState()
GState PDF::Element::GetGState |
( |
| ) |
const |
Gets the graphics state of the element.
- Returns
- The graphics state of the element.
◆ GetImageAttrs()
Gets the image attributes of the element.
- Returns
- The image attributes of the element.
◆ GetMatrix()
Matrix PDF::Element::GetMatrix |
( |
| ) |
const |
Gets the matrix of the element.
- Returns
- The matrix of the element.
◆ GetPathNumSegments()
size_t PDF::Element::GetPathNumSegments |
( |
| ) |
const |
Gets the number of segments in the path element.
- Returns
- The number of segments in the path element.
◆ GetPathPaintOp()
PDEPaintOp PDF::Element::GetPathPaintOp |
( |
| ) |
const |
Gets the paint operation of the path element.
- Returns
- The paint operation of the path element.
◆ GetPathSegment()
Gets the path segment at the specified index.
- Parameters
-
index | The index of the path segment. |
- Returns
- The path segment at the specified index.
◆ GetQuad()
Quad PDF::Element::GetQuad |
( |
| ) |
const |
Gets the quad associated with the element.
- Returns
- The quad associated with the element.
◆ GetShading()
Shading PDF::Element::GetShading |
( |
| ) |
const |
Gets the shading associated with the element.
- Returns
- The shading associated with the element.
◆ GetTextKnockout()
bool PDF::Element::GetTextKnockout |
( |
| ) |
const |
Gets the knockout state of the text element.
- Returns
- True if the text element has knockout, false otherwise.
◆ GetTextNumRuns()
size_t PDF::Element::GetTextNumRuns |
( |
| ) |
const |
Gets the number of text runs in the element.
- Returns
- The number of text runs.
◆ GetTextRun()
TextRun PDF::Element::GetTextRun |
( |
size_t | index | ) |
const |
Gets the text run at the specified index.
- Parameters
-
index | The index of the text run. |
- Returns
- The text run at the specified index.
◆ GetTextRunAtPoint()
TextRun PDF::Element::GetTextRunAtPoint |
( |
const PointF & | pagePt | ) |
const |
Gets the text run at the specified point on the page.
- Parameters
-
pagePt | The point on the page. |
- Returns
- The text run at the specified point.
◆ GetXObject()
XObject PDF::Element::GetXObject |
( |
| ) |
const |
Gets the XObject associated with the element.
- Returns
- The XObject associated with the element.
◆ HitTest()
bool PDF::Element::HitTest |
( |
const PointF & | point | ) |
const |
Performs a hit test on the element at the specified point.
- Parameters
-
- Returns
- True if the point is within the element, false otherwise.
◆ IsImage()
bool PDF::Element::IsImage |
( |
| ) |
const |
Checks if the element is an image.
- Returns
- True if the element is an image, false otherwise.
◆ LayoutText()
static Element PDF::Element::LayoutText |
( |
const Document & | doc, |
|
|
const std::wstring & | text, |
|
|
const RectF & | box, |
|
|
const PDFontInfo & | fontInfo, |
|
|
float | fontSize, |
|
|
PDColorValue | fontColor, |
|
|
PDETextAlign | alignment ) |
|
static |
Layouts text within a specified box using the given font information.
- Parameters
-
doc | The document containing the text. |
text | The text to layout. |
box | The bounding box for the text. |
fontInfo | The font information. |
fontSize | The font size. |
fontColor | The font color. |
alignment | The text alignment. |
- Returns
- The layouted text element.
◆ PathAddSegment()
Adds a path segment to the path element.
- Parameters
-
segment | The path segment to add. |
◆ PathClose()
void PDF::Element::PathClose |
( |
| ) |
|
Closes the current subpath of the path element.
◆ PathCurveTo()
void PDF::Element::PathCurveTo |
( |
const PointF & | c0, |
|
|
const PointF & | c1, |
|
|
const PointF & | to ) |
Adds a cubic Bezier curve segment to the path element.
- Parameters
-
c0 | The first control point. |
c1 | The second control point. |
to | The end point of the curve. |
◆ PathLineTo()
void PDF::Element::PathLineTo |
( |
const PointF & | to | ) |
|
Adds a line segment from the current point of the path element to the specified point.
- Parameters
-
to | The point to draw the line to. |
◆ PathMoveTo()
void PDF::Element::PathMoveTo |
( |
const PointF & | to | ) |
|
Moves the current point of the path element to the specified point.
- Parameters
-
◆ PathRect()
void PDF::Element::PathRect |
( |
const RectF & | rect | ) |
|
Adds a rectangle segment to the path element.
- Parameters
-
rect | The rectangle to add. |
◆ PathRemoveSegment()
void PDF::Element::PathRemoveSegment |
( |
size_t | index | ) |
|
Removes the path segment at the specified index.
- Parameters
-
index | The index of the path segment to remove. |
◆ PathVCurveTo()
void PDF::Element::PathVCurveTo |
( |
const PointF & | c0, |
|
|
const PointF & | to ) |
Adds a vertical cubic Bezier curve segment to the path element.
- Parameters
-
c0 | The control point. |
to | The end point of the curve. |
◆ PathYCurveTo()
void PDF::Element::PathYCurveTo |
( |
const PointF & | c1, |
|
|
const PointF & | to ) |
Adds a cubic Bezier curve segment to the path element in the Y direction.
- Parameters
-
c1 | The first control point in the Y direction. |
to | The end point of the curve in the Y direction. |
◆ SetClip()
void PDF::Element::SetClip |
( |
const Clip & | clip | ) |
|
Sets the clip for the element.
- Parameters
-
◆ SetContainerDict()
void PDF::Element::SetContainerDict |
( |
const Object & | dict | ) |
|
Sets the dictionary for the container element.
- Parameters
-
dict | The dictionary to set. |
◆ SetContainerTag()
void PDF::Element::SetContainerTag |
( |
PDAtom | tag | ) |
|
Sets the tag for the container element.
- Parameters
-
◆ SetGState()
void PDF::Element::SetGState |
( |
const GState & | gstate | ) |
|
Sets the graphics state for the element.
- Parameters
-
gstate | The graphics state to set. |
◆ SetMatrix()
void PDF::Element::SetMatrix |
( |
const Matrix & | matrix | ) |
|
Sets the matrix for the element.
- Parameters
-
◆ SetPathPaintOp()
void PDF::Element::SetPathPaintOp |
( |
PDEPaintOp | paintOp | ) |
|
Sets the paint operation for the path element.
- Parameters
-
paintOp | The paint operation to set. |
◆ SetShading()
void PDF::Element::SetShading |
( |
const Shading & | shading | ) |
|
Sets the shading for the element.
- Parameters
-
shading | The shading to set. |
◆ SetTextKnockout()
void PDF::Element::SetTextKnockout |
( |
bool | knockout | ) |
|
Sets the knockout state of the text element.
- Parameters
-
knockout | The knockout state to set. |
◆ SetXObject()
void PDF::Element::SetXObject |
( |
const XObject & | xobject | ) |
|
Sets the XObject for the element.
- Parameters
-
xobject | The XObject to set. |
◆ TextInsertRun()
void PDF::Element::TextInsertRun |
( |
size_t | index, |
|
|
const TextRun & | run ) |
Inserts a text run at the specified index.
- Parameters
-
index | The index to insert the text run. |
run | The text run to insert. |
◆ TextRemoveRun()
void PDF::Element::TextRemoveRun |
( |
size_t | index | ) |
|
Removes the text run at the specified index.
- Parameters
-
index | The index of the text run to remove. |
◆ TextSplitRun()
void PDF::Element::TextSplitRun |
( |
size_t | itemIndex, |
|
|
size_t | charIndex ) |
Splits the text run at the specified item and character index.
- Parameters
-
itemIndex | The index of the text run. |
charIndex | The index of the character within the text run. |
The documentation for this class was generated from the following file: