OfficeRadialGradient
OfficeIMO.Drawing
Dependency-free radial gradient intent in normalized local coordinates. Coordinates use a top-left origin and are mapped through CoordinateTransform into normalized shape coordinates. With the identity transform, 0,0 is the shape's top-left corner and 1,1 is its bottom-right corner. Ellipse centers may sit outside that box to preserve authored gradients whose focal point is off-canvas. Pixels unreached by a physical circle remain transparent; native-format adapters may explicitly supply outside endpoint paint. Independent horizontal and vertical radii allow ellipses before the affine coordinate transform while the original circle constructors remain source-compatible.
Inheritance
- object
- OfficeRadialGradient
Usage
Explore 10 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 7
Accepted by parameters 3
Constructors
public OfficeRadialGradient(double startX, double startY, double startRadius, double endX, double endY, double endRadius, OfficeGradientStop start, OfficeGradientStop end) #Creates a radial gradient between two circles.
Parameters
- startX double
- startY double
- startRadius double
- endX double
- endY double
- endRadius double
- start OfficeIMO.Drawing.OfficeGradientStop
- end OfficeIMO.Drawing.OfficeGradientStop
public OfficeRadialGradient(double startX, double startY, double startRadius, double endX, double endY, double endRadius, IReadOnlyList<OfficeGradientStop> stops) #Creates a radial gradient between two circles with two or more ordered stops.
Parameters
- startX double
- startY double
- startRadius double
- endX double
- endY double
- endRadius double
- stops System.Collections.Generic.IReadOnlyList<OfficeIMO.Drawing.OfficeGradientStop>
public OfficeRadialGradient(double startX, double startY, double startRadiusX, double startRadiusY, double endX, double endY, double endRadiusX, double endRadiusY, IReadOnlyList<OfficeGradientStop> stops) #Creates a radial gradient between two axis-aligned ellipses with the same aspect ratio.
Parameters
- startX double
- startY double
- startRadiusX double
- startRadiusY double
- endX double
- endY double
- endRadiusX double
- endRadiusY double
- stops System.Collections.Generic.IReadOnlyList<OfficeIMO.Drawing.OfficeGradientStop>
Methods
public static OfficeRadialGradient Centered(OfficeColor startColor, OfficeColor endColor) #Creates a centered radial gradient from the center outward.
Parameters
- startColor OfficeIMO.OfficeColor
- endColor OfficeIMO.OfficeColor
Returns
OfficeRadialGradientpublic OfficeRadialGradient TransformCoordinates(OfficeTransform transform) #Returns a gradient transformed in normalized shape coordinates, preserving its circular or elliptical field.
Parameters
- transform OfficeIMO.Drawing.OfficeTransform
Returns
OfficeRadialGradientExceptions
ArgumentException– The combined transform cannot be inverted.
public OfficeRadialGradient WithColorInterpolation(OfficeGradientColorInterpolation interpolation) #Returns a detached gradient using the specified color interpolation space.
Parameters
- interpolation OfficeIMO.Drawing.OfficeGradientColorInterpolation
Returns
OfficeRadialGradientpublic OfficeRadialGradient WithSpreadMode(OfficeGradientSpreadMode spreadMode) #Returns a detached gradient with the requested spread behavior.
Parameters
- spreadMode OfficeIMO.Drawing.OfficeGradientSpreadMode
Returns
OfficeRadialGradientInherited Methods
Properties
public OfficeTransform CoordinateTransform { get; private set; } #Affine mapping from gradient coordinates to normalized shape coordinates.
public double StartX { get; } #Start circle center X coordinate in gradient-coordinate units.
public double StartY { get; } #Start circle center Y coordinate in gradient-coordinate units.
public double StartRadius { get; } #Start circle radius, or the horizontal radius for an elliptical definition.
public double EndX { get; } #End circle center X coordinate in gradient-coordinate units.
public double EndY { get; } #End circle center Y coordinate in gradient-coordinate units.
public double EndRadius { get; } #End circle radius, or the horizontal radius for an elliptical definition.
public OfficeGradientColorInterpolation ColorInterpolation { get; private set; } #Color space used to interpolate RGB channels between stops. Defaults to encoded sRGB.
public IReadOnlyList<OfficeGradientStop> Stops { get; private set; } #Gradient stops in offset order.
public OfficeGradientSpreadMode SpreadMode { get; private set; } #Behavior beyond the stop interval. Defaults to endpoint padding.