Pure virtual base class to represent a mask for an offscreen picture.
void JImageMask::CalcMask |
( |
const JImage & |
image, |
|
|
const JColorID |
color |
|
) |
| |
|
protected |
We must be the same size as the image.
Note that by comparing system dependent colors instead of JColorIndices, we run in O(W H) instead of O(W H C), where C is the number of colors in the colorManager. The disadvantage is that system colors may be approximate so two colors close together will have the same system value, but different JColorIndices. For masking, this should not be a problem, however, because one usually masks out a color that is very different from the other colors in the image.