CGContextIsPathEmpty for non-canvas based platforms.

Unfortunately there doesn't seem to be a way to get the current path from a canvas context so this function only works in VML mode for now.
This commit is contained in:
Alexander Ljungberg
2012-10-15 02:49:11 +01:00
parent ca4e034a3b
commit 9c2cb393c2
+10
View File
@@ -321,6 +321,16 @@ function CGContextClosePath(aContext)
CGPathCloseSubpath(aContext.path);
}
/*!
Return YES if the current path in the given context is empty.
@param aContext the CGContext to examine
@return BOOL
*/
function CGContextIsPathEmpty(aContext)
{
return (!aContext.path || CGPathIsEmpty(aContext.path));
}
/*!
Moves the current location of aContext to the given x and y coordinates
@param aContext the CGContext to move