Skip to content

Commit 99a296f

Browse files
authored
Merge pull request adafruit#156 from FoamyGuy/bitmap_property
bitmap property for bitmap_label
2 parents c31c0ef + 9563ef0 commit 99a296f

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

adafruit_display_text/bitmap_label.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939

4040
class Label(LabelBase):
4141
"""A label displaying a string of text that is stored in a bitmap.
42-
Note: This ``bitmap_label.py`` library utilizes a bitmap to display the text.
43-
This method is memory-conserving relative to ``label.py``.
42+
Note: This ``bitmap_label.py`` library utilizes a :py:class:`~displayio.Bitmap`
43+
to display the text. This method is memory-conserving relative to ``label.py``.
4444
4545
For further reduction in memory usage, set ``save_text=False`` (text string will not
4646
be stored and ``line_spacing`` and ``font`` are immutable with ``save_text``
@@ -534,3 +534,12 @@ def _set_label_direction(self, new_label_direction: str) -> None:
534534

535535
def _get_valid_label_directions(self) -> Tuple[str, ...]:
536536
return "LTR", "RTL", "UPD", "UPR", "DWR"
537+
538+
@property
539+
def bitmap(self):
540+
"""
541+
The Bitmap object that the text and background are drawn into.
542+
543+
:rtype: displayio.Bitmap
544+
"""
545+
return self._bitmap

0 commit comments

Comments
 (0)