m5stack / M5GFX

Graphics library for M5Stack series
MIT License
154 stars 47 forks source link

Draw fillRoundRect #96

Open yo2ldk opened 2 months ago

yo2ldk commented 2 months ago

how can I use fillRoundRect (x,x,x,x,x) (like in tft_espi, in M5GFX ? if I write, no error on compile, but also no result in display drawing

lovyan03 commented 2 months ago

Hello, @yo2ldk Sorry for the late reply.

Please try the following code.

#include <M5GFX.h>

M5GFX gfx;

void setup() {
    gfx.begin();

    int x = 32;
    int y = 32;
    int w = 128;
    int h = 128;
    int r = 20;
    uint32_t color = 0xFFEE33;

    gfx.fillRoundRect(x, y, w, h, r, color);
}

void loop() {}

image