LinearGradientPaint
Represents a linear gradient paint.
LinearGradientPaint interface
Represents a linear gradient paint.
Signature:
interface LinearGradientPaint extends GradientPaintExtends: GradientPaint
Example
// Create a linear gradient from left to right
group.createFill({
type: "GRADIENT_LINEAR",
start: { x: 0, y: 100 },
end: { x: 200, y: 100 },
stops: [
{ color: { r: 255, g: 0, b: 0 }, offset: 0, opacity: 1 },
{ color: { r: 0, g: 0, b: 255 }, offset: 1, opacity: 1 },
],
});Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
| "GRADIENT_LINEAR" | Paint type |
Last updated: August 5, 2026 at 11:47 AMEdit this page