Merge pull request #318 from jdf-id-au/master

fix drawImage dy typos
This commit is contained in:
Ryan Oldenburg 2021-11-18 15:13:33 -06:00 committed by GitHub
commit 477ed6267e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -555,7 +555,7 @@ proc drawImage*(
ctx: Context, image: Image, dx, dy: float32
) {.raises: [PixieError].} =
## 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].} =
## Draws a source image onto the destination image.
@ -573,7 +573,7 @@ proc drawImage*(
) {.raises: [PixieError].} =
## Draws a source image onto the destination image.
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].} =
## Draws a source image onto the destination image.