Wp8.1 UI programming 6. Changing special effects and 3D special effects

Source: Internet
Author: User

1. Change Special Effects

Conversion principle: Two-dimensional transformation matrix

M11 M12 0

M21 m22 0

Offsetx offsety 1

WP only supports affine transformation, so the right side of the matrix is 0, 0, 1.

(X, y, 1) the multiplication matrix is (x1, Y1, 1), and the new coordinates are (x1, Y1 ).

That is, after coordinate (X, Y) is transformed by matrix, the new coordinate is (x * M11 + y * m21 + offsetx, x * m12 + y * m22 + offsety ).

 

WP provides many transform classes to transform objects. You only need to apply the rendertransform attribute to the uielement.

List members:

Translatetransform: Translation transformation, determined by the X and Y attributes.

Rotatetransform: Rotation Transformation, center of rotation (centerx, centery), angle.

Scaletransform: scaling transformation. scalex and scaley are stretching multiples of original width and height. centerx and centery are center coordinates. The default value is (0, 0 ).

Skewtransform: distortion transformation. centerx and centery are the Center Coordinate. anglex and angley are the distortion angles.

Matrixtransform: more complex transformations are implemented through matrix algorithms. The preceding simple transformations are actually implemented in this way.

Transformgroup: combines different transformations.

 

2. 3D Effects

Compared with the two-dimensional transformation effect, the three-dimensional effect adds a dimension z, indicating the depth, which is transformed by four rows and four columns. The principle is similar.

 

Wp8.1 UI programming 6. Changing special effects and 3D special effects

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.