public void RotateByAngle(double angle)
{
if (angle != 0.0)
{
NSAffineTransform matrix;
NSRect frame = _frame;
frame.Origin = NS.MakePoint(0, 0);
if (_boundsMatrix == null)
{
_boundsMatrix = (NSAffineTransform)NSAffineTransform.Alloc().Init();
}
_boundsMatrix.RotateByDegrees(angle);
// Adjust bounds
matrix = (NSAffineTransform)_boundsMatrix.Copy();
matrix.Invert();
matrix.BoundingRectFor(frame, ref _bounds);
//RELEASE(matrix);
_is_rotated_from_base = _is_rotated_or_scaled_from_base = true;
if (_coordinates_valid)
{
//FIXME
//(*invalidateImp)(self, invalidateSel);
}
this.ResetCursorRects();
if (_post_bounds_changes)
{
//[nc postNotificationName: NSViewBoundsDidChangeNotification object: self];
}
}
}