summaryrefslogtreecommitdiff
path: root/engine/node-2d.scm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/node-2d.scm')
-rw-r--r--engine/node-2d.scm28
1 files changed, 20 insertions, 8 deletions
diff --git a/engine/node-2d.scm b/engine/node-2d.scm
index 3de1597..d5919aa 100644
--- a/engine/node-2d.scm
+++ b/engine/node-2d.scm
@@ -1,5 +1,6 @@
;;; Lisp Game Jam 2018
;;; Copyright © 2018 David Thompson <davet@gnu.org>
+;;; Copyright © 2021 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This program is free software: you can redistribute it and/or
;;; modify it under the terms of the GNU General Public License as
@@ -20,13 +21,13 @@
#:use-module (chickadee math matrix)
#:use-module (chickadee math rect)
#:use-module (chickadee math vector)
- #:use-module (chickadee render)
- #:use-module (chickadee render color)
- #:use-module (chickadee render font)
- #:use-module (chickadee render framebuffer)
- #:use-module (chickadee render shapes)
- #:use-module (chickadee render sprite)
- #:use-module (chickadee render texture)
+ #:use-module (chickadee graphics)
+ #:use-module (chickadee graphics color)
+ #:use-module (chickadee graphics font)
+ #:use-module (chickadee graphics framebuffer)
+ #:use-module (chickadee graphics path)
+ #:use-module (chickadee graphics sprite)
+ #:use-module (chickadee graphics texture)
#:use-module (chickadee scripting)
#:use-module (ice-9 match)
#:use-module (engine assets)
@@ -346,7 +347,18 @@
(color #:accessor color #:init-form black #:init-keyword #:color))
(define-method (draw (r <filled-rect>) alpha)
- (draw-filled-rect (region r) (color r) #:matrix (world-matrix r)))
+ (draw-canvas (make-canvas
+ (with-style
+ ((fill-color (color r)))
+ (fill
+ (rectangle (vec2 (rect-left (region r))
+ (rect-bottom (region r)))
+ (rect-width (region r))
+ (rect-height (region r)))))
+ ;; TODO: wrong type
+ ;#:matrix
+ ;(world-matrix r)
+ )))
;;;