Merge branch 'base-conversion' of https://github.com/aparajita/cappuccino into aparajita-base-conversion

This commit is contained in:
Alexander Ljungberg
2010-11-05 15:29:12 -03:00
+40
View File
@@ -1566,6 +1566,16 @@ var CPViewFlags = { },
return CGPointApplyAffineTransform(aPoint, _CPViewGetTransform(aView, self));
}
/*!
Converts the point from the base coordinate system to the receiver’s coordinate system.
@param aPoint A point specifying a location in the base coordinate system
@return The point converted to the receiver’s base coordinate system
*/
- (CGPoint)convertPointFromBase:(CGPoint)aPoint
{
return CGPointApplyAffineTransform(aPoint, _CPViewGetTransform(nil, self));
}
/*!
Converts \c aPoint from the receiver's coordinate space to the coordinate space of \c aView.
@param aPoint the point to convert
@@ -1577,6 +1587,16 @@ var CPViewFlags = { },
return CGPointApplyAffineTransform(aPoint, _CPViewGetTransform(self, aView));
}
/*!
Converts the point from the receiver’s coordinate system to the base coordinate system.
@param aPoint A point specifying a location in the coordinate system of the receiver
@return The point converted to the base coordinate system
*/
- (CGPoint)convertPointToBase:(CGPoint)aPoint
{
return CGPointApplyAffineTransform(aPoint, _CPViewGetTransform(self, nil));
}
/*!
Convert's \c aSize from \c aView's coordinate space to the receiver's coordinate space.
@param aSize the size to convert
@@ -1610,6 +1630,16 @@ var CPViewFlags = { },
return CGRectApplyAffineTransform(aRect, _CPViewGetTransform(aView, self));
}
/*!
Converts the rectangle from the base coordinate system to the receiver’s coordinate system.
@param aRect A rectangle specifying a location in the base coordinate system
@return The rectangle converted to the receiver’s base coordinate system
*/
- (CGRect)convertRectFromBase:(CGRect)aRect
{
return CGRectApplyAffineTransform(aRect, _CPViewGetTransform(nil, self));
}
/*!
Converts \c aRect from the receiver's coordinate space to \c aView's coordinate space.
@param aRect the rectangle to convert
@@ -1621,6 +1651,16 @@ var CPViewFlags = { },
return CGRectApplyAffineTransform(aRect, _CPViewGetTransform(self, aView));
}
/*!
Converts the rectangle from the receiver’s coordinate system to the base coordinate system.
@param aRect A rectangle specifying a location in the coordinate system of the receiver
@return The rectangle converted to the base coordinate system
*/
- (CGRect)convertRectToBase:(CGRect)aRect
{
return CGRectApplyAffineTransform(aRect, _CPViewGetTransform(self, nil));
}
/*!
Sets whether the receiver posts a CPViewFrameDidChangeNotification notification
to the default notification center when its frame is changed. The default is \c NO.