TRSGPGradient represents the class for gradient patterns.
A TRSGPGradient instance is used for creating a gradient pattern. A gradient defaults to having two points, and the colors of these two points are exposed as Color and Color1. But it can also have more than two colors, which requires modifying the TRSGPGradientPoints through the Points property. The gradient can start and end at any given point, and can be either linear (by default) or radial.
Namespace: RSGdiPlusGraphics
TPersistent
RSGdiPlusGraphics.TRSGPGradient
|
Delphi
|
type
TRSGPGradient = class(TPersistent)
end;
|
|
Name
|
Description
|
|
Create
|
Constructs a linear or radial gradient. By default, a linear gradient between white and black is created
|
|
Destroy
|
Represents the destructor of the TRSGPGradient class.
|
Top
|
|
Name
|
Description
|
|
Color
|
Specifies the first color of the gradient.
The Color property specifies one of the gradient's colors. If Style is set to Linear, this would be the top color. If Style is set to Radial, this would be the exterior color.
|
|
Color1
|
Specifies the second color of the gradient.
The Color1 property specifies one of the gradient's colors. If Style is set to Linear, this would be the bottom color. If Style is set to Radial, this would be the interior color.
Note
|
If there are more than two Points in the gradient, this property returns the color of the second point in the Points collection, not the last point.
|
|
|
GammaCorrection
|
Specifies whether gamma correction is enabled for gradient
|
|
OnChanged
|
Occurs when the gradient changes. Write an OnChanged event handler if you want to respond to gradient changes.
|
|
Path
|
Defines the shape of the radial gradient
|
|
Points
|
Represents a collection of gradient points.
The Points property specifies a collection of gradient points, which can be used to access the color and offset of specific areas of the gradient.
|
|
RadialTransform
|
Specifies details for the radial gradient.
Use the RadialTransform property to specify position details for the radial gradient, like the rotation center and the rotation angle.
Note
|
The changes made to RadialTransform are visible only when the Style property is set to gsRadial.
|
|
|
Shape
|
Specifies the blend shape of this gradient.
By default, as you move from the boundary of a gradient to the center point, the color changes gradually from the boundary color to the center color. You can customize the positioning and blending of the boundary and center colors by setting the Shape property.
|
|
ShapeFocus
|
Specifies the position of the ending color. This number is a percentage of the distance between the boundary lines and must be in the range from 0.0 through 1.0.
|
|
ShapeScale
|
Specifies the percentage of the gradient's ending color that gets blended, at the focus position, with the gradient's starting color. This number must be in the range from 0.0 through 1.0.
|
|
StartPosition
|
Specifies the starting point of the gradient.
Use the StartPosition property to specify the starting point of the gradient. StartPosition is in unit coordinates, from (0,0) in the top-left to (1,1) in the bottom-right of the rectangle being painted. Changing the rotation of a linear gradient in the Brush Designer modifies these coordinates so that the gradient goes in the desired direction.
Note
|
The changes made to StartPosition are visible only when the Style property is set to gsLinear.
|
|
|
StopPosition
|
Specifies the stopping point of the gradient.
Use the StopPosition property to specify the stopping point of the gradient. StopPosition is in unit coordinates, from (0,0) in the top-left to (1,1) in the bottom-right of the rectangle being painted. Changing the rotation of a linear gradient in the Brush Designer modifies these coordinates so that the gradient goes in the desired direction.
Note
|
The changes made to StopPosition are visible only when the Style property is set to gsLinear.
|
|
|
Style
|
Determines the style for the gradient object. Use Style to specify the direction of the gradient.
|
|
gsLinear
|
The gradient is linear (top to bottom, left to right, top-left to bottom-right, etc.)
|
gsRadial
|
The gradient is radial (concentric circles, with the center being a given point.)
|
|
Top
|
|
Name
|
Description
|
|
Assign(TPersistent)
|
Represents method Assign(TPersistent).
|
|
Change
|
Call the change method when the gradient changes. The method will fire the OnChange event
|
|
Changed(TRSGPGradientPoint)
|
Represents method Changed(TRSGPGradientPoint).
|
|
Equal(TRSGPGradient)
|
Returns true if the current gradient equals the aGradient parameter, this includes the style as well as all color points.
|
|
Equals(TObject)
|
Represents method Equals(TObject).
|
|
InterpolateColor(Single)
|
Overloaded. Returns the color of the gradient at the point in the gradient between 0 and 1. The method calculates the colors between the gradient points.
|
|
InterpolateColor(Single,Single)
|
Overloaded. Returns the color of the gradient at that point in the gradient. The method calculates the colors between the gradient points. The X,Y parameters define a vector between 0,0 to 1,1.
|
|
Notify(TRSGPGradientPoint,Classes)
|
Represents method Notify(TRSGPGradientPoint,Classes).
|
Top
|