3#ifndef PDFSDK_CXX_PDF_ELEMENT_H_INCLUDED_
4#define PDFSDK_CXX_PDF_ELEMENT_H_INCLUDED_
7#include <pdfsdk/cxx/math.h>
9#include "forward_declarations.h"
10#include "wrapper_base.h"
29class Element :
public detail::RefCountedHandle<PDEElement> {
96 const std::wstring& text,
100 PDColorValue fontColor,
526 PDF_CXX_CORE_WRAPPER_DEFINE_MEMBERS_(
Element, PDEElement)
531#include "element_impl.inl"
Represents a clipping path in a PDF document.
Definition clip.h:33
Represents a content array.
Definition content.h:29
Represents a PDF document.
Definition document.h:22
Represents an element of the content array.
Definition element.h:29
PDEImageAttrs GetImageAttrs() const
Gets the image attributes of the content array element.
void PathVCurveTo(const PointF &c0, const PointF &to)
Appends a cubic Bezier curve to the current point of the path. The current point is the first control...
PDAtom GetContainerTag() const
Gets the tag (name object) of a content array element, that represents a marked-content sequence (a c...
bool IsImage() const
Checks if the content array element has an image resource associated with it.
TextRun GetTextRun(size_t index) const
Gets the text run at the specified index inside the content array element.
RectF GetBBox() const
Gets the bounding box of a content array element that represents a text graphics object.
Quad GetQuad() const
Gets the quadrilateral that encloses a content array element.
void TextInsertRun(size_t index, const TextRun &run)
Inserts a text run at the specified index inside the content array element.
void SetPathPaintOp(PDEPaintOp paintOp)
Sets the path-painting operator of the content array element. See 8.5.3 Path-painting operators.
void PathRemoveSegment(size_t index)
Removes the path segment at the specified index.
void PathAddSegment(const PDEPathSegment &segment)
Adds a path segment to the path graphics object.
void SetMatrix(const Matrix &matrix)
Sets the current transformation matrix, held within the graphics state of a content array element.
void SetTextKnockout(bool knockout)
Sets the knockout state of the text inside the content array element.
void SetXObject(const XObject &xobject)
Adds an XObject resource to a content array element.
Element Copy() const
Creates a copy of the content array element.
OCMembership GetContainerOCMembership() const
Gets the optional content membership dictionary of the container content array element.
XObject GetXObject() const
Gets the XObject resource associated with the content array element.
void SetShading(const Shading &shading)
Sets the shading resource for the content array element.
static Element CreateXObject(const XObject &xobject)
Creates a content array element that represents a graphics object of the external object (XObject) ty...
Shading GetShading() const
Gets the shading resource associated with the content array element.
void TextSplitRun(size_t itemIndex, size_t charIndex)
Splits the text run at the specified item and character index inside the content array element.
Content GetContainerContent() const
Gets the content array element that represents a marked-content sequence (container) within the conte...
void SetContainerTag(PDAtom tag)
Sets the tag (name object) of a content array element, that represents a marked-content sequence (a c...
PDEElementType GetElementType() const
Gets the type of a content array element.
void SetGState(const GState &gstate)
Sets the graphics state of a content array element.
Matrix GetMatrix() const
Gets the current transformation matrix, held within the graphics state of a content array element.
static Element CreateContainer(PDAtom tag, const Object &dict)
Creates a content array element of type container that represents a marked-content sequence within th...
void TextRemoveRun(size_t index)
Removes the text run at the specified index from inside the content array element.
static Element CreateShading(const Shading &shading)
Creates a content array element that represents a shading graphics object.
static Element CreatePath()
Creates a content array element that represents a path graphics object.
bool GetTextKnockout() const
Gets the knockout state of the text inside the content array element.
size_t GetTextNumRuns() const
Gets the number of text runs inside the content array element.
Object GetContainerDict() const
Gets the dictionary (marked-content property list) associated with this container element.
static Element LayoutText(const Document &doc, const std::wstring &text, const RectF &box, const PDFontInfo &fontInfo, float fontSize, PDColorValue fontColor, PDETextAlign alignment)
Creates a content array element which is a text graphics object.
GState GetGState() const
Gets the graphics state of a content array element.
bool Equals(const Element &that) const
Checks if two content array elements are equal.
void SetClip(const Clip &clip)
Sets the clipping path associated with the graphics state of a content array element.
void PathLineTo(const PointF &to)
Appends a line segment from the current point of the path graphics object to the specified point.
void PathYCurveTo(const PointF &c1, const PointF &to)
Appends a cubic Bezier curve to the current point of the path.
static Element CreateText()
Creates a content array element that represents a text graphics object.
PDEPaintOp GetPathPaintOp() const
Gets the path-painting operator of the content array element. See 8.5.3 Path-painting operators.
void PathCurveTo(const PointF &c0, const PointF &c1, const PointF &to)
Appends a cubic Bezier curve to the current point of the path.
Clip GetClip() const
Gets the clipping path associated with the graphics state of a content array element.
size_t GetPathNumSegments() const
Gets the number of segments that a path graphics object is made of. The element is of type kPDEElemen...
void PathRect(const RectF &rect)
Appends a rectangle segment to the current point of the path.
TextRun GetTextRunAtPoint(const PointF &pagePt) const
Gets the text run at the specified point on the page.
void PathClose()
Closes the current subpath at the current point of the path.
PDEPathSegment GetPathSegment(size_t index) const
Gets the path segment from a path graphics object at the specified index.
void PathMoveTo(const PointF &to)
Moves the current path graphics object to the specified point.
bool HitTest(const PointF &point) const
Checks whether the point is located within the content array element.
void SetContainerDict(const Object &dict)
Sets the dictionary (marked-content property list) associated with this container element.
Represents the graphics state of a PDF document.
Definition gstate.h:19
Optional content membership.
Definition optional_content.h:68
Represents a PDF object.
Definition object.h:20
Represents a shading in a PDF document.
Definition shading.h:17
Represents a text run in a PDF document.
Definition text_run.h:19
Represents an XObject in a PDF document.
Definition xobject.h:22
PDETextAlign
Specifies the alignment in the inline-progression direction, of text and other content within lines o...
Definition content.h:747
PDEElementType
Specifies a marked-content sequence of graphics objects (Container), a marked-content point in the co...
Definition content.h:214