Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update example Minart backend to 0.6.0-M1 #81

Merged
merged 1 commit into from
Nov 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions examples/release/example-minart-backend.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//> using scala "3.3.1"
//> using lib "eu.joaocosta::minart::0.5.3"
//> using lib "eu.joaocosta::minart::0.6.0-M1"
//> using lib "eu.joaocosta::interim::0.1.4"

/** This file contains a simple graphical backend written in Minart.
Expand All @@ -8,12 +8,12 @@
*/
import scala.concurrent.Future

import eu.joaocosta.minart.backend.defaults.*
import eu.joaocosta.minart.graphics.{Color => MinartColor, *}
import eu.joaocosta.interim.*
import eu.joaocosta.minart.backend.defaults.given
import eu.joaocosta.minart.graphics.image.*
import eu.joaocosta.minart.runtime.*
import eu.joaocosta.minart.graphics.{Color => MinartColor, *}
import eu.joaocosta.minart.input.*
import eu.joaocosta.interim.*
import eu.joaocosta.minart.runtime.*

object MinartBackend:

Expand Down Expand Up @@ -88,7 +88,9 @@ object MinartBackend:
canvas
.blit(charSprite, BlendMode.ColorMask(MinartColor(255, 0, 255)))(x, y)
}
case RenderOp.Custom(Rect(x, y, w, h), color, _) =>
case RenderOp.Custom(Rect(x, y, w, h), color, surface: Surface) =>
canvas.blit(surface)(x, y, 0, 0, w, h)
case RenderOp.Custom(Rect(x, y, w, h), color, data) =>
canvas.fillRegion(x, y, w, h, MinartColor(color.r, color.g, color.b))
}

Expand Down
10 changes: 5 additions & 5 deletions examples/snapshot/example-minart-backend.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//> using scala "3.3.1"
//> using lib "eu.joaocosta::minart::0.5.3"
//> using lib "eu.joaocosta::minart::0.6.0-M1"
//> using lib "eu.joaocosta::interim::0.1.5-SNAPSHOT"

/** This file contains a simple graphical backend written in Minart.
Expand All @@ -8,12 +8,12 @@
*/
import scala.concurrent.Future

import eu.joaocosta.minart.backend.defaults.*
import eu.joaocosta.minart.graphics.{Color => MinartColor, *}
import eu.joaocosta.interim.*
import eu.joaocosta.minart.backend.defaults.given
import eu.joaocosta.minart.graphics.image.*
import eu.joaocosta.minart.runtime.*
import eu.joaocosta.minart.graphics.{Color => MinartColor, *}
import eu.joaocosta.minart.input.*
import eu.joaocosta.interim.*
import eu.joaocosta.minart.runtime.*

object MinartBackend:

Expand Down
Loading