mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
Proper rect size in Kandinsky
This commit is contained in:
@@ -13,8 +13,8 @@ FltkLCD::FltkLCD(int x, int y, int w, int h, const char * label) :
|
||||
void FltkLCD::draw() {
|
||||
printf("DRAW\n");
|
||||
fl_draw_image_mono((const uchar *)m_framebuffer,
|
||||
0, // x
|
||||
0, // y
|
||||
x(), // x
|
||||
y(), // y
|
||||
w(), // width
|
||||
h(), // height,
|
||||
1, // byte-delta between pixels
|
||||
|
||||
@@ -7,8 +7,8 @@ void KDFillRect(KDRect rect, KDColor color) {
|
||||
//memset(KDPixelAddress((KDPoint){.x=rect.x, .y=y}), color, rect.width);
|
||||
//}
|
||||
KDPoint p;
|
||||
for (p.x = rect.x; p.x<(rect.x+rect.width-1); p.x++) {
|
||||
for (p.y = rect.y; p.y<(rect.y+rect.height-1); p.y++) {
|
||||
for (p.x = rect.x; p.x<(rect.x+rect.width); p.x++) {
|
||||
for (p.y = rect.y; p.y<(rect.y+rect.height); p.y++) {
|
||||
KDSetPixel(p, color);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user