Foxit PDF SDK
fsdk.LayerContext Class Reference

Public Member Functions

def CopyStates (source_context)
 Copy states from another layer context. More...
 
def GetDocument ()
 Get the related PDF document. More...
 
def GetUsageType ()
 Get the layer usage type for rendering. More...
 
def IsEmpty ()
 Check whether current object is empty or not. More...
 
def IsVisible (layer)
 Check if a specified layer node is visible in current layer context. More...
 
def MergeStates (source_context)
 Merge states from another layer context. More...
 
def Reset ()
 Reset current layer context, back to the initialized state. More...
 
def SetVisible (layer, is_visible)
 Set the visibility of a specified layer node in current layer context. More...
 

Detailed Description

This class represents a layer context for rendering. If user wants to render layers, please construct a layer context object first and then set it to a fsdk.Renderer object by function fsdk.Renderer.SetLayerContext .

See also
fsdk.Renderer

Member Function Documentation

◆ CopyStates()

def fsdk.LayerContext.CopyStates (   source_context)

Copy states from another layer context.

Parameters
[in]source_contextThe source layer context, whose state will be copied to current layer context.
Returns
true means success, while false means failure.

◆ GetDocument()

def fsdk.LayerContext.GetDocument ( )

Get the related PDF document.

Returns
The related PDF document object.

◆ GetUsageType()

def fsdk.LayerContext.GetUsageType ( )

Get the layer usage type for rendering.

Returns
Layer usage type. Please refer to values starting from fsdk.LayerContextE_UsageView and this would be one of these values except fsdk.LayerContextE_UsageZoom .

◆ IsEmpty()

def fsdk.LayerContext.IsEmpty ( )

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
true means current object is empty, while false means not.

◆ IsVisible()

def fsdk.LayerContext.IsVisible (   layer)

Check if a specified layer node is visible in current layer context.

Parameters
[in]layerA layer node. It should belong to the same PDF document which is related to current layer context.
Returns
true means the layer node is visible, while false means the layer node is invisible.

◆ MergeStates()

def fsdk.LayerContext.MergeStates (   source_context)

Merge states from another layer context.

Parameters
[in]source_contextThe source layer context, whose state will be merged to current layer context.
Returns
true means success, while false means failure.

◆ Reset()

def fsdk.LayerContext.Reset ( )

Reset current layer context, back to the initialized state.

Returns
true means success, while false means failure.

◆ SetVisible()

def fsdk.LayerContext.SetVisible (   layer,
  is_visible 
)

Set the visibility of a specified layer node in current layer context.

Parameters
[in]layerA layer node. It should belong to the same PDF document which is related to current layer context.
[in]is_visibletrue means visible, and false means invisible.
Returns
true means the layer node is visible, while false means the layer node is invisible.