Image programming in actionscript3 games)

Source: Internet
Author: User

Total Directory: http://blog.csdn.net/iloveas2014/article/details/38304477

4.3.6 matrix mathematics in colormatrix

Colormatrix is a subclass of dynamicmatrix. It is fixed as soon as it is initialized: 5*5 (why not 5*4? I believe this problem does not need to be explained again ), and fill in the unit matrix data:

 

 

This class has five methods. The first four correspond to the brightness, contrast, saturation, and hue attributes of adjustcolor, and the last one is getflatarray, its only function is to convert the valid data in the matrix (5*4) into an array of 20 for the colormatrixfilter parameter to call.

 

Next let's take a look at the four matrix computing functions corresponding to adjustcolor.

 


 

Image programming in actionscript3 games)

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.