Skip to content

hm5-types (source format) / GradientFill

Interface: GradientFill ​

Linear or radial gradient paint for a shape's fill, in the shape's own space. Linear runs (x1,y1) → (x2,y2); radial is centred on (x1,y1) with radius |(x2,y2) − (x1,y1)|. gradientAxes (paint.ts) is the one place that turns these fields into geometry.

Properties ​

PropertyTypeDescription
focal?numberradial only: Flash focal point ratio −1..1, where the gradient starts along the (x1,y1) → (x2,y2) radius; absent = 0 (the centre)
linearRGB?booleancolours blend in LINEAR light (Flash "linearRGB" interpolation, owner 2026-11-08) instead of plain sRGB; absent = sRGB
spread?"repeat" | "pad" | "reflect"past the ends: "pad" repeats the end colours (absent), "reflect" mirrors the gradient, "repeat" starts it again (Flash spread)
stopsGradientStop[]offsets 0..1 ascending; colours RRGGBBAA
type"linear" | "radial"-
x1number-
x2number-
x3?numberend of the second axis from (x1,y1): radial = the second radius (an ellipse, possibly skewed); linear = the direction the colour bands run (a skewed gradient). Absent = the first axis turned 90° (a circle / bands square to the gradient)
y1number-
y2number-
y3?number-

HereSplash — 2D animation for the web