Public Types | |
enum | UsageType { UsageType.e_UsageView = 0x0000, UsageType.e_UsageDesign = 0x0001, UsageType.e_UsagePrint = 0x0002, UsageType.e_UsageExport = 0x0003, UsageType.e_UsageZoom = 0x0004 } |
Enumeration for PDF layer usage type. More... | |
Public Member Functions | |
LayerContext (PDFDoc document, LayerContext.UsageType usage_type) | |
Constructor, based on a PDF document and specified layer usage type. More... | |
LayerContext (LayerContext other) | |
Constructor, with another LayerContext object. | |
bool | CopyStates (LayerContext source_context) |
Copy states from another layer context. More... | |
PDFDoc | GetDocument () |
Get the related PDF document. More... | |
LayerContext.UsageType | GetUsageType () |
Get the layer usage type for rendering. More... | |
bool | IsEmpty () |
Check whether current object is empty or not. More... | |
bool | IsVisible (LayerNode layer) |
Check if a specified layer node is visible in current layer context. More... | |
bool | MergeStates (LayerContext source_context) |
Merge states from another layer context. More... | |
bool | Reset () |
Reset current layer context, back to the initialized state. More... | |
bool | SetVisible (LayerNode layer, bool is_visible) |
Set the visibility of a specified layer node in current layer context. More... | |
This class represents a layer context for rendering. If user wants to render layers, please construct a LayerContext first and then set it to a common::Renderer object by function common::Renderer::SetLayerContext.
|
strong |
Enumeration for PDF layer usage type.
Values of this enumeration should be used alone.
|
inline |
Constructor, based on a PDF document and specified layer usage type.
document | A valid PDF document object. |
usage_type | Layer usage type. Please refer to e_UsageXXX values and it should be one of these values except e_UsageZoom. |
|
inline |
Copy states from another layer context.
source_context | The source layer context, whose state will be copied to current layer context. |
|
inline |
Get the related PDF document.
|
inline |
Get the layer usage type for rendering.
|
inline |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
|
inline |
Check if a specified layer node is visible in current layer context.
layer | A layer node. It should belong to the same PDF document which is related to current layer context. |
|
inline |
Merge states from another layer context.
source_context | The source layer context, whose state will be merged to current layer context. |
|
inline |
Reset current layer context, back to the initialized state.
|
inline |
Set the visibility of a specified layer node in current layer context.
layer | A layer node. It should belong to the same PDF document which is related to current layer context. |
is_visible | true means visible, and false means invisible. |