Skip to content

Commit fa1eeee

Browse files
committed
Update ColorResolved ResolvedPaint
1 parent 40473a5 commit fa1eeee

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

Sources/OpenSwiftUICore/Graphic/Color/Color+ShapeStyle.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// OpenSwiftUICore
44
//
55
// Audited for iOS 18.0
6-
// Status: WIP
6+
// Status: Complete
77

88
package import Foundation
99

@@ -63,7 +63,7 @@ extension ColorProvider {
6363

6464
extension Color.Resolved: ResolvedPaint {
6565
package func draw(path: Path, style: PathDrawingStyle, in context: GraphicsContext, bounds: CGRect?) {
66-
preconditionFailure("TODO")
66+
context.draw(path, with: .color(self), style: style)
6767
}
6868

6969
package var isClear: Bool { opacity == 0 }

Sources/OpenSwiftUICore/Graphic/GraphicsContext.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,4 +479,18 @@ public struct GraphicsContext {
479479
self.init(rawValue: CGBlendMode.plusLighter.rawValue)
480480
}
481481
}
482+
483+
// FIXME
484+
package enum ResolvedShading: Sendable {
485+
case backdrop(Color.Resolved)
486+
case color(Color.Resolved)
487+
case style(_ShapeStyle_Pack.Style)
488+
case levels([GraphicsContext.ResolvedShading])
489+
}
490+
}
491+
492+
extension GraphicsContext {
493+
package func draw(_ path: Path, with shading: GraphicsContext.ResolvedShading, style: PathDrawingStyle) {
494+
preconditionFailure("TODO")
495+
}
482496
}

0 commit comments

Comments
 (0)