lib/tileset: intro `TileSetFont::advance`
authorAlexis Laferrière <alexis.laf@xymus.net>
Mon, 25 Aug 2014 19:31:29 +0000 (15:31 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Wed, 11 Mar 2015 15:56:39 +0000 (11:56 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/mnit/tileset.nit

index 5bd5d4d..41872bd 100644 (file)
@@ -84,6 +84,9 @@ class TileSetFont
                if i == -1 then return null
                return subimages[i]
        end
+
+       # Distance between the beginning of a letter tile and the beginning of the next letter tile
+       fun advance: Numeric do return width.add(hspace)
 end
 
 redef class Display