Proper rect size in Kandinsky

This commit is contained in:
Romain Goyet
2015-09-01 12:06:57 +02:00
parent 50df2ac3a8
commit 616af4ed24
2 changed files with 4 additions and 4 deletions

View File

@@ -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

View File

@@ -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);
}
}