summaryrefslogtreecommitdiffstats
path: root/src/Gameboy/Canvas/DrawContextInterface.php
diff options
context:
space:
mode:
authorGabriel Rodrigues Couto <gabrielrcouto@gmail.com>2016-02-21 16:30:00 -0300
committerGabriel Rodrigues Couto <gabrielrcouto@gmail.com>2016-02-21 16:30:00 -0300
commit48a6f1c5178c3c9641155297faf79c27d143fc4f (patch)
treebdc7424cdebfad6badf4bbb70f63936c7ed62610 /src/Gameboy/Canvas/DrawContextInterface.php
parent522c395e0da277408a8e8735049ab625d4a46b72 (diff)
downloadphp-terminal-gameboy-emulator-48a6f1c5178c3c9641155297faf79c27d143fc4f.zip
php-terminal-gameboy-emulator-48a6f1c5178c3c9641155297faf79c27d143fc4f.tar.gz
php-terminal-gameboy-emulator-48a6f1c5178c3c9641155297faf79c27d143fc4f.tar.bz2
Canvas is now injected - New possibilites :-)
Clear project files
Diffstat (limited to 'src/Gameboy/Canvas/DrawContextInterface.php')
-rw-r--r--src/Gameboy/Canvas/DrawContextInterface.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Gameboy/Canvas/DrawContextInterface.php b/src/Gameboy/Canvas/DrawContextInterface.php
new file mode 100644
index 0000000..73f0c43
--- /dev/null
+++ b/src/Gameboy/Canvas/DrawContextInterface.php
@@ -0,0 +1,18 @@
+<?php
+namespace GameBoy\Canvas;
+
+/**
+ * Interface to draw the GameBoy output
+ * GameBoy screen size: 160 x 144
+ */
+interface DrawContextInterface
+{
+ /**
+ * Draw image on canvas
+ *
+ * @param Array $canvasBuffer Each pixel => 4 items on array (RGBA)
+ * @param int $left
+ * @param int $top
+ */
+ public function draw($canvasBuffer, $left, $top);
+} \ No newline at end of file