Chapter 1 Study Notes of image effects (1)

Source: Internet
Author: User

I have not spent much time writing blogs recently. I cannot update my blogs every day because I have to deal with some things. Today, I recommend a book foundation_actionscript_3.0_image_effects, a foreign book on processing bitmap technologies. Because there is no Chinese version, you can only read the English version to supplement your knowledge. But it doesn't matter. You can see the basics, but you cannot completely translate the meaning of the author. You can only explain it a little bit. Well, next I will use this book as an introduction basis. A little introduction.

In the first chapter, the author introduces the history of the Flash drawing API, starting from which each drawing API command and new API play a role in different periods. The author uses each command to describe the function of the Flash drawing API.

 

Starting from as1.0, flash introduced the drawing API command. The eight basic API commands created a new page of flash in drawing technology.

 

 1. Draw straight lines

This part describes the different functions of the following four APIs and shows the functions of Apis through one programming.Program.

<Br/> moveTo (X: Number, Y: Number); </P> <p> lineto (X: Number, Y: number ); // draw a straight line </P> <p> linestyle (thickness: Number = Nan, </P> <p> color: uint = 0; </P> <p> alpha: Number = 1.0; </P> <p> pixelhinting: Boolean = false, </P> <p> scalemode: string = "normal"; </P> <p> caps: String = NULL; </P> <p> joints: String = NULL; </P> <p> miterlimit: Number = 3 </P> <p>): void; // set the style </P> <p> clear (): void; // clear the screen </P> <p> 

 

2. Draw a curve

In this section, the author explains the application of this curve function.

Cureveto (controlx: Number, controly: Number, anchorx: Number, anchory: Number): void </P> <p> 

3. Drawing Filling

Beginfill (color: uint, Alpha: Number): void </P> <p> endfill (): void; </P> <p> 

4. Gradient Filling

Begingradientfill (type: String, colors: array, Alphas: array, ratios: array, matrix: matrix = NULL, spreadmethod: String = "pad", interpolationmethod: String = "RGB ", focalpointratio: Number = 0): void

5. Draw the gradient line

 

Linegradientstyle (type: String, colors: array, Alphas: array, ratios: array, matrix: matrix = NULL, spreadmethod: String = "pad", interpolationmethod: String = "RGB ", focalpointratio: Number = 0): void </P> <p>

6. Use bitmap Filling

Beginbitmapfill (Bitmap: bitmapdata, matrix: matrix = NULL, repeat: Boolean = true, smooth: Boolean = false): void

The new API commands will be explained later. This chapter will help readers understand these basic commands. The difficulty is not very difficult.

The next person will paste it into it.

 

To be continued .............

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.