콘텐츠로 이동

GradientBrushHelper class

이 콘텐츠는 아직 번역되지 않았습니다.

Helper utilities for gradient brushes.

public static class GradientBrushHelper
name description
static GetRepresentativeColor(…) Returns a single representative color for the gradient by sampling at the midpoint (t=0.5). Used as a fallback on backends that do not support gradients natively.
static ResolveGradientLength(…) Converts a gradient length from its declared units into user-space length. For ObjectBoundingBox the value is multiplied by objectExtent; otherwise it is returned unchanged.
static ResolveGradientPoint(…) Converts a gradient geometry point from its declared units into user-space coordinates. For ObjectBoundingBox, p is treated as a fraction of objectBounds; otherwise it is returned unchanged.
static Sample(…) Samples the gradient brush at t (0–1) and returns an interpolated color. Used by backends that do not natively support gradients as a single representative color.