Description
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:
- Replace
x
,y
,width
andheight
withdestX
,destY
,destWidth
anddestHeight
, respectively. - Set
x
andy
to 0 andwidth
andheight
to the movie's width and height, respectively.
Problem
There are two problems with this approach:
- This only fixes the cropping issue for images and videos, but the issue can happen when rotating any layer.
- 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!