MonoTouch equivalent of transform.b and transform.a?

iOS has the property of converting "b" and "a". An example of iOS code is given below. What is the mono / monotouch equivalent?

CGFloat radians = atan2f(container.transform.b, container.transform.a); 
+4
source share
1 answer

Apple CGAffineTransform defined by the letters: a, b, c, d for a matrix member (except for the translation part).

 struct CGAffineTransform { CGFloat a; CGFloat b; CGFloat c; CGFloat d; CGFloat tx; CGFloat ty; }; 

At the same time, MonoTouch uses more .NET-like (e.g. System.Drawing) naming conventions: xx, yx, xy, yy.

 public struct CGAffineTransform { public float xx; // a public float yx; // b public float xy; // c public float yy; // d public float x0; // tx public float y0; // ty } 

This makes it easy to port existing code to C #.

+4
source

Source: https://habr.com/ru/post/1399835/


All Articles