Skip to content

Commit

Permalink
Update 03_overlay.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
elishowk committed Apr 13, 2015
1 parent c96db5a commit e6cd5c4
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion docs/tutorials/03_overlay.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,18 @@ Overlays are just like text nodes. They can be placed on screen using CSS like p
* top, bottom, left, right
* width, height

The only difference with text nodes is that you can add to them an image or a video: the aspect ratio of the image/video will be kept, so the overlay may not be completely filled by its content.
The only difference with text nodes is that you can add to them an image or a video:
the aspect ratio of the image/video will *NOT* be kept.
To do so, you'll need a filter of the type "fitAdapter" for the image to fit the overlay with the right aspect ratio.

.. code-block:: xml
<overlay left="0.1" width="0.3" top="0.1" height="0.3" margin-start="1.0" duration="4.0">
<image filename="http://s3.amazonaws.com/stupeflix-assets/apiusecase/landscapes_france_cevennes/4.jpg">
<filter type="fitAdapter">
</filter>
</image>
</overlay>
You can then animate the overlay using the same animators as for text.

Expand Down

0 comments on commit e6cd5c4

Please sign in to comment.