Skip to content

Commit decb8ef

Browse files
committed
Expose Screen._img as Screen.image.
This is useful for blitting images to the screen. Fixes #142
1 parent 1c9265d commit decb8ef

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

ev3dev/core.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2537,6 +2537,18 @@ def draw(self):
25372537
"""
25382538
return self._draw
25392539

2540+
@property
2541+
def image(self):
2542+
"""
2543+
Returns a handle to PIL.Image class that is backing the screen. This can
2544+
be accessed for blitting images to the screen.
2545+
2546+
Example::
2547+
2548+
screen.image.paste(picture, (0, 0))
2549+
"""
2550+
return self._img
2551+
25402552
def clear(self):
25412553
"""
25422554
Clears the screen

0 commit comments

Comments
 (0)