-
Notifications
You must be signed in to change notification settings - Fork 1
/
CGRectHelper.h
37 lines (27 loc) · 1.11 KB
/
CGRectHelper.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//
// CGRectHelper.h
//
// Created by Maximus McCann on 5/22/14.
//
// MIT License. Use at your own risk.
#import <Foundation/Foundation.h>
CGSize CGAddSizeToSize(CGSize size1, CGSize size2);
CGSize CGSubSizeFromSize(CGSize size1, CGSize size2);
CGPoint CGAddPointToPoint(CGPoint point1, CGPoint point2);
CGPoint CGSubPointFromPoint(CGPoint point1, CGPoint point2);
CGRect CGRectSetWidth(CGRect rect, CGFloat width);
CGRect CGRectAddWidth(CGRect rect, CGFloat width);
CGRect CGRectSetHeight(CGRect rect, CGFloat height);
CGRect CGRectAddHeight(CGRect rect, CGFloat height);
CGRect CGRectSetSize(CGRect rect, CGSize size);
CGRect CGRectAddSize(CGRect rect, CGSize size);
CGRect CGRectSubSize(CGRect rect, CGSize size);
CGRect CGRectSetX(CGRect rect, CGFloat x);
CGRect CGRectAddX(CGRect rect, CGFloat x);
CGRect CGRectSetY(CGRect rect, CGFloat y);
CGRect CGRectAddY(CGRect rect, CGFloat y);
CGRect CGRectSetOrigin(CGRect rect, CGPoint origin);
CGRect CGRectAddOrigin(CGRect rect, CGPoint origin);
CGRect CGRectSubOrigin(CGRect rect, CGPoint origin);
CGFloat CGRectRightX(CGRect rect);
CGFloat CGRectBottomY(CGRect rect);