To control the transformation of an image or component using the matrix

Source: Internet
Author: User

1. Gets the Matrix object, which can be created either newly or directly from the matrix encapsulated within other objects (for example, inside the transformation object)

2. Call the Matrix method for panning, rotating, zooming, skewing, and so on.

3. Apply the transformations made by the program to the matrix to the specified image or component.

The matrix provides the following ways to control panning, rotation, and zooming:

Settranslate (float dx, float dy): Controls the Matrix for panning.

Setskew (float KX, Float KY, float px, float py): Control matrix is tilted with px, py as axis, and KX and KY are inclined distances in X and y directions.

Setskew (float kx, Float KY): Controls the Matrix to tilt, KX, KY for the X, and the tilt distance in the y direction.

SetRotate (float degress): Controls the matrix for rotation, degrees controls the angle of rotation.

SetRotate (float degress, float px, float py): Set to rotate with px, py axis, degrees control the angle of rotation.

To control the transformation of an image or component using the matrix

Related Article

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.