[]
        
(Showing Draft Content)

GrapeCity.Documents.Drawing.RadialGradientBrush

RadialGradientBrush Class

Represents a radial gradient brush.

Inheritance
RadialGradientBrush
Namespace: GrapeCity.Documents.Drawing
Assembly: DS.Documents.Imaging.dll
Syntax
public class RadialGradientBrush : Brush
Public Class RadialGradientBrush
    Inherits Brush
Remarks

Note that as of v5.0.0.771, the object model of RadialGradientBrush was expanded to better support radial gradient brushes available on different target graphics platforms (such as PDF, bitmap or SVG). The following new properties are added:

The following properties are still available for backwards compatibility, but are now hidden from IntelliSense and should not be used in new code:
  • GrapeCity.Documents.Drawing.RadialGradientBrush.GradientOrigin
  • GrapeCity.Documents.Drawing.RadialGradientBrush.CoverRectangle
  • GrapeCity.Documents.Drawing.RadialGradientBrush.AllowEllipticGradients
These properties will be marked as obsolete in a future version, and may eventually be removed.

Constructors

Name Description
RadialGradientBrush(RadialGradientBrush)

Creates a copy of a RadialGradientBrush object.

RadialGradientBrush(Color, Color)

Initializes a new instance of the RadialGradientBrush class.

RadialGradientBrush(Color, Color, PointF)

Initializes a new instance of the RadialGradientBrush class.

Properties

Name Description
CenterOfEndCircle

Gets or sets the center of the end circle that defines the end of the gradient.

(0, 0) is the top-left corner, (1, 1) is the bottom-right corner. The default is (0.5f, 0.5f).

This property only has effect if the RadiusOfEndCircle property is set.

CenterOfStartCircle

Gets or sets the center of the start circle that defines the beginning of the gradient.

(0, 0) is the top-left corner, (1, 1) is the bottom-right corner.

If not specified, the center of the start circle coincides with CenterOfEndCircle.

EndColor

Gets or sets the ending gradient color.

ExtendEndCircle

Gets or sets a value indicating whether to extend gradient beyond the end circle.

This property only has effect if the RadiusOfEndCircle property is set.

The default is true.

ExtendStartCircle

Gets or sets a value indicating whether to extend the gradient beyond the start circle.

This property only has effect if the RadiusOfEndCircle property is set.

The default is true.

GradientStops

Gets or sets the collection of gradient stops.

Normalize

Gets or sets a value indicating whether to normalize the brush ensuring that it renders in the same way on all supported target graphics (such as PDF, bitmap or SVG).

  • If true, and the focal point is outside the end circle, it is moved to be on the end circle.
  • If false, the focal point position is not adjusted if it is outside the end circle, and the result will depend on the implementation of the target GcGraphics.

The default is true.

RadiusOfEndCircle

Gets or sets the radius of the end circle that defines the end of the gradient, as a fraction of the normalized diagonal. The normalized diagonal length is calculated as sqrt(width² + height²) / sqrt(2).

Setting this property to a non-null value enables the following properties:

And the following properties are ignored if this property has a value:
  • GrapeCity.Documents.Drawing.RadialGradientBrush.CoverRectangle
  • GrapeCity.Documents.Drawing.RadialGradientBrush.AllowEllipticGradients
RadiusOfStartCircle

Gets or sets the radius of the start circle that defines the beginning of the gradient, as a fraction of the normalized diagonal. The normalized diagonal length is calculated as sqrt(width² + height²) / sqrt(2).

This property only has effect if the RadiusOfEndCircle property is set.

The default is 0.

StartColor

Gets or sets the starting gradient color.

Visible

Gets a value indicating whether the brush is actually visible.

Methods

Name Description
AreSemitransparentColorsUsed()

Returns a value indicating whether brush uses semi-transparent colors.

SameBrush(Brush)

Returns True if the specified brush is the same as the current brush.