Class Image.Layer

See also


Method create

Image.Layer Image.Layer(object image, object alpha, string mode)
Image.Layer Image.Layer(mapping info)
Image.Layer Image.Layer()
Image.Layer Image.Layer(int xsize, int ysize, object color)
Image.Layer Image.Layer(object color)


The Layer construct either three arguments, the image object, alpha channel and mode, or a mapping with optional elements:

        // default: black
        // alpha channel object
        // default: full opaque
"mode":string mode,
        // layer mode, see <ref>mode</ref>.
        // default: "normal"
        // layer general alpha value
        // default is 1.0; this is multiplied
        // with the alpha channel.
        // offset of this layer
        // fill color, ie what color is used
        // "outside" the image. default: black
        // and black (full transparency).
        // select tiling; if 1, the image
        // will be tiled. deafult: 0, off
The layer can also be created "empty", either giving a size and color - this will give a filled opaque square, or a color, which will set the "fill" values and fill the whole layer with an opaque color.

All values can be modified after object creation.


image and alpha channel must be of the same size.