X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka_Displayio.git/blobdiff_plain/f28da0ef103057447e330a77dc7deb4ea1cab5eb..f376dced2e0f071fce859440d5575e10f167a354:/bitmaptools/__init__.py diff --git a/bitmaptools/__init__.py b/bitmaptools/__init__.py index 4e7a689..ca5b27e 100644 --- a/bitmaptools/__init__.py +++ b/bitmaptools/__init__.py @@ -461,7 +461,7 @@ def readinto( """ width = bitmap.width height = bitmap.height - bits_per_value = bitmap._bits_per_value + bits_per_value = bitmap._bits_per_value # pylint: disable=protected-access mask = (1 << bits_per_value) - 1 elements_per_row = (width * bits_per_pixel + element_size * 8 - 1) // ( @@ -533,6 +533,8 @@ class BlendMode: Options for modes to use by alphablend() function. """ + # pylint: disable=too-few-public-methods + Normal = "bitmaptools.BlendMode.Normal" Screen = "bitmaptools.BlendMode.Screen" @@ -676,6 +678,8 @@ class DitherAlgorithm: Options for algorithm to use by dither() function. """ + # pylint: disable=too-few-public-methods + Atkinson = "bitmaptools.DitherAlgorithm.Atkinson" FloydStenberg = "bitmaptools.DitherAlgorithm.FloydStenberg" @@ -753,7 +757,7 @@ def dither(dest_bitmap, source_bitmap, colorspace, algorithm=DitherAlgorithm.Atk luminance_data[-mx + i] = 0 luminance_data[bitmap.width + i] = 0 - if bitmap._bits_per_value == 8: + if bitmap._bits_per_value == 8: # pylint: disable=protected-access for x in range(bitmap.width): luminance_data[x] = bitmap[x, y] else: @@ -775,7 +779,7 @@ def dither(dest_bitmap, source_bitmap, colorspace, algorithm=DitherAlgorithm.Atk # Helper function to write pixels to destination bitmap def write_pixels(bitmap, y, data): - if bitmap._bits_per_value == 1: + if bitmap._bits_per_value == 1: # pylint: disable=protected-access for i in range(0, bitmap.width, 32): # Pack 32 bits into an integer p = 0