Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/upstream/set-stencil-image…
Browse files Browse the repository at this point in the history
…-nil-fix' into develop
  • Loading branch information
ninovanhooff committed Oct 12, 2024
2 parents bae81f0 + bf4f9c3 commit 09c5e19
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/playdate/graphics.nim
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,12 @@ proc set*(this: var LCDBitmap, x, y: int, color: LCDSolidColor = kColorBlack) =
var data = this.getData
data.set(x, y, color)

proc setStencilImage*(this: ptr PlaydateGraphics, bitmap: LCDBitmap, tile: bool) =
proc setStencilImage*(this: ptr PlaydateGraphics, bitmap: LCDBitmap, tile: bool = false) =
privateAccess(PlaydateGraphics)
this.setStencilImage(bitmap.resource, if tile: 1 else: 0)
if bitmap == nil:
this.setStencilImage(nil, if tile: 1 else: 0)
else:
this.setStencilImage(bitmap.resource, if tile: 1 else: 0)

proc makeFont*(this: LCDFontData, wide: bool): LCDFont =
privateAccess(PlaydateGraphics)
Expand Down

0 comments on commit 09c5e19

Please sign in to comment.