Files
swiftui-math/Sources/SwiftUIMath/Internal/Display/DisplayNode.swift
Guille Gonzalez e26d7d01b5 Add Typesetter
2026-01-03 08:11:38 +01:00

21 lines
539 B
Swift

import CoreGraphics
import Foundation
extension Math {
class DisplayNode {
var ascent: CGFloat = 0
var descent: CGFloat = 0
var width: CGFloat = 0
var position: CGPoint = .zero
var range: NSRange = NSRange(location: 0, length: 0)
var hasScript: Bool = false
var textColor: PlatformColor?
var localTextColor: PlatformColor?
var localBackgroundColor: PlatformColor?
func bounds() -> CGRect {
CGRect(x: position.x, y: position.y - descent, width: width, height: ascent + descent)
}
}
}