Skip to content

Commit

Permalink
Add docs for trans
Browse files Browse the repository at this point in the history
  • Loading branch information
encukou committed Oct 28, 2013
1 parent aa63305 commit 1ff8393
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
10 changes: 8 additions & 2 deletions tmxlib/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,14 @@ def open(filename, trans=None, size=None):
:param filename: Name of the file to load the image from
:param trans:
Optional color that should be rendered as transparent
(this is not implemented yet)
Optional color that should be loaded as transparent
.. note::
Currently, loading images that use color-key transparency
is very inefficient.
If possible, use the alpha channel instead.
:param size:
Optional (width, height) tuple.
If specified, the file will not be read from disk when the image size
Expand Down
8 changes: 7 additions & 1 deletion tmxlib/image_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,13 @@ class Image(ImageBase, fileio.ReadWriteBase):
.. attribute:: trans
A color key used for transparency (currently not implemented)
A color key used for transparency
.. note::
Currently, loading images that use color-key transparency
is very inefficient.
If possible, use the alpha channel instead.
Images support indexing (``img[x, y]``); see
:meth:`tmxlib.image_base.ImageBase.__getitem__`
Expand Down

0 comments on commit 1ff8393

Please sign in to comment.