Skip to content

Commit

Permalink
Add actor.opacity to changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
lordmauve committed May 6, 2019
1 parent 258c97f commit 1df05a8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions doc/builtins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,8 @@ Actors or ``(x, y)`` coordinate pairs.
* Down is -90 degrees.


.. _transparency:

Transparency
''''''''''''

Expand Down
4 changes: 4 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ Changelog
1.3 - unreleased
----------------

* New: :ref:`Actors can be made transparent <transparency>` by assigning to
``actor.opacity``.
* New: screen.fill() now takes ``gcolor``, creating a vertical-linear gradient
* New: a :doc:`REPL <repl>` has been added, which allows exploring a game's
state while it is running.


1.2 - 2018-02-24
Expand Down
8 changes: 4 additions & 4 deletions pgzero/actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,11 @@ def opacity(self):
"""Get/set the current opacity value.
The allowable range for opacity is any number between and including
0.0 and 1.0 (i.e. [0.0, 1.0]). Values outside of this will be clamped
to the range.
0.0 and 1.0. Values outside of this will be clamped to the range.
* 0.0 makes the image completely transparent (i.e. invisible).
* 1.0 makes the image completely opaque (i.e. fully viewable).
0.0 makes the image completely transparent (i.e. invisible).
1.0 makes the image completely opaque (i.e. fully viewable).
Values between 0.0 and 1.0 will give varying levels of transparency.
"""
return self._opacity
Expand Down

0 comments on commit 1df05a8

Please sign in to comment.