Added missing documentation to the source code in the Playdate bindings target.
CI / Build & test (macOS) (push) Has been cancelled
CI / Embedded Swift cross-compile (push) Has been cancelled
Documentation / deploy (push) Has been cancelled

This commit is contained in:
2026-07-25 12:55:53 +02:00
parent b435a6e8bd
commit 91783deb7b
63 changed files with 259 additions and 3 deletions
@@ -3,10 +3,15 @@ internal import CPlaydate
extension Graphics {
/// A drawing color: solid or an 8×8 pattern.
public enum Color: Sendable {
/// Solid black.
case black
/// Solid white.
case white
/// Transparent; leaves the destination unchanged.
case clear
/// Inverts the destination pixels.
case xor
/// An 8×8 two-color pattern.
case pattern(Pattern)
/// Materializes the `LCDColor` for the duration of `body`. Pattern
@@ -3,13 +3,21 @@ internal import CPlaydate
extension Graphics {
/// How source pixels combine with the destination when drawing.
public enum DrawMode: UInt32, Sendable {
/// Source pixels replace the destination.
case copy = 0
/// White source pixels are treated as transparent.
case whiteTransparent = 1
/// Black source pixels are treated as transparent.
case blackTransparent = 2
/// Opaque source pixels draw white.
case fillWhite = 3
/// Opaque source pixels draw black.
case fillBlack = 4
/// Source pixels are XORed with the destination.
case xor = 5
/// The inverse of `xor`.
case nxor = 6
/// Source pixels draw inverted.
case inverted = 7
init(_ mode: LCDBitmapDrawMode) { self = DrawMode(rawValue: UInt32(mode.rawValue)) ?? .copy }