File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,28 @@ private func __equals(_ lhs: Rect, _ rhs: Rect) -> Bool {
9
9
return lhs. origin == rhs. origin && lhs. size == rhs. size
10
10
}
11
11
12
+ extension Rect {
13
+ /// Coordinates that establish the edges of a rectangle.
14
+ @frozen
15
+ public enum Edge : UInt32 {
16
+ /// The minimum value for the x-coordinate of the rectangle. In the default
17
+ /// coordinate space, this is the left edge of the rectangle.
18
+ case minXEdge
19
+
20
+ /// The minimum value for the y-coordinate of the rectangle. In the default
21
+ /// coordinate space, this is the top edge of the rectangle.
22
+ case minYEdge
23
+
24
+ /// The maximum value for the x-coordinate of the rectangle. In the default
25
+ /// coordinate space, this is the right edge of the rectangle.
26
+ case maxXEdge
27
+
28
+ /// The maximum value for the y-coordinate of the rectangle. In the default
29
+ /// coordinate space, this is the bottom edge of the rectangle.
30
+ case maxYEdge
31
+ }
32
+ }
33
+
12
34
/// A structure that contains the location and dimensions of a rectangle.
13
35
public struct Rect {
14
36
// MARK - Creating Rectangle Values
You can’t perform that action at this time.
0 commit comments