Send Your Feedback
Send your comments, criticism, suggestions, ideas, problems concerning iconfu, or life, generally. We can't really help with your relationships, but we might be able to help you build a better icon. Include your email address if you would like a reply. We do not guarantee a reply.


close
Who's Here
get your gravatar
| register
New Account
name letters or numbers only, at least 6 long
password  
confirm password  
email optional (for your gravatar)
real name optional
Terms of Service I have read and I accept the Terms of Service.
close
iconfu terms of service

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.

cookiecut

Drawmode cookiecut old retains all the colours of the old image, but imposes the shape of the new image. In other words, cookiecut old copies the alpha channel of the new image to the old image, without changing colours.

Drawmode cookiecut new does the opposite: it keeps the shape of the old image and the colours of the new 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.
updated 18-Mar-2009
Messages
clear