Skip to content

Commit

Permalink
Format properly margin FX docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja committed May 24, 2021
1 parent 4cfecd1 commit b36af47
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions moviepy/video/fx/margin.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,30 @@ def margin(
"""
Draws an external margin all around the frame.
:param margin_size: if not ``None``, then the new clip has a margin_size of
size ``margin_size`` in pixels on the left, right, top, and bottom.
:param left, right, top, bottom: width of the margin in pixel
in these directions.
Parameters
----------
:param color: color of the margin.
margin_size : int, optional
If not ``None``, then the new clip has a margin size of
size ``margin_size`` in pixels on the left, right, top, and bottom.
:param mask_margin: value of the mask on the margin. Setting
this value to 0 yields transparent margins.
left : int, optional
If ``margin_size=None``, margin size for the new clip in left direction.
right : int, optional
If ``margin_size=None``, margin size for the new clip in right direction.
top : int, optional
If ``margin_size=None``, margin size for the new clip in top direction.
bottom : int, optional
If ``margin_size=None``, margin size for the new clip in bottom direction.
color : tuple, optional
Color of the margin.
opacity : float, optional
Opacity of the margin. Setting this value to 0 yields transparent margins.
"""
if (opacity != 1.0) and (clip.mask is None) and not (clip.is_mask):
clip = clip.add_mask()
Expand Down

0 comments on commit b36af47

Please sign in to comment.