summaryrefslogtreecommitdiff
path: root/shared-module/displayio/ColorConverter.c
AgeCommit message (Collapse)Author
2021-03-15run code formatting scriptmicroDev
2020-12-16displayio: ColorConverter: fix logic errors about transparent pixelsJeff Epler
The transparent_color field was never initialized. I _think_ this means its value was always set to 0, or the blackest of blacks. Instead, initialize it to the sentinel value, newly given the name NO_TRANSPARENT_COLOR. This exposed a second problem: The test for whether there was an existing transparent color was wrong (backwards). I am guessing that this was not found due to the first bug; since the converter had a transparent color, the correct test would have led to always getting the error "Only one color can be transparent at a time". Closes #3723
2020-11-13Add board.DISPLAY to MagTag. Fix luma computationScott Shawcroft
* Initialize the EPaper display on the MagTag at start. * Tweak the display send to take a const buffer. * Correct Luma math * Multiply the blue component, not add. * Add all of the components together before dividing. This reduces the impact of truncated division.
2020-10-26Add grayscale EInk supportScott Shawcroft
2020-10-16displayio: Remove trailing whitespaceJensen
2020-10-16displayio: Add in opaque pixel option for futureJensen
2020-10-14displayio: ColorConverter handle if opaque color is blackJensen
2020-10-12displayio: Add make_transparent to ColorConverterJensen
2020-10-12displayio: Add make_transparent and make_opaque to ColorConvertorJensen
2020-10-12displayio: Pass transparent_color to ColorConverterJensen
Signed-off-by: Jensen <jensechu@gmail.com>
2020-06-03Fix up end of file and trailing whitespace.Diego Elio Pettenò
This can be enforced by pre-commit, but correct it separately to make it easier to review.
2020-04-14Add Protomatter and FramebufferDisplayJeff Epler
2019-09-05Move dither parameter to ColorConverter constructor and parameterMatthew Newberg
2019-09-04Removed unused return value in displayio_colorconverter_convertMatthew Newberg
2019-08-31Add random dithering to ColorConverterMatthew Newberg
2019-08-23Rework based on Dan's reviewScott Shawcroft
2019-08-22More cleanupScott Shawcroft
2019-08-22EPaper displays work mostly.Scott Shawcroft
2019-07-19Review feedback including NO_BRIGHTNESS_COMMAND macroScott Shawcroft
2019-07-19Add support for grayscale displays that are < 8 bit depth.Scott Shawcroft
This also improves Palette so it stores the original RGB888 colors. Lastly, it adds I2CDisplay as a display bus to talk over I2C. Particularly useful for the SSD1306. Fixes #1828. Fixes #1956
2019-03-27TileGrid: pixel_shader is not always a paletteDan Halbert
2018-09-12Add OnDiskBitmap which loads pixel data straight from disk.Scott Shawcroft
Also, renamed Sprite's palette to pixel_shader so it can be anything that produces colors based on values (including color values). Added a ColorConverter that converts RGB888 (found in bitmaps) to RGB565 for the display. Fixes #1182