public static Brush CreateLinearGradient(
PointF startPoint,
PointF endPoint,
Color64 startColor,
Color64 endColor,
GradientWrapMode wrapMode = GradientWrapMode.Stop,
WorkingColorSpace workingColorSpace = WorkingColorSpace.Default
)Public Shared Function CreateLinearGradient (
startPoint As PointF,
endPoint As PointF,
startColor As Color64,
endColor As Color64,
Optional wrapMode As GradientWrapMode = GradientWrapMode.Stop,
Optional workingColorSpace As WorkingColorSpace = WorkingColorSpace.Default
) As Brushpublic:
static Brush^ CreateLinearGradient(
PointF startPoint,
PointF endPoint,
Color64 startColor,
Color64 endColor,
GradientWrapMode wrapMode = GradientWrapMode::Stop,
WorkingColorSpace workingColorSpace = WorkingColorSpace::Default
)static member CreateLinearGradient :
startPoint : PointF *
endPoint : PointF *
startColor : Color64 *
endColor : Color64 *
?wrapMode : GradientWrapMode *
?workingColorSpace : WorkingColorSpace
(* Defaults:
let _wrapMode = defaultArg wrapMode GradientWrapMode.Stop
let _workingColorSpace = defaultArg workingColorSpace WorkingColorSpace.Default
*)
-> Brush This overload creates a gradient with fix coordinates. To automatically apply the gradient to the bounds of each Path, use the overloads with an angle parameter, such as the CreateLinearGradient(Single, Color32, Color32, WorkingColorSpace) overload.
The workingColorSpace parameter affects only the color interpolation, not the blending with the background, which is determined by the color space of the target bitmap data (or by DrawingOptions.Quantizer, if specified).
In this overload the default value of workingColorSpace maps to WorkingColorSpace.Srgb, because the Color64 type represents a color in the sRGB color space. When creating a monochromatic gradient, specifying Srgb can be better, because then the perceived mid-tone brightness will be at the middle of the gradient. Otherwise, using Linear may be more appropriate, so the transition between the colors will seem more "natural".