|
Foxit PDF SDK
|
Inherits SystemIDisposable.
Public Types | |
| enum | Flags { Flags.e_FlagASPageContents = 0x0000, Flags.e_FlagASAnnot = 0x0001, Flags.e_FlagOnTop = 0x0002, Flags.e_FlagNoPrint = 0x0004, Flags.e_FlagInvisible = 0x0008, Flags.e_FlagShareImageStream = 0x0010, Flags.e_FlagShareTextStream = 0x0020, Flags.e_FlagSharePageStream = 0x0040 } |
| Enumeration for watermark setting flags. More... | |
Public Member Functions | |
| WatermarkSettings (Position position, float offset_x, float offset_y, int flags, float scale_x, float scale_y, float rotation, int opacity, bool is_offset_centered, float relative_scale_to_page) | |
| Constructor, with parameters. More... | |
| WatermarkSettings () | |
| Constructor. | |
| WatermarkSettings (WatermarkSettings settings) | |
| Constructor, with another watermark settings object. More... | |
| void | Set (Position position, float offset_x, float offset_y, int flags, float scale_x, float scale_y, float rotation, int opacity, bool is_offset_centered, float relative_scale_to_page) |
| Set value. More... | |
Properties | |
| int | flags [get, set] |
| Watermark flags. More... | |
| bool | is_offset_centered [get, set] |
| If true, position is invaild, and offset is the centered of the watermark. If false, offset is relative to the position. | |
| float | offset_x [get, set] |
| Horizontal offset, in points. | |
| float | offset_y [get, set] |
| Vertical offset, in points. | |
| int | opacity [get, set] |
| Opacity in percents. Valid range: from 0 to 100. 0 for fully transparent and 100 for fully opaque. | |
| Position | position [get, set] |
| Watermark position. More... | |
| float | relative_scale_to_page [get, set] |
| Relative scale to target page. Valid range: from 0 to 1 (exclusive of 0). If the value is 0 or greater than 1, this feature is disabled and scale_x/scale_y will be used instead. Default value: 0 (disabled). | |
| float | rotation [get, set] |
| Rotation angle in degrees. | |
| float | scale_x [get, set] |
| Horizontal scale coefficient. It should be greater than 0.001f. | |
| float | scale_y [get, set] |
| Vertical scale coefficient. It should be greater than 0.001f. | |
This class represents the watermark settings used to construct a watermark object from any supported resource.
此类表示和OFD水印相关的位置属性。
|
strong |
Enumeration for watermark setting flags.
Values of this enumeration can be used alone or in combination. For more details about form xobjects, please refer to Section 4.9 "Form XObjects" in <PDF Reference 1.7>.
|
inline |
Constructor, with parameters.
| [in] | position | Watermark position. Please refer to values starting from foxit.common.Position.e_PosTopLeft and this should be one of these values. |
| [in] | offset_x | Horizontal offset, in points. |
| [in] | offset_y | Vertical offset, in points. |
| [in] | flags | Watermark flags. Please refer to values starting from foxit.pdf.WatermarkSettings.Flags.e_FlagASPageContents and this can be one or a combination of these values. |
| [in] | scale_x | Horizontal scale coefficient. It should be greater than 0.001f. |
| [in] | scale_y | Vertical scale coefficient. It should be greater than 0.001f. |
| [in] | rotation | Rotation angle in degrees. |
| [in] | opacity | Opacity in percents. Valid range: from 0 to 100. 0 for fully transparent and 100 for fully opaque. |
| [in] | is_offset_centered | A boolean value which indicates whether offset is based on the watermark center. true means that the offset is based on the watermark center and the position will be ignored. false means not. |
| [in] | relative_scale_to_page | Relative scale to target page. Valid range: from 0 to 1 (exclusive of 0). If the value is 0 or greater than 1, this feature is disabled and scale_x/scale_y will be used instead. |
|
inline |
Constructor, with another watermark settings object.
构造函数,通过另一个水印位置属性对象。
| [in] | settings | Another watermark settings object. |
| [in] | settings | 另一个水印位置属性对象。 |
|
inline |
Set value.
| [in] | position | Watermark position. Please refer to values starting from foxit.common.Position.e_PosTopLeft and this should be one of these values. |
| [in] | offset_x | Horizontal offset, in points. |
| [in] | offset_y | Vertical offset, in points. |
| [in] | flags | Watermark flags. Please refer to values starting from foxit.pdf.WatermarkSettings.Flags.e_FlagASPageContents and this can be one or a combination of these values. |
| [in] | scale_x | Horizontal scale coefficient. It should be greater than 0.001f. |
| [in] | scale_y | Vertical scale coefficient. It should be greater than 0.001f. |
| [in] | rotation | Rotation angle in degrees. |
| [in] | opacity | Opacity in percents. Valid range: from 0 to 100. 0 for fully transparent and 100 for fully opaque. |
| [in] | is_offset_centered | A boolean value which indicates whether offset is based on the watermark center. true means that the offset is based on the watermark center and the position will be ignored. false means not. |
| [in] | relative_scale_to_page | Relative scale to target page. Valid range: from 0 to 1 (exclusive of 0). If the value is 0 or greater than 1, this feature is disabled and scale_x/scale_y will be used instead. |
|
getset |
Watermark flags.
Please refer to values starting from foxit.pdf.WatermarkSettings.Flags.e_FlagASPageContents and this can be one or a combination of these values.
|
getset |
Watermark position.
Please refer to values starting from foxit.common.Position.e_PosTopLeft and this should be one of these values.