Parent Paint Library display.* Revision Release 2024.3703 Keywords composite paint, multitexture See also object.fill object.stroke Filters, Generators, Composites (guide)
Composite paints contain multiple images, thus enabling multi-texturing.
local paint = { type = "composite", paint1 = , paint2 = }
String. String value of "composite"
.
Table. A table that specifies a BitmapPaint. See Limitations below.
Table. A table that specifies a BitmapPaint. See Limitations below.
Constant. Specifies the base directory where filename is located. Options include system.ResourceDirectory
, system.DocumentsDirectory
, system.TemporaryDirectory
and system.CachesDirectory
. Default is system.ResourceDirectory
.
Because of the way multi-texturing works, both paint1
and paint2
will be rendered using the same texture coordinates. Because GradientPaints and ImageSheetPaints use different texture coordinates from plain BitmapPaints, you will get unexpected results unless you use plain BitmapPaints for paint1
and paint2
.
(Inherits properties from Paint)
local paint = { type = "composite", paint1 = { type="image", filename="wood.png" }, paint2 = { type="image", filename="dust.png" } } local rect = display.newRect( 200, 200, 300, 300 ) rect.fill = paint rect.fill.effect = "composite.average"