Dela via


CompositionRadialGradientBrush.GradientOriginOffset Property

Definition

Gets or sets the two-dimensional coordinates of the origin of the gradient.

public:
 property float2 GradientOriginOffset { float2 get(); void set(float2 value); };
float2 GradientOriginOffset();

void GradientOriginOffset(float2 value);
public Vector2 GradientOriginOffset { get; set; }
var vector2 = compositionRadialGradientBrush.gradientOriginOffset;
compositionRadialGradientBrush.gradientOriginOffset = vector2;
Public Property GradientOriginOffset As Vector2

Property Value

Vector2 Vector2

float2

The two-dimensional coordinates of the origin of the gradient. The default is a Vector2 with values (0, 0).

Remarks

When MappingMode is set to Relative, the coordinates are relative to the object being painted and have values from 0.0 to 1.0. The upper left corner of the object's bounding rectangle has coordinates (0.0, 0.0) and the lower right corner has coordinates (1.0, 1.0).

When MappingMode is set to Absolute, the numbers change to be pixels rather than a ratio, and are relative to the size of the brush.

Applies to