Skip to content

Commit

Permalink
Update ESP32-HUB75-MatrixPanel-I2S-draw.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
LAutour authored Oct 6, 2022
1 parent d2f319d commit 1e7a6cc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ESP32-HUB75-MatrixPanel-I2S-draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ void MatrixPanel_I2S_DMA::writeLineAA(int16_t x0, int16_t y0, int16_t x1, int16_
{
_swap_int16_t(x0, y0);
_swap_int16_t(x1, y1);
_swap_int16_t(dx, dy);
}
if (x0 > x1)
{
Expand All @@ -250,8 +249,7 @@ void MatrixPanel_I2S_DMA::writeLineAA(int16_t x0, int16_t y0, int16_t x1, int16_
_steepDrawPixelRGB(steep, x0, y0, c.r, c.g, c.b);
_steepDrawPixelRGB(steep, x1, y1, c.r, c.g, c.b);

dy <<= 16;
int32_t gradient = dy / dx;
int32_t gradient = ((y1-y0)<< 16)/(x1-x0);
int32_t y = (y0 << 16) + gradient;
int16_t gcolor;
rgb888_t g;
Expand Down

1 comment on commit 1e7a6cc

@LAutour
Copy link
Owner Author

@LAutour LAutour commented on 1e7a6cc Oct 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix writeLineAA

Please sign in to comment.