Skip to content

Commit 0509ac9

Browse files
committed
use the native pixelbuf fill helper
1 parent ba06384 commit 0509ac9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

adafruit_dotstar.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
import busio
3333
import digitalio
3434
try:
35-
from _pixelbuf import PixelBuf
35+
import _pixelbuf
3636
except ImportError:
37-
from pypixelbuf import PixelBuf
37+
import pypixelbuf as _pixelbuf
3838

3939
__version__ = "0.0.0-auto.0"
4040
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_DotStar.git"
@@ -50,7 +50,7 @@
5050
BGR = 'PBGR'
5151

5252

53-
class DotStar(PixelBuf):
53+
class DotStar(_pixelbuf.PixelBuf):
5454
"""
5555
A sequence of dotstars.
5656
@@ -167,3 +167,7 @@ def __exit__(self, exception_type, exception_value, traceback):
167167

168168
def __repr__(self):
169169
return "[" + ", ".join([str(x) for x in self]) + "]"
170+
171+
def fill(self, color):
172+
"""Colors all pixels the given ***color***."""
173+
_pixelbuf.fill(self, color)

0 commit comments

Comments
 (0)