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
@@ -39,6 +39,7 @@ extension Graphics {
// MARK: Properties
/// The bitmap's dimensions, row stride, and raw storage.
public var data: Data {
var width: Int32 = 0, height: Int32 = 0, rowBytes: Int32 = 0
var mask: UnsafeMutablePointer<UInt8>?
@@ -61,7 +62,9 @@ extension Graphics {
return size
}
/// The bitmap's width, in pixels.
public var width: Int { size.width }
/// The bitmap's height, in pixels.
public var height: Int { size.height }
/// The color of the pixel at (x, y).
@@ -84,6 +87,7 @@ extension Graphics {
color.withLCDColor { gfx.pointee.clearBitmap.unsafelyUnwrapped(pointer, $0) }
}
/// Returns a new copy of the bitmap.
public func copy() -> Bitmap {
Bitmap(pointer: gfx.pointee.copyBitmap.unsafelyUnwrapped(pointer).unsafelyUnwrapped, isOwned: true)
}