Skip to main content

GradientPropertyVia

Type

operator

Summary

The via point of a gradient paint.

Syntax

the via of <mGradient>

Description

The via point of mGradient as a point. This is used to skew and scale the gradient when drawing.

Parameters

NameTypeDescription

mGradient

An expression which evaluates to a gradient.

Examples

// Create new gradient paint
variable tGradient
put linear gradient with ramp [gradient stop at 0 with color [0,0,0], gradient stop at 1 with color [1,1,1]] into tGradient

variable tRect
put rectangle [ 20, 10, 120, 60 ] into tRect

// Set the via of the gradient to the bottom of tRect
set the via of tGradient to point [(the left of tRect + the right of tRect) / 2, the bottom of tRect]
Thank you for your feedback!

Was this page helpful?