Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
zwim authored and simonmicro committed May 20, 2024
1 parent cd08cf7 commit 3334193
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/gfx_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,6 @@ uint16_t blend(uint16_t target, uint16_t source, uint8_t alpha) {
return rgb565(r, g, b);
}

// ToDo check if this function is faster
/**
* Fast RGB565 pixel blending
* @param fg The foreground color in uint16_t RGB565 format
* @param bg The background color in uint16_t RGB565 format
* @param alpha The alpha in range 0-255
**/
/*uint16_t alphaBlendRGB565( uint32_t fg, uint32_t bg, uint8_t alpha ){
alpha = ( alpha + 4 ) >> 3;
bg = (bg | (bg << 16)) & 0b00000111111000001111100000011111;
fg = (fg | (fg << 16)) & 0b00000111111000001111100000011111;
uint32_t result = ((((fg - bg) * alpha) >> 5) + bg) & 0b00000111111000001111100000011111;
return (uint16_t)((result >> 16) | result);
}
*/

/**
* @brief Calculated the color code of a dimmed color
*
Expand Down

0 comments on commit 3334193

Please sign in to comment.