Ignore:
Timestamp:
May 21, 2009, 10:55:13 PM (11 years ago)
Author:
Sam Hocevar
Message:

Change the dirty rectangle API once again so that calling applications get
a more natural (x,y,w,h) 4-tuple to handle.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/canvas.c

    r3471 r3494  
    11/*
    22 *  libcaca       Colour ASCII-Art library
    3  *  Copyright (c) 2002-2006 Sam Hocevar <sam@zoy.org>
     3 *  Copyright (c) 2002-2009 Sam Hocevar <sam@hocevar.net>
    44 *                All Rights Reserved
    55 *
     
    427427        }
    428428
    429         caca_add_dirty_rectangle(cv, old_width, 0, width - 1, old_height - 1);
     429        caca_add_dirty_rect(cv, old_width, 0, width - old_width, old_height);
    430430    }
    431431    else
     
    468468        }
    469469
    470         caca_add_dirty_rectangle(cv, 0, old_height, old_width - 1, height - 1);
     470        caca_add_dirty_rect(cv, 0, old_height, old_width, height - old_height);
    471471    }
    472472
     
    475475     * but in case the API changes later, we make sure this is handled. */
    476476    if(width > old_width && height > old_height)
    477         caca_add_dirty_rectangle(cv, old_width, old_height,
    478                                  width - 1, height - 1);
     477        caca_add_dirty_rect(cv, old_width, old_height,
     478                            width - old_width, height - old_height);
    479479
    480480    /* Step 4: if new area is smaller, resize memory area now. */
Note: See TracChangeset for help on using the changeset viewer.