"Android" Setxfermode properties
I. The following xfermode subclasses can change this behavior:
AVOIDXFERMODE specifies a color and tolerance, forcing paint to avoid drawing on it (or just drawing on it).
Pixelxorxfermode a simple pixel XOR operation is applied when the existing color is overwritten.
Porterduffxfermode This is a very powerful conversion mode, using it, you can use any of the 16 porter-duff rules of the image composition to control how paint interacts with existing canvas images.
To apply the conversion mode, you can use the Setxfermode method as follows:
Avoidxfermode avoid = new Avoidxfermode (Color.Blue, Avoidxfermode.mode. AVOID); Borderpen.setxfermode (avoid);
Two. Porter-duff:
Three. 16 Porter-duff rules
1.porterduff.mode.clear
The drawing is not submitted to the canvas.
2.porterduff.mode.src
Show Top Draw picture
3.porterduff.mode.dst
Show Lower drawing pictures
4.porterduff.mode.src_over
Normal drawing shows that the upper and lower layers are drawn with overlapping covers.
5.porterduff.mode.dst_over
The upper and lower layers are displayed. The lower level is shown on the home.
6.porterduff.mode.src_in
Draw the intersection of two layers. Displays the upper layer.
7.porterduff.mode.dst_in
Draw the intersection of two layers. Displays the lower layer.
8.porterduff.mode.src_out
Draw the non-intersecting portion of the upper layer.
9.porterduff.mode.dst_out
Remove the layer to draw the non-intersecting part.
10.porterduff.mode.src_atop
Remove the non-intersecting part of the layer from the upper intersection section
11.porterduff.mode.dst_atop
Take the upper non-intersecting part and the lower part of the intersection
12.porterduff.mode.xor
13.porterduff.mode.darken
14.porterduff.mode.lighten
15.porterduff.mode.multiply
16.porterduff.mode.screen
Rex--ios Android Arduino Mobile Internet