API Reference
OfficeRadialGradient
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 System.Double
- startY System.Double
- startRadius System.Double
- endX System.Double
- endY System.Double
- endRadius System.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 System.Double
- startY System.Double
- startRadius System.Double
- endX System.Double
- endY System.Double
- endRadius System.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 System.Double
- startY System.Double
- startRadiusX System.Double
- startRadiusY System.Double
- endX System.Double
- endY System.Double
- endRadiusX System.Double
- endRadiusY System.Double
- stops System.Collections.Generic.IReadOnlyList<OfficeIMO.Drawing.OfficeGradientStop>
Methods
public static OfficeRadialGradient Centered(OfficeColor startColor, OfficeColor endColor) #OfficeRadialGradientCreates a centered radial gradient from the center outward.
Parameters
- startColor OfficeIMO.Drawing.OfficeColor
- endColor OfficeIMO.Drawing.OfficeColor
public OfficeRadialGradient TransformCoordinates(OfficeTransform transform) #OfficeRadialGradientReturns a gradient transformed in normalized shape coordinates, preserving its circular or elliptical field.
Parameters
- transform OfficeIMO.Drawing.OfficeTransform
Exceptions
ArgumentException– The combined transform cannot be inverted.
public OfficeRadialGradient WithColorInterpolation(OfficeGradientColorInterpolation interpolation) #OfficeRadialGradientReturns a detached gradient using the specified color interpolation space.
Parameters
- interpolation OfficeIMO.Drawing.OfficeGradientColorInterpolation
public OfficeRadialGradient WithSpreadMode(OfficeGradientSpreadMode spreadMode) #OfficeRadialGradientReturns a detached gradient with the requested spread behavior.
Parameters
- spreadMode OfficeIMO.Drawing.OfficeGradientSpreadMode
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
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.