Class TextureFill
Class represents the Texture fill.
Namespace: FastReport
Assembly: FastReport.Base.dll
Syntax
public class TextureFill : FillBase
Constructors
TextureFill()
Initializes the TextureFill class with default texture.
Declaration
public TextureFill()
TextureFill(Byte[])
Initializes the TextureFill class with specified image.
Declaration
public TextureFill(byte[] imageBytes)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | imageBytes |
TextureFill(Byte[], Int32, Int32, Boolean, WrapMode, Int32, Int32)
Initializes the TextureFill class with specified image.
Declaration
public TextureFill(byte[] imageBytes, int width, int height, bool preserveAspectRatio, WrapMode wrapMode, int imageOffsetX, int imageOffsetY)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | imageBytes | |
| System.Int32 | width | |
| System.Int32 | height | |
| System.Boolean | preserveAspectRatio | |
| WrapMode | wrapMode | |
| System.Int32 | imageOffsetX | |
| System.Int32 | imageOffsetY |
Properties
ImageData
Gets or sets the image data
Declaration
public byte[] ImageData { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Byte[] |
ImageHeight
Gets or sets the image height
Declaration
public int ImageHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
ImageIndex
Gets or sets the image index
Declaration
public int ImageIndex { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
ImageOffsetX
Image left offset
Declaration
public int ImageOffsetX { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
ImageOffsetY
Image top offset
Declaration
public int ImageOffsetY { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
ImageWidth
Gets or sets the image width
Declaration
public int ImageWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
IsTransparent
Returns true if Color = Transparent
Declaration
public override bool IsTransparent { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Overrides
PreserveAspectRatio
Gets or sets value, indicating that image should preserve aspect ratio
Declaration
public bool PreserveAspectRatio { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
WrapMode
Gets or sets the texture wrap mode
Declaration
public WrapMode WrapMode { get; set; }
Property Value
| Type | Description |
|---|---|
| WrapMode |
Methods
Clone()
Creates exact copy of this fill.
Declaration
public override FillBase Clone()
Returns
| Type | Description |
|---|---|
| FillBase | Copy of this object. |
Overrides
CreateBrush(RectangleF)
Creates the GDI+ Brush object.
Declaration
public override Brush CreateBrush(RectangleF rect)
Parameters
| Type | Name | Description |
|---|---|---|
| RectangleF | rect | Drawing rectangle. |
Returns
| Type | Description |
|---|---|
| Brush | Brush object. |
Overrides
CreateBrush(RectangleF, Single, Single)
Creates the GDI+ Brush object with scaling.
Declaration
public override Brush CreateBrush(RectangleF rect, float scaleX, float scaleY)
Parameters
| Type | Name | Description |
|---|---|---|
| RectangleF | rect | Drawing rectangle. |
| System.Single | scaleX | X scaling coefficient. |
| System.Single | scaleY | Y scaling coefficient. |
Returns
| Type | Description |
|---|---|
| Brush | Brush object. |
Overrides
Deserialize(FRReader, String)
Desrializes the fill.
Declaration
public override void Deserialize(FRReader reader, string prefix)
Parameters
| Type | Name | Description |
|---|---|---|
| FRReader | reader | Reader object. |
| System.String | prefix | Name of the fill property. |
Overrides
Remarks
This method is for internal use only.
Draw(FRPaintEventArgs, RectangleF)
Fills the specified rectangle.
Declaration
public override void Draw(FRPaintEventArgs e, RectangleF rect)
Parameters
| Type | Name | Description |
|---|---|---|
| FRPaintEventArgs | e | Draw event arguments. |
| RectangleF | rect | Drawing rectangle. |
Overrides
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | obj |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Overrides
FinalizeComponent()
Performs a finalization after the report is finished.
Declaration
public override void FinalizeComponent()
Overrides
Remarks
This method is for internal use only.
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| System.Int32 |
Overrides
InitializeComponent()
Initializes the object before running a report.
Declaration
public override void InitializeComponent()
Overrides
Remarks
This method is for internal use only.
Serialize(FRWriter, String, FillBase)
Serializes the fill.
Declaration
public override void Serialize(FRWriter writer, string prefix, FillBase fill)
Parameters
| Type | Name | Description |
|---|---|---|
| FRWriter | writer | Writer object. |
| System.String | prefix | Name of the fill property. |
| FillBase | fill | Fill object to compare with. |
Overrides
Remarks
This method is for internal use only.
SetImage(Image)
Set image
Declaration
public void SetImage(Image image)
Parameters
| Type | Name | Description |
|---|---|---|
| Image | image | input image |
SetImageData(Byte[])
Sets image data to imageData
Declaration
public void SetImageData(byte[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | data | input image data |