I’d like to draw a ring over another image, but be able to see the image below the ring. Using display.newCircle(), I’ve tried setting the alpha of the circle to 0.0. But this appears to apply to the stroke as well. I wondered if you had to use 2 circles to do it, but still can’t figure that out either. Seems like it should be simple. Any ideas?
Take a look at this, and see if you can mimic what you want in your project.
[lua]
local myRectangle = display.newRect(0, 0, 320, 480)
myRectangle:setFillColor(255, 255, 255)
local myObject = display.newCircle( display.contentWidth/2, display.contentHeight/2 , 50)
myObject:setFillColor(255,0,0,96)
local Circle01 = display.newCircle( display.contentWidth/2, display.contentHeight/2 , 100 )
Circle01.strokeWidth = 4
Circle01:setStrokeColor(0,0,0, 200)
Circle01:setFillColor(50,255,150,95)
[/lua]
Thanks. I had missed the 4th parameter for the alpha setting on the setFillColor(). That did it.
Take a look at this, and see if you can mimic what you want in your project.
[lua]
local myRectangle = display.newRect(0, 0, 320, 480)
myRectangle:setFillColor(255, 255, 255)
local myObject = display.newCircle( display.contentWidth/2, display.contentHeight/2 , 50)
myObject:setFillColor(255,0,0,96)
local Circle01 = display.newCircle( display.contentWidth/2, display.contentHeight/2 , 100 )
Circle01.strokeWidth = 4
Circle01:setStrokeColor(0,0,0, 200)
Circle01:setFillColor(50,255,150,95)
[/lua]
Thanks. I had missed the 4th parameter for the alpha setting on the setFillColor(). That did it.