Use the full gradientTransform affine matrix via CanvasKit's localMatrix parameter instead of manually extracting center and radius. The previous approach ignored rotation and aspect ratio, producing circular gradients where Figma specifies rotated ellipses. Define gradients in Figma's unit gradient space (center 0.5,0.5, radius 0.5) and let the localMatrix (scale(w,h) * gradientTransform) handle the transform to pixel coordinates. Also merge the GRADIENT_DIAMOND branch with GRADIENT_RADIAL since they use the same shader. |
||
|---|---|---|
| .. | ||
| acp | ||
| cli | ||
| core | ||
| demos | ||
| docs | ||
| mcp | ||