Class Watermark
Represents the report page watermark.
Inheritance
Namespace: FastReport
Assembly: FastReport.dll
Syntax
[TypeConverter(typeof(FRExpandableObjectConverter))]
public class Watermark : IDisposable
Remarks
Watermark can draw text and/or image behind the page objects on in front of them. To enable watermark, set its Enabled property to true.
Constructors
Watermark()
Initializes a new instance of the Watermark class with default settings.
Declaration
public Watermark()
Properties
Enabled
Gets or sets avalue indicating that watermark is enabled.
Declaration
public bool Enabled { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Font
Gets or sets a font of the watermark text.
Declaration
public Font Font { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Drawing.Font |
Image
Gets or sets the watermark image.
Declaration
public Image Image { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Drawing.Image |
ImageSize
Gets or sets the watermark image size mode.
Declaration
public WatermarkImageSize ImageSize { get; set; }
Property Value
| Type | Description |
|---|---|
| WatermarkImageSize |
ImageTransparency
Gets or sets an image transparency.
Declaration
public float ImageTransparency { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single |
Remarks
Valid values are 0..1. 1 means totally transparent image.
PictureObject
Declaration
public PictureObject PictureObject { get; set; }
Property Value
| Type | Description |
|---|---|
| PictureObject |
ShowImageOnTop
Gets or sets a value indicates that the image should be displayed on top of all page objects.
Declaration
public bool ShowImageOnTop { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
ShowTextOnTop
Gets or sets a value indicates that the text should be displayed on top of all page objects.
Declaration
public bool ShowTextOnTop { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Text
Gets or sets the watermark text.
Declaration
public string Text { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
TextFill
Gets or sets a text fill.
Declaration
public FillBase TextFill { get; set; }
Property Value
| Type | Description |
|---|---|
| FillBase |
TextRotation
Gets or sets a text rotation.
Declaration
public WatermarkTextRotation TextRotation { get; set; }
Property Value
| Type | Description |
|---|---|
| WatermarkTextRotation |
Methods
Assign(Watermark)
Assigns values from another source.
Declaration
public void Assign(Watermark source)
Parameters
| Type | Name | Description |
|---|---|---|
| Watermark | source | Source to assign from. |
Clone()
Creates exact copy of this Watermark.
Declaration
public Watermark Clone()
Returns
| Type | Description |
|---|---|
| Watermark | Copy of this watermark. |
Dispose()
Disposes resources used by the watermark.
Declaration
public void Dispose()
DrawImage(FRPaintEventArgs, RectangleF, Report, Boolean)
Draws watermark image.
Declaration
public virtual void DrawImage(FRPaintEventArgs e, RectangleF displayRect, Report report, bool isPrinting)
Parameters
| Type | Name | Description |
|---|---|---|
| FRPaintEventArgs | e | |
| System.Drawing.RectangleF | displayRect | |
| Report | report | |
| System.Boolean | isPrinting |
DrawText(FRPaintEventArgs, RectangleF, Report, Boolean)
Draws watermark text.
Declaration
public void DrawText(FRPaintEventArgs e, RectangleF displayRect, Report report, bool isPrinting)
Parameters
| Type | Name | Description |
|---|---|---|
| FRPaintEventArgs | e | |
| System.Drawing.RectangleF | displayRect | |
| Report | report | |
| System.Boolean | isPrinting |
Serialize(FRWriter, String, Watermark)
Serializes the watermark.
Declaration
public void Serialize(FRWriter writer, string prefix, Watermark c)
Parameters
| Type | Name | Description |
|---|---|---|
| FRWriter | writer | Writer object. |
| System.String | prefix | The watermark property name. |
| Watermark | c | Another Watermark object to compare with. |
Remarks
This method is for internal use only.