Parent Paint Library display.* Revision 2017.3060 Keywords bitmap paint See also object.fill object.stroke Effects Guide
A bitmap paint contains a single texture.
If desired, bitmap fills can be repeated (tiled) across the span of a display object. See the textureWrapX
and textureWrapY
properties in the Texture Keys section of display.setDefault() for more information.
local paint = { type = "image", filename = , baseDir = }
String. String value of "image"
.
String. Filename of the image file.
Constant. Specifies the base directory where filename is located. Options include system.ResourceDirectory
, system.DocumentsDirectory
, system.TemporaryDirectory
and system.CachesDirectory
. Default is system.ResourceDirectory
.
-- Create a vector rectangle local rect = display.newRect( 200, 200, 300, 300 ) -- Set the fill (paint) to use the bitmap image local paint = { type = "image", filename = "texture1.png" } -- Fill the rectangle rect.fill = paint