Matrix.drawRFrame()
Matrix.drawRFrame(x,y,w,h,r)
描述 画带倒角的空心距形。
参数
返回值 无 示例 彩色点阵:Sensor-Dot Matrix-Color/zh #include <Microduino_Matrix.h>
uint8_t Addr[MatrixPix_X][MatrixPix_Y] = { //1x1
{64} //点阵IIC地址
};
Matrix display = Matrix(Addr, TYPE_COLOR); //TYPE_COLOR or TYPE_S2
void setup() {
Wire.begin();
display.setBrightness(255);
}
void loop() {
//画空心距形加倒角,起点坐标x,y 宽高w,h 倒角r
display.setColor(255, 0, 0);
display. drawRFrame(0, 0, 8, 8, 2); //x,y,w,h,r
delay(2000);
display.clearDisplay();
display.setColor(0, 255, 0);
display.drawRFrame(1, 1, 6, 6, 2); //x,y,w,h,r
delay(2000);
display.clearDisplay();
}
#include <Microduino_Matrix.h>
uint8_t Addr[MatrixPix_X][MatrixPix_Y] = { //1x1
{64} //点阵IIC地址
};
Matrix display = Matrix(Addr, TYPE_S2); //TYPE_COLOR or TYPE_S2
void setup() {
Wire.begin();
display.setBrightness(255);
}
void loop() {
//画空心距形加倒角,起点坐标x,y 宽高w,h 倒角r
display. drawRFrame(0, 0, 8, 8, 2); //x,y,w,h,r
delay(2000);
display.clearDisplay();
display.drawRFrame(1, 1, 6, 6, 2); //x,y,w,h,r
delay(2000);
display.clearDisplay();
}
其他 |