2026-07-25 12:39:32 +02:00
|
|
|
internal import CPlaydate
|
|
|
|
|
|
|
|
|
|
extension Graphics {
|
2026-09-18 12:45:39 +02:00
|
|
|
/// Wrapping for the rect-bounded `drawText` overloads and `Font.textHeight`.
|
|
|
|
|
/// Wraps `PDTextWrappingMode`.
|
2026-07-25 12:39:32 +02:00
|
|
|
public enum TextWrappingMode: UInt32, Sendable {
|
2026-09-18 12:45:39 +02:00
|
|
|
/// No wrapping; text past the edge is clipped.
|
2026-07-25 12:39:32 +02:00
|
|
|
case clip = 0
|
|
|
|
|
case character = 1
|
|
|
|
|
case word = 2
|
|
|
|
|
|
|
|
|
|
var cValue: PDTextWrappingMode { PDTextWrappingMode(PDTextWrappingMode.RawValue(rawValue)) }
|
|
|
|
|
}
|
|
|
|
|
}
|