Encapsulates a GDI+ brush class. A Brush object is used to paint the interior of graphics shapes, such as rectangles, ellipses, pies, polygons, and paths.
Unlike most Delphi wrappers of GDI+, the TRSGPBrush class mimics the FMX TBrush class as closely as possible. You do not create TextureBrush or PathGradientBrush, you create a TRSGPBrush and change its Kind property.
Namespace: RSGdiPlusGraphics
|
Name
|
Description
|
|
|
BackColor
|
Specifies the background color of a hatch fill brush. The background color defines the color over which the hatch lines are drawn.
|
|
|
Bitmap
|
Specifies the image to use when the Kind is bkBitmap, which is a textured or patterned brush filled from a bitmap.
A texture brush paints an image. The image or texture is either a portion of a specified image or a scaled version of a specified image. The type of image (metafile or nonmetafile) determines whether the texture is a portion of the image or a scaled version of the image.
Note
|
To properly use the Bitmap property, you must set the Kind property to bkBitmap.
|
|
|
|
BitmapSrcRect
|
Defines the size of the bitmap texture brush and the portion of the image to be used. If the Image object is created from a metafile, the brush uses the entire image, which is scaled to fit the size of the brush.
|
|
|
Color
|
Specifies the color of the brush when the brush kind is bkSolid or foreground color when brush kind is bkHatchFill
Note
|
To properly use the Color property, you must set the Kind property to bkSolid or bkHatchFill.
|
|
|
|
DefaultColor
|
Defines the default color of the brush. The brush object uses the DefaultColor property to determine whether the color of the brush is stored when streaming.
|
|
|
DefaultKind
|
Defines the default kind of the brush. The brush object uses the DefaultKind property to determine whether the Kind of the brush is stored when streaming.
|
|
|
Gradient
|
Specifies the gradient style and colors for the brush.
The Gradient property specifies the gradient style and the gradient colors for the TRSGPBrush object.
Note
|
To properly use the Gradient property, you must set the Kind property to bkGradient.
|
|
|
|
Handle
|
Handle of the graphics object, used by the MS GDI+ flat API routines (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
|
|
|
HatchStyle
|
Specifies the hatch style of the hatch brush.
Note
|
To properly use the HatchStyle property, you must set the Kind property to bkHatchFill.
|
|
|
|
Kind
|
Determines the pattern for the brush.
Use Kind to specify the pattern painted by the brush. Kind can have one of the following values:
|
|
bkBitmap
|
The brush's pattern is defined by an external bitmap image.
|
|
|
bkGradient
|
The brush's pattern is a gradient and you can set the gradient type and colors.
|
|
|
bkNone
|
The brush has no pattern. The fill of the object is transparent and the Color property has no effect.
|
|
|
bkSolid
|
The brush's pattern is a solid color, which you can set by using the Color property.
|
|
|
bkHatchFill
|
The brush's pattern is a hatch fill. The brush defines a rectangular brush with a hatch style, a foreground color, and a background color. There are six hatch styles. The foreground color defines the color of the hatch lines; the background color defines the color over which the hatch lines are drawn.
|
|
|
|
|
|
|
Matrix
|
Specifies the transformation matrix for the brush. The transformation matrix only applies to bkBitmap and bkGradient.
|
|
OnChange
|
Occurs when the graphics object changes.
Note
|
There are two events that are exactly the same, OnChanged and OnChange. The extra event name is to allow easier transition from other Delphi libraries, either the VCL (OnChanged) or FMX (OnChange) libraries. Use either one as needed. Only one event is triggered.
|
|
|
OnChanged
|
Occurs when the graphics object changes.
Note
|
There are two events that are exactly the same, OnChanged and OnChange. The extra event name is to allow easier transition from other Delphi libraries, either the VCL (OnChanged) or FMX (OnChange) libraries. Use either one as needed. Only one event is triggered.
|
|
|
Owner
|
Canvas that owns the object. The Canvas will free this graphics object if it is destroyed. However, to keep memory use under control, it is recommended that you free graphics objects when you are finished with them. (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
|
|
WrapMode
|
Specifies how repeated copies of the Bitmap image property are used to tile an area when it is painted.
Note
|
To properly use the WrapMode property, you must set the Kind property to bkBitmap.
|
|
Top