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