on master help sign in
correcting translate

Ignore-this: eece77b7cc97a84ac3de68e65e5593a8 darcs-hash:20091008034401-f0a0d-dfac88310314e98506e718e2dcdfa06d77839e3b.gz

commit5043ac6f5b6ca8973d744272633e222495bedbdc authorcoreyoconnor <coreyoconnor@gmail.com> dateWed 7 Oct 2009, 20:44 (17 years ago) parent3c97d77
1 file changed+4−2
src/Graphics/Vty/Image.hs+4−2
src/Graphics/Vty/Image.hs+4−2
@@ -203,6 +203,7 @@ image_width HorizJoin { output_width = w } = w
203203image_width VertJoin { output_width = w } = w
204204image_width BGFill { output_width = w } = w
205205image_width EmptyImage = 0
206+image_width ( Translation _v i ) = image_width i
206207
207208-- | The height of an Image. This is the number of display rows the image will occupy.
208209image_height :: Image -> Word
@@ -211,6 +212,7 @@ image_height HorizJoin { output_height = r } = r
211212image_height VertJoin { output_height = r } = r
212213image_height BGFill { output_height = r } = r
213214image_height EmptyImage = 0
215+image_height ( Translation _v i ) = image_width i
214216
215217-- | Combines two images side by side.
216218--
@@ -330,6 +332,6 @@ char_fill !a !c w h =
330332empty_image :: Image
331333empty_image = EmptyImage
332334
333−translate :: Image -> (Int, Int) -> Image
334−translate i v = Translation v i
335+translate :: (Int, Int) -> Image -> Image
336+translate v i = Translation v i
335337