on master help sign in
correcting translate
5043ac6coreyoconnor
src/Graphics/Vty/Image.hs+4−2
@@ -203,6 +203,7 @@ image_width HorizJoin { output_width = w } = w
203image_width VertJoin { output_width = w } = w
203image_width VertJoin { output_width = w } = w
204image_width BGFill { output_width = w } = w
204image_width BGFill { output_width = w } = w
205image_width EmptyImage = 0
205image_width EmptyImage = 0
206+image_width ( Translation _v i ) = image_width i
206
207
207-- | The height of an Image. This is the number of display rows the image will occupy.
208-- | The height of an Image. This is the number of display rows the image will occupy.
208image_height :: Image -> Word
209image_height :: Image -> Word
@@ -211,6 +212,7 @@ image_height HorizJoin { output_height = r } = r
211image_height VertJoin { output_height = r } = r
212image_height VertJoin { output_height = r } = r
212image_height BGFill { output_height = r } = r
213image_height BGFill { output_height = r } = r
213image_height EmptyImage = 0
214image_height EmptyImage = 0
215+image_height ( Translation _v i ) = image_width i
214
216
215-- | Combines two images side by side.
217-- | Combines two images side by side.
216--
218--
@@ -330,6 +332,6 @@ char_fill !a !c w h =
330empty_image :: Image
332empty_image :: Image
331empty_image = EmptyImage
333empty_image = EmptyImage
332
334
333−translate :: Image -> (Int, Int) -> Image
335+translate :: (Int, Int) -> Image -> Image
334−translate i v = Translation v i
336+translate v i = Translation v i
335
337