Better rectangle tool render function, no crappy pixels in edge cases anymore
This commit is contained in:
parent
29189693b3
commit
947301c302
@ -18,9 +18,13 @@ void Brush::RenderRect(Renderer * ren, ui::Point position1, ui::Point position2)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ren->xor_line(position1.X, position1.Y, position1.X+width, position1.Y);
|
ren->xor_line(position1.X, position1.Y, position1.X+width, position1.Y);
|
||||||
|
if(height>0){
|
||||||
ren->xor_line(position1.X, position1.Y+height, position1.X+width, position1.Y+height);
|
ren->xor_line(position1.X, position1.Y+height, position1.X+width, position1.Y+height);
|
||||||
|
if(height>1){
|
||||||
ren->xor_line(position1.X+width, position1.Y+1, position1.X+width, position1.Y+height-1);
|
ren->xor_line(position1.X+width, position1.Y+1, position1.X+width, position1.Y+height-1);
|
||||||
ren->xor_line(position1.X, position1.Y+1, position1.X, position1.Y+height-1);
|
ren->xor_line(position1.X, position1.Y+1, position1.X, position1.Y+height-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Brush::RenderLine(Renderer * ren, ui::Point position1, ui::Point position2)
|
void Brush::RenderLine(Renderer * ren, ui::Point position1, ui::Point position2)
|
||||||
|
Loading…
Reference in New Issue
Block a user