I have a plain white circular image and I was looking to add a gradient fill over it. But when using GradientPaint I was getting a square.
local circle = display.newImageRect(
‘circle.png’,
200, 200
);
circle.x = display.contentCenterX;
circle.y = display.contentCenterY;
local paint = {
type = “gradient”,
color1 = { 17 / 255, 159 / 255, 255 / 255 },
color2 = { 126 / 255, 203 / 255, 255 / 255 },
direction = “down”
};
circle.fill = paint;
`
Is there anyway to add a gradient fill to the circular image?