Foxit PDF SDK
|
Public Types | |
enum | UsageState { e_StateON = 0x0000, e_StateOFF = 0x0001, e_StateUnchanged = 0x0002, e_StateUndefined = 0x0003 } |
Enumeration for PDF layer base state. More... | |
Public Member Functions | |
LayerTree (const PDFDoc &document) | |
Constructor, from a PDF document. More... | |
LayerTree (const LayerTree &other) | |
Constructor, with another layer tree object. More... | |
~LayerTree () | |
Destructor. | |
objects::PDFDictionary * | GetDict () const |
Get the dictionary of current object. More... | |
objects::PDFArray * | GetOCGs () const |
Get the "OCGs" PDF array from current object. More... | |
LayerNode | GetRootNode () |
Get the root layer node. More... | |
bool | IsEmpty () const |
Check whether current object is empty or not. More... | |
bool | operator != (const LayerTree &other) const |
Not equal operator. More... | |
LayerTree & | operator= (const LayerTree &other) |
Assign operator. More... | |
bool | operator== (const LayerTree &other) const |
Equal operator. More... | |
bool | SetBaseState (UsageState state) |
Set the base state for all layers in the default configuration. More... | |
![]() | |
FS_HANDLE | Handle () const |
Get the handle of current object. More... | |
PDF layer nodes are stored in a PDF layer tree. If user wants to retrieve a layer node, user must construct a layer tree object from a PDF document first and then call function LayerTree::GetRootNode to get the root layer node of the whole layer tree. Then, user can enumerate all the nodes in the layer tree from the root layer node.
|
explicit |
Constructor, from a PDF document.
The constructed layer tree object can be associated with existed layer tree in PDF document. If there is no layer tree in PDF document which can be judged by functoin PDFDoc::HasLayer, the constructed layer tree object will build layer related dictionary.
[in] | document | A valid PDF document object. |
foxit::pdf::LayerTree::LayerTree | ( | const LayerTree & | other | ) |
Constructor, with another layer tree object.
[in] | other | Another layer tree object. |
objects::PDFDictionary* foxit::pdf::LayerTree::GetDict | ( | ) | const |
Get the dictionary of current object.
objects::PDFArray* foxit::pdf::LayerTree::GetOCGs | ( | ) | const |
Get the "OCGs" PDF array from current object.
LayerNode foxit::pdf::LayerTree::GetRootNode | ( | ) |
Get the root layer node.
After getting the root layer node, user can enumerate all layer nodes in current layer tree by functions of class LayerNode.
bool foxit::pdf::LayerTree::IsEmpty | ( | ) | const |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
bool foxit::pdf::LayerTree::operator != | ( | const LayerTree & | other | ) | const |
Not equal operator.
[in] | other | Another layer tree object. This function will check if current object is not equal to this one. |
Assign operator.
[in] | other | Another layer tree object, whose value would be assigned to current object. |
bool foxit::pdf::LayerTree::operator== | ( | const LayerTree & | other | ) | const |
Equal operator.
[in] | other | Another layer tree object. This function will check if current object is equal to this one. |
bool foxit::pdf::LayerTree::SetBaseState | ( | UsageState | state | ) |
Set the base state for all layers in the default configuration.
If user wants the new state to have effect on rendering result, please construct a new layer context object after this function succeeds, and then use the new LayerContext to Renderer to do rendering.
[in] | state | Layer usage state. Please refer to values starting from LayerTree::e_StateON and this should be one of these values except LayerTree::e_StateUndefined. |