Skip to main content

GradientOperationRotate

Type

statement

Summary

Apply a rotation to a gradient paint.

Syntax

rotate <mGradient> by <mRotation>

Description

Rotates the transform of mGradient by mRotation degrees.

Parameters

NameTypeDescription

mRotation

An expression which evaluates to a number.

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

// Rotate the gradient
rotate tGradient by 45
Thank you for your feedback!

Was this page helpful?