From 555d2fe2790f4d5dc215950f623b9873f865ecef Mon Sep 17 00:00:00 2001 From: "pinkerton%netscape.com" Date: Mon, 10 May 1999 23:41:03 +0000 Subject: [PATCH] using accessors for Regions when building under Carbon. --- gfx/src/mac/nsRegionMac.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gfx/src/mac/nsRegionMac.cpp b/gfx/src/mac/nsRegionMac.cpp index 13f90b3c5e1..034586a36ef 100644 --- a/gfx/src/mac/nsRegionMac.cpp +++ b/gfx/src/mac/nsRegionMac.cpp @@ -151,7 +151,12 @@ PRBool nsRegionMac :: IsEqual(const nsIRegion &aRegion) void nsRegionMac :: GetBoundingBox(PRInt32 *aX, PRInt32 *aY, PRInt32 *aWidth, PRInt32 *aHeight) { +#if TARGET_CARBON + Rect macRect; + ::GetRegionBounds (mRegion, &macRect); +#else Rect macRect = (**mRegion).rgnBBox; +#endif *aX = macRect.left; *aY = macRect.top; @@ -401,7 +406,11 @@ void nsRegionMac :: SetRegionType() if (::EmptyRgn(mRegion) == PR_TRUE) mRegionType = eRegionComplexity_empty; else +#if TARGET_CARBON + if ( ::IsRegionRectangular(mRegion) ) +#else if ((*mRegion)->rgnSize == 10) +#endif mRegionType = eRegionComplexity_rect; else mRegionType = eRegionComplexity_complex;