Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rethinking image and video layers' destX, destY, destWidth and destHeight #288

Open
clabe45 opened this issue Oct 27, 2024 · 0 comments
Open
Labels
help wanted Extra attention is needed priority:high type:feature New feature or request

Comments

@clabe45
Copy link
Collaborator

clabe45 commented Oct 27, 2024

Background

If a layer is rotated with the Transform effect, the parts of the layer that are rotated outside its bounding box (x, y, width, and height) are cropped (#46). This happens because of the way Etro renders layers onto the movie. First, all layers are rendered on separate invisible canvases. Then, each layer is rendered onto the movie's canvas.

To fix this for images and videos, four options were introduced to these two layers, letting the user configure the layer's and image's/video's bounding boxes separately:

  • destX
  • destY
  • destWidth
  • destHeight

These can sometimes be confused with x, y, width and height, which define where on the movie the layer is rendered. destX, destY, destWidth and destHeight define where on the layer the image or video is rendered.

When rotating an image or layer, the user is encouraged to:

  1. Replace x, y, width and height with destX, destY, destWidth and destHeight, respectively.
  2. Set x and y to 0 and width and height to the movie's width and height, respectively.

Problem

There are two problems with this approach:

  1. This only fixes the cropping issue for images and videos, but the issue can happen when rotating any layer.
  2. Letting the user define the image/video's and the layer's bounding boxes separately creates a complex and confusing library interface.

Open to suggestions for alternative approaches!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed priority:high type:feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant