aseprite / aseprite/api

Image:putImage() with a position gives varying results

Open
#3 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
307
Forks
68
PR merge metrics
No merged PRs in 30d

Description

The docs state that `If position [the second argument] is a point, it will put the given image in the given position` with regard to Image:putImage(). I would expect the Point given to be relative to the Sprite, `(0, 0)` being the top left. I've gotten different results with this, however.

On one sprite, it seemed that the position given would be relative to the top left of the image already existing in that cel. On a blank cel of the same sprite, it was relative to the top left of the Sprite which is what I would expect.

If I create a brand new sprite however, instead of moving the image, it actually puts the image in the very top left *no matter what*, and the point given actually clips the sprite.

To reproduce the clipping bug, create a new sprite of any size and draw anything. Then execute the attached Lua script and choose "Apply to new layer".

[color-overlay.lua.zip](https://github.com/aseprite/api/files/2549299/color-overlay.lua.zip)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.