Foxit PDF SDK

Instance Methods | List of all members
FSLayerContext Class Reference
Inheritance diagram for FSLayerContext:

## Instance Methods
(BOOL) | - copyStates:
| Copy states from another layer context. More...
(FSPDFDoc *) | - getDocument
| Get the related PDF document. More...
(FSLayerContextUsageType) | - getUsageType
| Get the layer usage type for rendering. More...
(id) | - initWithDocument:usage_type:
| Constructor, based on a PDF document and specified layer usage type. More...
(id) | - initWithOther:
| Constructor, with another layer context object. More...
(BOOL) | - isEmpty
| Check whether current object is empty or not. More...
(BOOL) | - isVisible:
| Check if a specified layer node is visible in current layer context. More...
(BOOL) | - mergeStates:
| Merge states from another layer context. More...
(BOOL) | - reset
| Reset current layer context, back to the initialized state. More...
(BOOL) | - setVisible: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 FSRenderer object by function FSRenderer::setLayerContext:.

See also
  FSRenderer

## Method Documentation

## ◆ copyStates:()

- (BOOL) copyStates: |  | (FSLayerContext*) | source_context |

Copy states from another layer context.

Parameters

  [in] | source_context | The source layer context, whose state will be copied to current layer context.

Returns
  YES means success, while NO means failure.

## ◆ getDocument()

- (FSPDFDoc *) getDocument |  |  |

Get the related PDF document.

Returns
  The related PDF document object.

## ◆ getUsageType()

- (FSLayerContextUsageType) getUsageType |  |  |

Get the layer usage type for rendering.

Returns
  Layer usage type. Please refer to values starting from FSLayerContextUsageView and this would be one of these values except FSLayerContextUsageZoom.

## ◆ initWithDocument:usage_type:()

- (id) initWithDocument: |  | (FSPDFDoc*) | document
usage_type: |  | (FSLayerContextUsageType) | usage_type

Constructor, based on a PDF document and specified layer usage type.

Parameters

  [in] | document | A valid PDF document object.
  [in] | usage_type | Layer usage type. Please refer to values starting from FSLayerContextUsageView and this should be one of these values except FSLayerContextUsageZoom.

## ◆ initWithOther:()

- (id) initWithOther: |  | (FSLayerContext*) | other |

Constructor, with another layer context object.

Parameters

  [in] | other | Another layer context object.

## ◆ isEmpty()

- (BOOL) isEmpty |  |  |

Check whether current object is empty or not.

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

Returns
  YES means current object is empty, while NO means not.

## ◆ isVisible:()

- (BOOL) isVisible: |  | (FSLayerNode*) | layer |

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

Parameters

  [in] | layer | A layer node. It should belong to the same PDF document which is related to current layer context.

Returns
  YES means the layer node is visible, while NO means the layer node is invisible.

## ◆ mergeStates:()

- (BOOL) mergeStates: |  | (FSLayerContext*) | source_context |

Merge states from another layer context.

Parameters

  [in] | source_context | The source layer context, whose state will be merged to current layer context.

Returns
  YES means success, while NO means failure.

## ◆ reset()

- (BOOL) reset |  |  |

Reset current layer context, back to the initialized state.

Returns
  YES means success, while NO means failure.

## ◆ setVisible:is_visible:()

- (BOOL) setVisible: |  | (FSLayerNode*) | layer
is_visible: |  | (BOOL) | is_visible

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

Parameters

  [in] | layer | A layer node. It should belong to the same PDF document which is related to current layer context.
  [in] | is_visible | YES means visible, and NO means invisible.

Returns
  YES means the layer node is visible, while NO means the layer node is invisible.