mirror of
https://github.com/ichmagmaus111/ghostgram.git
synced 2026-11-09 00:38:08 +01:00
Ghostgram for iOS, rebuilt from scratch on Telegram iOS 13.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33 lines
718 B
Swift
33 lines
718 B
Swift
#if canImport(CoreGraphics)
|
|
import CoreGraphics
|
|
#else
|
|
import Foundation
|
|
#endif
|
|
|
|
public extension Rect {
|
|
/// Initialize a `Rect` using the provided `CGRect` values.
|
|
init(_ rect: CGRect) {
|
|
self.init(
|
|
origin: Point(rect.origin),
|
|
size: Size(rect.size)
|
|
)
|
|
}
|
|
|
|
@available(*, deprecated, renamed: "CGRect(_:)", message: "Use CGRect initializer directly")
|
|
var cgRect: CGRect {
|
|
CGRect(self)
|
|
}
|
|
}
|
|
|
|
public extension CGRect {
|
|
/// Initialize a `CGRect` using the provided `Rect` values.
|
|
init(_ rect: Rect) {
|
|
self.init(
|
|
x: rect.x,
|
|
y: rect.y,
|
|
width: rect.width,
|
|
height: rect.height
|
|
)
|
|
}
|
|
}
|