scriptable

Annotation to indicate the marked function is compatible with arsd.script.

More...
private
enum scriptable = "arsd_jsvar_compatible";

Detailed Description

Any function that takes a Color argument will be passed a string instead.

Scriptable Functions

strokeWidth

Sets the stroke width of the stroke style.

strokeColor

Sets current stroke style to a solid color.

strokePaint

Sets current stroke style to a paint, which can be a one of the gradients or a pattern.

fillColor

Sets current fill style to a solid color.

fillPaint

Sets current fill style to a paint, which can be a one of the gradients or a pattern.

resetTransform

Resets current transform to an identity matrix.

translate

Translates current coordinate system.

rotate

Rotates current coordinate system. Angle is specified in radians.

skewX

Skews the current coordinate system along X axis. Angle is specified in radians.

skewY

Skews the current coordinate system along Y axis. Angle is specified in radians.

scale

Scales the current coordinate system.

linearGradient

Creates and returns a linear gradient. Parameters (sx, sy) (ex, ey) specify the start and end coordinates of the linear gradient, icol specifies the start color and ocol the end color. The gradient is transformed by the current transform when it is passed to fillPaint or strokePaint.

beginPath

Clears the current path and sub-paths.

moveTo

Starts new sub-path with specified point as first point.

lineTo

Adds line segment from the last point in the path to the specified point.

closePath

Closes current sub-path with a line segment.

rect

Creates new rectangle shaped sub-path.

roundedRect

Creates new rounded rectangle shaped sub-path.

roundedRectEllipse

Creates new rounded rectangle shaped sub-path. Specify ellipse width and height to round corners according to it.

fill

Fills the current path with current fill style.

stroke

Fills the current path with current stroke style.

Meta