Comprehensive Guide for Developers: Features, Integration, and API Reference
Represents a clipping path in a PDF document. More...
#include <pdfsdk/cxx/clip.h>
Public Member Functions | |
| RectF | GetBBox () const |
| size_t | GetNumElements () const |
| Element | GetElement (size_t index) const |
| void | InsertElement (size_t index, const Element &element) |
| void | AppendElement (const Element &element) |
| void | RemoveElement (size_t index) |
| Clip (PDEClip handle, bool adopt=false) noexcept | |
| Clip (const Clip &rhs) noexcept | |
| Clip & | operator= (const Clip &rhs) noexcept |
| Clip (Clip &&rhs) noexcept | |
| Clip & | operator= (Clip &&rhs) noexcept |
Represents a clipping path in a PDF document.
Clipping is a graphical operation that defines a restricted area where content can be displayed, preventing anything outside that area from being rendered. The area that remains visible is defined by the clipping path. The clipping path is constructed from a combination of geometric and drawing elements that define its shape and boundaries. The content within the boundary (text, images, or graphics) will remain visible. Elements can be added to a clipping path to construct it or removed from an existing path to modify it. A document can have an unlimited number of clipping paths, as clipping paths are applied dynamically to specific graphical objects within the graphics state. Each object (text, image, or shape) can have its own clipping path, and the total number is only constrained by the size and complexity of the document.
For more information refer to section 8.5.4 Clipping path operators, from the ISO 32000-2:2020 (PDF 2.0) Standard.
| void PDF::Clip::AppendElement | ( | const Element & | element | ) |
Append an element to the end of the clipping path.
| element | The element to append. |
| RectF PDF::Clip::GetBBox | ( | ) | const |
Get the bounding box that contains a clipping path.
| Element PDF::Clip::GetElement | ( | size_t | index | ) | const |
Get the element at the specified index in the clipping path.
| index | The index of the element to retrieve. |
| size_t PDF::Clip::GetNumElements | ( | ) | const |
Get the number of elements in the clipping path.
| void PDF::Clip::InsertElement | ( | size_t | index, |
| const Element & | element ) |
Insert an element at the specified index in the clipping path.
| index | The index at which to insert the element. |
| element | The element to insert. |
| void PDF::Clip::RemoveElement | ( | size_t | index | ) |
Remove an element at the specified index from the clipping path.
| index | The index of the element to remove. |