Macos OS X 10.7删除了函数EmptyRect和SectRect,有哪些替换?

Macos OS X 10.7删除了函数EmptyRect和SectRect,有哪些替换?,macos,osx-lion,deprecated,Macos,Osx Lion,Deprecated,我正在为OSXLion编译旧的苹果示例代码。代码正在使用函数EmptyRect和SectRect。Lion API diff告诉我它们被移除了。我应该使用什么函数来代替?您可以手动设置矩形,如下所示: Rect myRect = { left, top, right, bottom }; // Same as SetRect (left, top, right, bottom); if ((myRect.right <= myRect.left) || (myRect.bottom <

我正在为OSXLion编译旧的苹果示例代码。代码正在使用函数EmptyRect和SectRect。Lion API diff告诉我它们被移除了。我应该使用什么函数来代替?

您可以手动设置矩形,如下所示:

Rect myRect = { left, top, right, bottom }; // Same as SetRect (left, top, right, bottom);
if ((myRect.right <= myRect.left) || (myRect.bottom <= myRect.top)) // Same as EmptyRect (myRect)
{
    //... do something
}
Rect myRect={left,top,right,bottom};//与SetRect相同(左、上、右、下);

如果((myRect.right),我认为它们是简单的函数,只需要相应的实现。谢谢!