From 3b111cdaf376f3cab694275e0eed951a2dd30fad Mon Sep 17 00:00:00 2001 From: Alsey Coleman Miller Date: Sat, 14 Dec 2024 22:56:40 -0500 Subject: [PATCH] Expose compatibility API --- Sources/Silica/CGContext.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sources/Silica/CGContext.swift b/Sources/Silica/CGContext.swift index e4a8bd0..3d96255 100644 --- a/Sources/Silica/CGContext.swift +++ b/Sources/Silica/CGContext.swift @@ -321,7 +321,8 @@ public final class CGContext { internalState = newState } - internal func saveGState() { + /// Pushes a copy of the current graphics state onto the graphics state stack for the context. + public func saveGState() { try! save() } @@ -341,7 +342,7 @@ public final class CGContext { internalState = restoredState } - @inline(__always) + /// Sets the current graphics state to the state most recently saved. public func restoreGState() { try! restore() }