- /**
-
-
* Paint Class Introduction
-
-
*
-
-
* Paint is a brush, plays a very important role in the drawing process, the brush mainly preserves the color,
-
-
* style, such as drawing information, specify how to draw text and graphics, brush objects have many settings methods,
-
-
* Can be broadly divided into two categories, one is related to graphic drawing, the other is related to text rendering.
-
-
*
-
-
* 1. Graphic drawing
-
-
* SETARGB (int a,int r,int g,int b);
-
-
* Set the color to be drawn, a for transparency, and r,g,b for the color value.
-
-
*
-
-
* SETALPHA (int a);
-
-
* Set the transparency of the drawing drawing.
-
-
*
-
-
* SetColor (int color);
-
-
* Sets the color of the drawing, which is represented by a color value that includes transparency and RGB colors.
-
-
*
-
-
* Setantialias (Boolean AA);
-
-
* Set whether anti-aliasing is used, consumes large resources, and the drawing speed slows down.
-
-
*
-
-
* Setdither (Boolean dither);
-
-
* Set whether to use Image jitter processing, will make the picture color more smooth and full, image clearer
-
-
*
-
-
* Setfilterbitmap (Boolean filter);
-
-
* If the item is set to True, the image will filter out the optimized operation of the bitmap image during animation to speed up the display
-
-
* Speed, this setting depends on the settings of dither and Xfermode
-
-
*
-
-
* Setmaskfilter (Maskfilter maskfilter);
-
-
* Set Maskfilter, you can use different maskfilter to achieve the effect of filter, such as filter, stereo, etc. *
-
-
* Setcolorfilter (Colorfilter colorfilter);
-
-
* Set the color filter to achieve a color-free conversion effect when drawing colors
-
-
*
-
-
* Setpatheffect (Patheffect effect);
-
-
* Set the effect of drawing path, such as point drawing line, etc.
-
-
*
-
-
* Setshader (Shader Shader);
-
-
* Set the image effect, use shader can draw a variety of gradient effect
-
-
*
-
-
* Setshadowlayer (float radius, float dx,float dy,int color);
-
-
* Set the shadow layer below the graph, create a shadow effect, radius is the angle of the shadow, DX and dy are the distance from the shadow on the x-axis and the y-axis, color is the shade of the shadow
-
-
*
-
-
* SetStyle (Paint.style Style);
-
-
* Set the style of the brush for Fill,fill_or_stroke, or STROKE
-
-
*
-
-
* SETSTROKECAP (Paint.cap Cap);
-
-
* When the brush style is stroke or fill_or_stroke, set the brush's graphic style, such as the circle style
-
-
* Cap.round, or square style Cap.square
-
-
*
-
-
* Setsrokejoin (Paint.join Join);
-
-
* Set how the shapes are combined when drawing, such as smoothing effects, etc.
-
-
*
-
-
* Setstrokewidth (float width);
-
-
* When the brush style is stroke or fill_or_stroke, set the thickness of the brush
-
-
*
-
-
* Setxfermode (Xfermode xfermode);
-
-
* Set the process of drawing overlap, such as merging, taking intersection or union, often used to make eraser effect.
-
Avoidxfermode Avoid = new Avoidxfermode (Color.Blue, Avoidxfermode.mode. AVOID);
-
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
-
-
* 2. Text rendering
-
-
* Setfakeboldtext (Boolean fakeboldtext);
-
-
* Simulation to implement bold text, set in small font effect will be very poor
-
-
*
-
-
* Setsubpixeltext (Boolean subpixeltext);
-
-
* Setting this to True will help to display the text on the LCD screen
-
-
*
-
-
* SetTextAlign (paint.align Align);
-
-
* Set the alignment direction of the drawing text
-
-
*
-
-
* Settextscalex (float ScaleX);
-
-
* Set the scale of the drawing text x axis, can achieve the effect of the text stretching
-
-
*
-
-
* Settextsize (float textSize);
-
-
* Set font size for drawing text
-
-
*
-
-
* SETTEXTSKEWX (float skewx);
-
-
* Set italic text, skewx to oblique radians
-
-
*
-
-
* Settypeface (Typeface Typeface);
-
-
* Set typeface object, that is, font style, including bold, italic and liner body, non-liner body, etc.
-
-
*
-
-
* Setunderlinetext (Boolean underlinetext);
-
-
* Set underlined text effects
-
-
*
-
-
* Setstrikethrutext (Boolean strikethrutext);
-
-
* Set the effect with strikethrough
-
-
*
-
-
*/