~aritra1911/ansi_anim

8ca27c839df8d423406369656380e9c4ae5dd9fa — Aritra Sarkar 2 years ago 35ce9f0
Make rectangle transparent
2 files changed, 7 insertions(+), 7 deletions(-)

M lib/src/graphics/shapes.c
M src/main.c
M lib/src/graphics/shapes.c => lib/src/graphics/shapes.c +6 -6
@@ 7,7 7,7 @@ void draw_rectangle(point_t pos, uint32_t width, uint32_t height)
{
    move_cursor(pos);

    /* Top Edge */
    /* Top edge */
    for (uint32_t i = 0; i < width; i++) {
        write(STDOUT_FILENO, (void *) "#", 1);
    }


@@ 18,11 18,11 @@ void draw_rectangle(point_t pos, uint32_t width, uint32_t height)
        nudge_cursor(LEFT, width);
        nudge_cursor(DOWN, 1);

        /* print left and right edges */
        /* Left edges */
        write(STDOUT_FILENO, (void *) "#", 1);
        for (uint32_t j = 0; j < width - 2; j++) {
            write(STDOUT_FILENO, (void *) " ", 1);
        }

        /* Right edges */
        nudge_cursor(RIGHT, width - 2);
        write(STDOUT_FILENO, (void *) "#", 1);
    }



@@ 30,7 30,7 @@ void draw_rectangle(point_t pos, uint32_t width, uint32_t height)
    nudge_cursor(LEFT, width);
    nudge_cursor(DOWN, 1);

    /* Bottom Edge */
    /* Bottom edge */
    for (uint32_t i = 0; i < width; i++) {
        write(STDOUT_FILENO, (void *) "#", 1);
    }

M src/main.c => src/main.c +1 -1
@@ 68,7 68,7 @@ int main(void)
     * }
     */

    draw_rectangle((point_t) { 10, 2 }, 3, 4);
    draw_rectangle((point_t) { 2, 2 }, 32, 16);

    while ( 1 ) {