Reputation: 115
iOS has a property on a transform of "b" and "a". Example iOS code is below. What is the mono / monotouch equivalent?
CGFloat radians = atan2f(container.transform.b, container.transform.a);
Upvotes: 4
Views: 697
Reputation: 43553
Apple's CGAffineTransform
is defined with letters: a, b, c, d for it's matrix member (except the translation part).
struct CGAffineTransform {
CGFloat a;
CGFloat b;
CGFloat c;
CGFloat d;
CGFloat tx;
CGFloat ty;
};
Meanwhile MonoTouch use the, more .NET-like (e.g. System.Drawing), naming of: 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
}
That makes it easier to port existing C# code.
Upvotes: 4