如何在 Corona SDK 的 display.newCircle() 中添加图像
How to add an image in display.newCircle() in corona SDK
我想用自定义图片更改圆圈的颜色。可以这样做吗?
是的,这是可能的。尝试
-- Create a vector rectangle
local circle = display.newCircle( 200, 200, 300 )
-- Set the fill (paint) to use the bitmap image
local paint = {
type = "image",
filename = "texture1.png"
}
-- Fill the circle
circle.fill = paint
您可以在 documentation 中找到更多信息。
我想用自定义图片更改圆圈的颜色。可以这样做吗?
是的,这是可能的。尝试
-- Create a vector rectangle
local circle = display.newCircle( 200, 200, 300 )
-- Set the fill (paint) to use the bitmap image
local paint = {
type = "image",
filename = "texture1.png"
}
-- Fill the circle
circle.fill = paint
您可以在 documentation 中找到更多信息。