Paint class Introduction

Source: Internet
Author: User
/* Paint class introduction ** paint is the paint brush, which plays an extremely important role in the drawing process. The paint brush mainly stores the color, * style and other painting information, there are many ways to set the paint brush object that specifies how to draw text and graphics. * There are two types of paint objects: one is related to drawing, and the other is related to text painting. ** 1. drawing * setargb (int A, int R, int g, int B); * set the color of the painting. A indicates transparency, R, G, and B indicates the color value. ** Setalpha (int A); * sets the transparency of the drawing. ** Setcolor (INT color); * sets the color of the painting, which is expressed by the color value. The color value includes the transparency and RGB color. ** Setantialias (Boolean aa); * setting whether to use the anti-aliasing function consumes a large amount of resources and slows down the drawing speed. ** Setdither (Boolean dither); * set whether to use image Jitter to make the color of the image smoother and Fuller, and the image clearer. ** setfilterbitmap (Boolean filter ); * If this parameter is set to true, the bitmap image is filtered out during the animation to accelerate the display speed, this setting item depends on dither and xfermode settings ** setmaskfilter (maskfilter); * sets maskfilter. Different maskfilters can be used to implement filter effects, such as filtering, stereo ** setcolorfilter (colorfilter); * sets the color filter to achieve the effect of color conversion when the color is drawn ** setpatheffect (patheffect effect ); * set the effect of the painting path, for example, ** setshader shader (shader); * set the image effect, and use shader to draw various gradient effects ** setshadowlayer (float radius, float dx, float dy, int color); * set the shadow layer under the graph to produce the shadow effect. radius indicates the shadow angle, DX and Dy are the distance between the shadow on the X and Y axes, and color is the shadow color ** setstyle (paint. style); * set the paint brush style to fill, fill_or_stroke, or stroke ** setstrokecap (paint. cap CAP); * When the paint brush style is stroke or fill_or_stroke, set the image style of the brush, such as the circular style * cap. round, or square style cap. square ** setsrokejoin (paint. join join); * set the combination of various images during painting, such as smooth effects ** setstrokewidth (float width); * When the paint brush style is stroke or fill_or_stroke, set the coarse granularity of the brush ** setxfermode (xfermode); * set the processing method when the image overlaps, such as merging, intersection or union, which is often used to make the eraser erasure effect ** 2. text drawing * setfakeboldtext (Boolean fakeboldtext); * simulate and implement bold text, and the effect will be very poor when set to a small font ** setsubpixeltext (Boolean subpixeltext); * set this item to true, will help text display on the LCD screen ** settextalign (paint. align align); * set the alignment direction of the drawn text ** settextscalex (float scalex); * set the zooming ratio of the X axis of the drawn text, you can achieve the effect of text stretching ** settextsize (float textsize); * set the font size of the drawn text ** settextskewx (float skewx); * Set italic text, skewx is a tilting radian ** settypeface (typeface); * sets the typeface object, that is, the font style, including bold, italic, and linebody, ** setunderlinetext (Boolean underlinetext) for non-linefeed, ** set the text effect with underlines ** setstrikethrutext (Boolean strikethrutext), and * set the effect with strikethrough **/

Original article: http://emmet1988.iteye.com/blog/1058526

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.