Skip to content

Commit 735ce20

Browse files
committed
Add CG types support
1 parent 03ddedb commit 735ce20

File tree

4 files changed

+55
-0
lines changed

4 files changed

+55
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//
2+
// CGContext.swift
3+
// OpenCoreGraphics
4+
//
5+
// Created by Kyle on 1/11/26.
6+
// Status: Empty
7+
8+
open class CGContext {}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//
2+
// CAAction.swift
3+
// OpenCoreGraphics
4+
//
5+
// Created by Kyle on 1/11/26.
6+
// Status: Empty
7+
8+
public protocol CAAction: AnyObject {}
9+
10+
open class CABasicAnimation: CAAction {
11+
12+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
//
2+
// CALayer.swift
3+
// OpenCoreGraphics
4+
//
5+
// Created by Kyle on 1/11/26.
6+
// Status: Empty
7+
8+
open class CALayer {
9+
open weak var delegate: CALayerDelegate?
10+
11+
open var contents: CGImage?
12+
13+
open var contentsScale: CGFloat = 1.0
14+
}
15+
16+
extension CALayer: Hashable {
17+
public func hash(into hasher: inout Hasher) {
18+
hasher.combine(ObjectIdentifier(self))
19+
}
20+
21+
public static func == (lhs: CALayer, rhs: CALayer) -> Bool {
22+
return lhs === rhs
23+
}
24+
}
25+
26+
public protocol CALayerDelegate: AnyObject {
27+
func action(forKey event: String) -> CABasicAnimation?
28+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//
2+
// CGImage.swift
3+
// OpenCoreGraphics
4+
//
5+
// Created by Kyle on 1/11/26.
6+
7+
open class CGImage {}

0 commit comments

Comments
 (0)