зеркало из https://github.com/mozilla/pjs.git
using accessors for Regions when building under Carbon.
This commit is contained in:
Родитель
e7170b2816
Коммит
555d2fe279
|
@ -151,7 +151,12 @@ PRBool nsRegionMac :: IsEqual(const nsIRegion &aRegion)
|
||||||
|
|
||||||
void nsRegionMac :: GetBoundingBox(PRInt32 *aX, PRInt32 *aY, PRInt32 *aWidth, PRInt32 *aHeight)
|
void nsRegionMac :: GetBoundingBox(PRInt32 *aX, PRInt32 *aY, PRInt32 *aWidth, PRInt32 *aHeight)
|
||||||
{
|
{
|
||||||
|
#if TARGET_CARBON
|
||||||
|
Rect macRect;
|
||||||
|
::GetRegionBounds (mRegion, &macRect);
|
||||||
|
#else
|
||||||
Rect macRect = (**mRegion).rgnBBox;
|
Rect macRect = (**mRegion).rgnBBox;
|
||||||
|
#endif
|
||||||
|
|
||||||
*aX = macRect.left;
|
*aX = macRect.left;
|
||||||
*aY = macRect.top;
|
*aY = macRect.top;
|
||||||
|
@ -401,7 +406,11 @@ void nsRegionMac :: SetRegionType()
|
||||||
if (::EmptyRgn(mRegion) == PR_TRUE)
|
if (::EmptyRgn(mRegion) == PR_TRUE)
|
||||||
mRegionType = eRegionComplexity_empty;
|
mRegionType = eRegionComplexity_empty;
|
||||||
else
|
else
|
||||||
|
#if TARGET_CARBON
|
||||||
|
if ( ::IsRegionRectangular(mRegion) )
|
||||||
|
#else
|
||||||
if ((*mRegion)->rgnSize == 10)
|
if ((*mRegion)->rgnSize == 10)
|
||||||
|
#endif
|
||||||
mRegionType = eRegionComplexity_rect;
|
mRegionType = eRegionComplexity_rect;
|
||||||
else
|
else
|
||||||
mRegionType = eRegionComplexity_complex;
|
mRegionType = eRegionComplexity_complex;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче