Skip to content

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

Open
@clabe45

Description

@clabe45

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!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions