-
-
Save danielctull/7ef1f9d9d65754316ae3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CGRect PSPDFRectSafeInset(CGRect rect, CGFloat dx, CGFloat dy) { | |
CGRect insetRect = CGRectInset(rect, dx, dy); | |
if (CGRectIsNull(insetRect)) { | |
insetRect = CGRectMake(CGRectGetMidX(rect), CGRectGetMidY(rect), 0.f, 0.f); | |
} | |
return insetRect; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment