From b436f290b42b74c9149a3c765e1eea26606eac68 Mon Sep 17 00:00:00 2001 From: skn3 Date: Thu, 30 Jan 2014 15:11:55 +0000 Subject: [PATCH] added two methods to image class to allow rudamentry access for module developers --- modules/mojo/graphics.monkey | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/mojo/graphics.monkey b/modules/mojo/graphics.monkey index 5680842b..7e35e0ad 100644 --- a/modules/mojo/graphics.monkey +++ b/modules/mojo/graphics.monkey @@ -129,6 +129,14 @@ Class Image device.WritePixels2 surface,pixels,x,y,width,height,offset,pitch End + Method GetSurface:Surface() + Return surface + End + + Method GetSurfaceRegion:Int[] (frame:Int = 0) + Return[frames[frame].x, frames[frame].y, width, height] + End + Private Const FullFrame=65536 '$10000