Foxit PDF SDK
|
Instance Methods | |
(BOOL) | - addClipPath:fill_mode: |
Add a path for clipping. More... | |
(BOOL) | - addClipTextObject: |
Add text object for clipping. More... | |
(BOOL) | - clearClips |
Clear all clips. More... | |
(FSGraphicsObject *) | - clone |
Clone a new graphics object. More... | |
(FSPath *) | - getClipPath: |
Get a path clip by index. More... | |
(int) | - getClipPathCount |
Get the count of path clip. More... | |
(FSFillMode) | - getClipPathFillMode: |
Get the fill mode of a path clip by index. More... | |
(FSTextObject *) | - getClipTextObject: |
Get the text object of a text clip by index. More... | |
(int) | - getClipTextObjectCount |
Get the count of text clip. More... | |
(FSFormXObject *) | - getFormXObject |
Get the form XObject graphics object if current graphics object represents a form XObject object. More... | |
(FSImageObject *) | - getImageObject |
Get the image graphics object if current graphics object represents an image object. More... | |
(FSLayerNodeArray *) | - getLayers: |
Get all the layers which are associated with current graphics object. More... | |
(FSMarkedContent *) | - getMarkedContent |
Get marked content object. More... | |
(FSPathObject *) | - getPathObject |
Get the path graphics object if current graphics object represents a path object. More... | |
(FSRectF *) | - getRect |
Get the rectangle of current graphics object. More... | |
(FSShadingObject *) | - getShadingObject |
Get the shading graphics object if current graphics object represents a shading object. More... | |
(FSTextObject *) | - getTextObject |
Get the text graphics object if current graphics object represents a text object. More... | |
(FSGraphicsObjectType) | - getType |
Get the type of current graphics object. More... | |
(BOOL) | - hasTransparency |
Check whether current graphics object has transparency or not. More... | |
(BOOL) | - removeClipPath: |
Remove a path clip by index. More... | |
(BOOL) | - removeClipTextObject: |
Remove a text clip by index for clipping. More... | |
(void) | - rotate: |
Rotate current graphics object from current state with specified angle degree in clockwise. More... | |
(BOOL) | - transform:need_transform_clippath: |
Transform current graphics object. More... | |
Properties | |
FSGraphicsObjectBlendMode | blendMode |
Get or Set the blend mode for transparent imaging model. | |
FSRectF * | clipRect |
Get or Set clip rectangle. | |
FSColorState * | colorState |
Get or Set color state. More... | |
unsigned int | fillColor |
Get or Set the fill color. More... | |
float | fillOpacity |
Get or Set the opacity value for painting operations other than stroking. | |
FSGraphState * | graphState |
Get or Set graph state. More... | |
FSMatrix2D * | matrix |
Get or Set matrix. | |
unsigned int | strokeColor |
Get or Set the stroke color. More... | |
float | strokeOpacity |
Get or Set opacity value for stroke painting operations for paths and glyph outlines. | |
Content of a PDF page usually consists of a sequence of graphics objects. Each graphics object contains its state information, data and instructions for rendering.
Class FSGraphicsObject is the base class for all types of PDF graphics objects. It offers the base functions to get/set graphics object's common properties. For concrete graphics object types, please refer to derived classes.
To get or insert/remove a graphics object, please refer to class FSGraphicsObjects.
If any change is done to a PDF graphics object, please remember to call function FSGraphicsObjects::generateContent for FSGraphicsObjects object (to which current graphics object belongs). Please refer to comment of function FSGraphicsObjects::generateContent for more details.
- (BOOL) addClipPath: | (FSPath*) | path | |
fill_mode: | (FSFillMode) | fill_mode | |
Add a path for clipping.
[in] | path | Path data to be added to current graphics object. |
[in] | fill_mode | Fill mode for the input path. Please refer to values starting from FSFillModeNone and this should be one of these values. |
- (BOOL) addClipTextObject: | (FSTextObject*) | textobject |
Add text object for clipping.
[in] | textobject | Text object to be added for clipping. |
- (BOOL) clearClips |
Clear all clips.
- (FSGraphicsObject *) clone |
Clone a new graphics object.
Newly cloned graphics object is related to the same page with current graphics object by default. Newly cloned graphics object can only be used inside the PDF file which contains current graphics object.
- (FSPath *) getClipPath: | (int) | index |
Get a path clip by index.
[in] | index | Path clip index. Valid range: from 0 to (count-1). count is returned by function FSGraphicsObject::getClipPath:. |
- (int) getClipPathCount |
Get the count of path clip.
- (FSFillMode) getClipPathFillMode: | (int) | index |
Get the fill mode of a path clip by index.
[in] | index | Path clip index. Valid range: from 0 to (count-1). count is returned by function FSGraphicsObject::getClipPath:. |
- (FSTextObject *) getClipTextObject: | (int) | index |
Get the text object of a text clip by index.
[in] | index | Text clip index. Valid range: from 0 to (count-1). count is returned by function FSGraphicsObject::getClipTextObjectCount. |
- (int) getClipTextObjectCount |
Get the count of text clip.
- (FSFormXObject *) getFormXObject |
Get the form XObject graphics object if current graphics object represents a form XObject object.
- (FSImageObject *) getImageObject |
Get the image graphics object if current graphics object represents an image object.
- (FSLayerNodeArray *) getLayers: | (FSLayerTree*) | layer_tree |
Get all the layers which are associated with current graphics object.
[in] | layer_tree | A valid layer tree. All the layer nodes in this layer tree will be enumerated in order to find which are associated with current graphics object. |
- (FSMarkedContent *) getMarkedContent |
Get marked content object.
- (FSPathObject *) getPathObject |
Get the path graphics object if current graphics object represents a path object.
- (FSRectF *) getRect |
Get the rectangle of current graphics object.
- (FSShadingObject *) getShadingObject |
Get the shading graphics object if current graphics object represents a shading object.
- (FSTextObject *) getTextObject |
Get the text graphics object if current graphics object represents a text object.
- (FSGraphicsObjectType) getType |
Get the type of current graphics object.
- (BOOL) hasTransparency |
Check whether current graphics object has transparency or not.
- (BOOL) removeClipPath: | (int) | index |
Remove a path clip by index.
[in] | index | Path clip index. Valid range: from 0 to (count-1). count is returned by function FSGraphicsObject::getClipPath:. |
- (BOOL) removeClipTextObject: | (int) | index |
Remove a text clip by index for clipping.
[in] | index | Text clip index. Valid range: from 0 to (count-1). count is returned by function FSGraphicsObject::getClipTextObjectCount. |
- (void) rotate: | (int) | angle |
Rotate current graphics object from current state with specified angle degree in clockwise.
[in] | angle | Angle degree value, which is used to rotate current graphics object from current state in clockwise. Value range: from 0 to 360. Specially, if the input value is 0 or 360 (which means not to rotate current graphics object), current function will do nothing. |
- (BOOL) transform: | (FSMatrix2D*) | matrix | |
need_transform_clippath: | (BOOL) | need_transform_clippath | |
Transform current graphics object.
[in] | matrix | Transform matrix. |
[in] | need_transform_clippath | YES means to transform clip path with current graphics object. NO means to transform current graphics object only. |
|
readwritenonatomicweak |
Get or Set color state.
Text graphics object, path graphics object, and form XObject graphics object can have color state.
|
readwritenonatomicassign |
Get or Set the fill color.
Text graphics object, path graphics object, and form XObject graphics object can have this property. Function FSGraphicsObject::colorState can be used to get fille color in other color space, like CMYK color space.
|
readwritenonatomicweak |
Get or Set graph state.
Form XObjet graphics object, path graphics object and text graphics object can have this property.
|
readwritenonatomicassign |
Get or Set the stroke color.
Text graphics object, path graphics object, and form XObject graphics object can have this property.
Function FSGraphicsObject::colorState can be used to get stroke color in other color space, like CMYK color space.