diff options
-rw-r--r-- | chickadee/render/texture.scm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chickadee/render/texture.scm b/chickadee/render/texture.scm index ba7233a..960b7d0 100644 --- a/chickadee/render/texture.scm +++ b/chickadee/render/texture.scm @@ -269,6 +269,14 @@ magnification. Valid values are 'nearest and 'linear. By default, (texture texture-atlas-texture) (vector texture-atlas-vector)) +(define (display-texture-atlas atlas port) + (format port + "#<texture-atlas texture: ~a size: ~d>" + (texture-atlas-texture atlas) + (vector-length (texture-atlas-vector atlas)))) + +(set-record-type-printer! <texture-atlas> display-texture-atlas) + (define (list->texture-atlas texture rects) "Return a new atlas for TEXTURE containing RECTS, a list of texture coordinate rects denoting the various tiles within." |