Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix arg of drawAngerMark background color type #84

Closed
u-tanick opened this issue Jun 10, 2023 · 0 comments
Closed

Fix arg of drawAngerMark background color type #84

u-tanick opened this issue Jun 10, 2023 · 0 comments

Comments

@u-tanick
Copy link

src/Effect.h

bColor of drawAngerMark is set to uint32_t.
Please correct it to uint16_t.

  void drawAngerMark(M5Canvas *spi, uint32_t x, uint32_t y, uint32_t r,
                     uint16_t color, uint32_t bColor) {
    drawAngerMark(spi, x, y, r, color, bColor, 0);
  }

  void drawAngerMark(M5Canvas *spi, uint32_t x, uint32_t y, uint32_t r,
                     uint16_t color, uint32_t bColor, float offset) {
    r = r + abs(r * 0.4 * offset);
    spi->fillRect(x - (r / 3), y - r, (r * 2) / 3, r * 2, color);
    spi->fillRect(x - r, y - (r / 3), r * 2, (r * 2) / 3, color);
    spi->fillRect(x - (r / 3) + 2, y - r, ((r * 2) / 3) - 4, r * 2, bColor);
    spi->fillRect(x - r, y - (r / 3) + 2, r * 2, ((r * 2) / 3) - 4, bColor);
  }
mongonta0716 added a commit that referenced this issue Jun 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants