Fl_Scalable_Graphics_Driver::rect(): don't draw a rectangle if w or h is negative
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12920 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
10640df785
commit
a4927c1d13
@ -346,10 +346,12 @@ void Fl_Scalable_Graphics_Driver::rect(int x, int y, int w, int h)
|
||||
if (int(scale()) == scale()) {
|
||||
rect_unscaled(x * scale(), y * scale(), w * scale(), h * scale());
|
||||
} else {
|
||||
xyline(x, y, x+w-1);
|
||||
yxline(x, y, y+h-1);
|
||||
yxline(x+w-1, y, y+h-1);
|
||||
xyline(x, y+h-1, x+w-1);
|
||||
if (w > 0 && h > 0) {
|
||||
xyline(x, y, x+w-1);
|
||||
yxline(x, y, y+h-1);
|
||||
yxline(x+w-1, y, y+h-1);
|
||||
xyline(x, y+h-1, x+w-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user