# Draw image on self, for top left position
fun blit( image: I, x, y: Int ) is abstract
+ # Draw image on self, for top left position but scaled
+ # the width and height of the target rectangle is specified
+ fun blit_scaled(image: Image, x, y, w, h: Int)
+ do
+ var fx = x.to_f
+ var fy = y.to_f
+ var fx2 = fx + w.to_f
+ var fy2 = fy + h.to_f
+ blit_stretched(image, fx, fy, fx, fy2, fx2, fy2, fx2, fy)
+ end
+
# Draw image, centered at position
fun blit_centered( image: I, x, y: Int ) is abstract
fun blit_rotated_scaled( image: I, x, y, angle, scale: Float ) is abstract
# Draw image by specifying the positon of each image corners
- # Corners are in clockwise order stating top right
- # a is top right, b is bottom right, c is bottom left and d is top left
+ # Corners are in counter-clockwise order stating top left
+ # a is top left, b is bottom left, c is bottom right and d is top right
+ # ~~~
+ # a-d
+ # | |
+ # b-c
+ # ~~~
fun blit_stretched( image: I, ax, ay, bx, by, cx, cy, dx, dy: Float )
is abstract