fix drawImage dy typos

This commit is contained in:
Jeremy Field 2021-11-18 18:08:45 +11:00
parent cf3dd45b3b
commit eec887f439

View file

@ -555,7 +555,7 @@ proc drawImage*(
ctx: Context, image: Image, dx, dy: float32 ctx: Context, image: Image, dx, dy: float32
) {.raises: [PixieError].} = ) {.raises: [PixieError].} =
## Draws a source image onto the destination image. ## Draws a source image onto the destination image.
ctx.drawImage(image, dx, dx, image.width.float32, image.height.float32) ctx.drawImage(image, dx, dy, image.width.float32, image.height.float32)
proc drawImage*(ctx: Context, image: Image, pos: Vec2) {.raises: [PixieError].} = proc drawImage*(ctx: Context, image: Image, pos: Vec2) {.raises: [PixieError].} =
## Draws a source image onto the destination image. ## Draws a source image onto the destination image.
@ -573,7 +573,7 @@ proc drawImage*(
) {.raises: [PixieError].} = ) {.raises: [PixieError].} =
## Draws a source image onto the destination image. ## Draws a source image onto the destination image.
let image = image.subImage(sx.int, sy.int, sWidth.int, sHeight.int) let image = image.subImage(sx.int, sy.int, sWidth.int, sHeight.int)
ctx.drawImage(image, dx, dx, image.width.float32, image.height.float32) ctx.drawImage(image, dx, dy, image.width.float32, image.height.float32)
proc drawImage*(ctx: Context, image: Image, src, dest: Rect) {.raises: [PixieError].} = proc drawImage*(ctx: Context, image: Image, src, dest: Rect) {.raises: [PixieError].} =
## Draws a source image onto the destination image. ## Draws a source image onto the destination image.