X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka_Displayio.git/blobdiff_plain/0d243252f0fb3a3e200df404884e3cc7d872ee13..HEAD:/displayio/_structs.py diff --git a/displayio/_structs.py b/displayio/_structs.py index a46fb48..4c41c00 100644 --- a/displayio/_structs.py +++ b/displayio/_structs.py @@ -23,16 +23,6 @@ __version__ = "0.0.0+auto.0" __repo__ = "https://github.com/adafruit/Adafruit_Blinka_Displayio.git" -@dataclass -class RectangleStruct: - # pylint: disable=invalid-name - """Rectangle Struct Dataclass. To eventually be replaced by Area.""" - x1: int - y1: int - x2: int - y2: int - - @dataclass class TransformStruct: # pylint: disable=invalid-name @@ -42,9 +32,11 @@ class TransformStruct: dx: int = 1 dy: int = 1 scale: int = 1 - transpose_xy: bool = False + width: int = 0 + height: int = 0 mirror_x: bool = False mirror_y: bool = False + transpose_xy: bool = False @dataclass @@ -96,11 +88,5 @@ class ColorStruct: cached_colorspace_grayscale: bool = False transparent: bool = False - def rgba(self) -> tuple[int, int, int, int]: - """Return the color as a tuple of red, green, blue, alpha""" - return ( - self.rgb888 >> 16, - (self.rgb888 >> 8) & 0xFF, - self.rgb888 & 0xFF, - 0 if self.transparent else 0xFF, - ) + +null_transform = TransformStruct() # Use defaults