diff samples/sdl.tp @ 283:0ec4f1b68a38

Add copyTo method to texture that allows copying to a rectangular region on the renderer rather than stretching to fit the entire renderer
author Michael Pavone <pavone@retrodev.com>
date Mon, 21 Jul 2014 20:27:38 -0700
parents eb83863fd33e
children 99c18127da04
line wrap: on
line diff
--- a/samples/sdl.tp	Mon Jul 21 20:24:50 2014 -0700
+++ b/samples/sdl.tp	Mon Jul 21 20:27:38 2014 -0700
@@ -16,6 +16,7 @@
 								print: "Failed to copy texture to renderer: " . (sdl getError) . "\n"
 							}
 							surf free
+							tex copyTo: (sdl rect: 160 120 size: 320 224)
 							render present
 							sdl delay: 3000u32
 							tex destroy