/* rectangle — контур прямоугольника по углам (left,top)-(right,bottom). */
#include "../_bgi.h"

void rectangle(int left, int top, int right, int bottom)
{
    uint8_t c = _bgi_fg;
    _bgi_styled_line(left,  top,    right, top,    c);   /* верх   */
    _bgi_styled_line(right, top,    right, bottom, c);   /* право  */
    _bgi_styled_line(right, bottom, left,  bottom, c);   /* низ    */
    _bgi_styled_line(left,  bottom, left,  top,    c);   /* лево   */
}
