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: October 8, 2026 at 10:45 AMEdit this page