About Drawing Modes
Drawing Modes offer powerful ways of combining two colours or images to create interesting effects. It's important to understand the colour model when working with drawing modes: a colour is represented with four channels: red, green, blue and alpha. "Alpha" represents the opacity of the colour; opacity is the opposite of transparency. For example, a pixel that is 75% opaque, is 25% transparent.
If you consider only the alpha channel of all pixels in an image, you have the shape of the image. Some drawing modes affect only the red, green, and blue channels of the target image; some affect only the alpha channel (and hence are used to manipulate the shape of the image); some affect both.
In the icon representing each draw mode, the blue box is the "old" or "destination" image; the red circle is the "new" or "source" image.
|
over
Drawmode over draws the new colour or image "over" the old one, so that the old image "shows through" transparent or semi-transparent pixels of the new image.
under
Drawmode under draws the new colour or image "under" or "behind" the old one, so that the new image "shows through" transparent or semi-transparent pixels of the old image. Or, put another way, opaque pixels of the old image hide corresponding pixels of the new image.
over, retain alpha
Drawmode over, retain alpha draws the new colour or image "over" the old one, but does not change the shape of the old image ("retain alpha").
This is the most common way to apply gradients, so the gradient draws only on pixels that are already drawn, and doesn't change any transparent pixels.
replace
Drawmode replace copies all four channels to the destination image. If you use this with floating copies, with ellipses, or with gradients, your entire icon will be replaced with the copy, the ellipse, or the gradient, respectively.
|