diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-11-13 14:05:20 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-11-13 14:05:20 -0800 |
commit | 373329d477d2db20c66a85aa3e23a696d76a9954 (patch) | |
tree | 79a04658bd7b4e12aabae884204eaf407775672b /graphics | |
parent | 235657dbe06c4fea8860ec9fef834a6b36da9700 (diff) | |
parent | 736c525a04a4d5e1c83541deca009ca97b99ef92 (diff) | |
download | frameworks_base-373329d477d2db20c66a85aa3e23a696d76a9954.zip frameworks_base-373329d477d2db20c66a85aa3e23a696d76a9954.tar.gz frameworks_base-373329d477d2db20c66a85aa3e23a696d76a9954.tar.bz2 |
Merge change I736c525a into eclair-mr2
* changes:
update dox to account for different behavior between AVOID and TARGET modes
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/java/android/graphics/AvoidXfermode.java | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/graphics/java/android/graphics/AvoidXfermode.java b/graphics/java/android/graphics/AvoidXfermode.java index d7b0225..2ed042b 100644 --- a/graphics/java/android/graphics/AvoidXfermode.java +++ b/graphics/java/android/graphics/AvoidXfermode.java @@ -33,17 +33,20 @@ public class AvoidXfermode extends Xfermode { final int nativeInt; } - /** - * This xfermode will draw the src everywhere except on top of the opColor - * or, depending on the Mode, draw only on top of the opColor. + /** This xfermode draws, or doesn't draw, based on the destination's + * distance from an op-color. * - * @param opColor The color to avoid (or to target depending on Mode). Note - * that the alpha in opColor is ignored. - * @param tolerance How closely we compare a pixel to the opColor. - * 0 - only operate if exact match - * 255 - maximum gradation (blending) based on how - * similar the pixel is to our opColor (max tolerance) - * @param mode If we should avoid or target the opColor + * There are two modes, and each mode interprets a tolerance value. + * + * AVOID: In this mode, drawing is allowed only on destination pixels that + * are different from the op-color. + * Tolerance near 0: avoid anything close to the op-color + * Tolerance near 255: avoid only colors very close to the op-color + * + * TARGET: In this mode, drawing only occurs on destination pixels that + * are similar to the op-color + * Tolerance near 0: draw on colors that are very close to op-color + * Tolerance near 255: draw on colors that to the op-color */ public AvoidXfermode(int opColor, int tolerance, Mode mode) { if (tolerance < 0 || tolerance > 255) { |