GxTextureBrush.Create

Syntax

Create(Image: IGxImage; [WrapMode: GxWrapMode = 0;] [BrushSize: IGxRectF = Null]);

Parameters

Image. Image that is used as texture.

WrapMode. Mode of texture overlay.

BrushSize. The rectangle that determines the part of the image that is used as a texture. The sizes of the current rectangle cannot exceed the sizes of the image in use. The bounding of the image part is implemented regarding the top left angle.

Description

The Create constructor creates a new texture brush in accordance with the specified parameters.

Example

Function GetGxTextureBrush(FileName: String): IGxTextureBrush;
Var
    TextureBrush: IGxTextureBrush;
Begin
    If File.Exists(FileName) Then
        TextureBrush := New GxTextureBrush.Create(GxImage.FromFile(FileName));
        Return TextureBrush;
    Else
        Return Null;
    End If;
End Function GetGxTextureBrush;

This function returns the texture brush based on the image, the path to which is passed as an input parameter.

See also:

GxTextureBrush