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:
@@ -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 )
|
||||
|
Reference in New Issue
Block a user