Return (0,0,0,0) rectangle if clipping region is empty

When clipping region is empty, CGContextGetClipBoundingBox() returns (+Inf,+Inf,0,0) rectangle but we need to return (0,0,0,0) rectangle in this case.

See #17609.
This commit is contained in:
arturs
2017-07-02 15:06:06 +02:00
committed by Artur Wieczorek
parent c55bbdf700
commit 715608fe6a

View File

@@ -1925,6 +1925,11 @@ void wxMacCoreGraphicsContext::GetClipBox(wxDouble* x, wxDouble* y, wxDouble* w,
// wxFAIL_MSG( "Needs a valid context for clipping" );
#endif
}
if ( CGRectIsEmpty(r) )
{
r = CGRectZero;
}
CheckInvariants();
if ( x )