File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](https://semver.org/) since version
77### Added
88- Added PathLike support to more libtcodpy functions.
99- New ` tcod.sdl.mouse.show ` function for querying or setting mouse visibility.
10+ - New class method ` tcod.image.Image.from_file ` to load images with. This replaces ` tcod.image_load ` .
1011
1112### Deprecated
1213- Deprecated the libtcodpy functions for images and noise generators.
Original file line number Diff line number Diff line change @@ -67,6 +67,10 @@ def from_array(cls, array: ArrayLike) -> Image:
6767
6868 @classmethod
6969 def from_file (cls , path : str | PathLike [str ]) -> Image :
70+ """Return a new Image loaded from the given `path`.
71+
72+ .. versionadded:: Unreleased
73+ """
7074 path = Path (path ).resolve (strict = True )
7175 return cls ._from_cdata (ffi .gc (lib .TCOD_image_load (bytes (path )), lib .TCOD_image_delete ))
7276
You can’t perform that action at this time.
0 commit comments