Layer.convertType

Function/Meaning
Conversion of layer image representation format
Type
Method of the Layer class
Syntax
convertType(from)
Arguments
from Specifies the source drawing method type.
Return Value
None (void)
Description
Converts the format of the layer image.
This method performs conversion between image representation formats that are different but capable of similar expression, such as ltAlpha (dfAlpha) and ltAddAlpha (dfAddAlpha).
For example, if you simply change the type of a layer displayed with ltAlpha to ltAddAlpha, it will not display correctly because the handling of the alpha channel and color information is different. Therefore, you must use this method to convert from dfAlpha to dfAddAlpha.
In this method, the destination image representation format will be the format corresponding to the drawing method specified by the Layer.face property (note that this is the drawing method, not the layer type specified by Layer.type).
The from argument specifies the drawing method corresponding to the source image representation format (constants starting with df; see Layer.face). dfAuto cannot be specified for the from argument.
Currently supported conversions are dfAlpha -> dfAddAlpha and dfAddAlpha -> dfAlpha. In dfAddAlpha -> dfAlpha, color information may be lost during conversion.
This method is not affected by the drawing clip rectangle (the entire layer image is always affected).