Layer.holdAlpha

Function/Meaning
Whether to protect the alpha channel
Type
Layer Class Properties
Explanation

Specifies whether to protect the alpha channel in drawing.
You can also set the value. The default is false.
For some drawing operations, this property allows you to specify whether to keep the alpha channel (mask image) of the image when the Layer.face property is dfOpaque.
For many methods, fake this property for faster drawing.
If the Layer.type is neither ltAlpha nor ltAddAlpha, the alpha channel of the image is not used and it is safe to set this property to false.
However, if this property is false, the alpha channel will be destroyed.
The following methods are not affected by this property.

  • Layer.loadImages
  • Layer.loadProvinceImage
  • Layer.setMainPixel
  • Layer.setMaskPixel
  • Layer.setProvincePixel
  • Layer.piledCopy
  • Layer.adjustGamma(Alpha channel is always protected)
  • Layer.doGrayScale(Alpha channel is always protected)
  • Layer.flipLR
  • Layer.flipUD
  • Layer.assignImages

The following methods are affected by this property.

  • Layer.copyRect
  • Layer.stretchCopy
  • Layer.affineCopy
  • Layer.fillRect
  • Layer.colorRect
  • Layer.drawText
  • Layer.operateRect
  • Layer.operateStretch
  • Layer.operateAffine