Hi,
I have copy the below code from corona document (object:Stroke()).
It doesn’t matter what is the value of “direction” (up,down,right or left) - it get the same result. The gradient is always center (i.e. within the inside border of the rectangal outside of it).
Is it a bug ?
Thanks
Yuval
local paint = { type = "gradient", color1 = { 1, 0, 0.4 }, color2 = { 1, 0, 0, 0.2 }, direction = "down" } local rect = display.newRect( 200, 200, 300, 300 ) rect.stroke = paint rect.strokeWidth = 4