Changeset 2079


Ignore:
Timestamp:
Nov 27, 2007, 1:58:19 AM (13 years ago)
Author:
Sam Hocevar
Message:
  • Changed the box drawing functions so that their arguments are (point, size) instead of (point, point). Yeah, I break the ABI again. But who uses these functions anyway?
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/cucul/box.c

    r1462 r2079  
    3232 *
    3333 *  \param cv The handle to the libcucul canvas.
    34  *  \param x1 X coordinate of the upper-left corner of the box.
    35  *  \param y1 Y coordinate of the upper-left corner of the box.
    36  *  \param x2 X coordinate of the lower-right corner of the box.
    37  *  \param y2 Y coordinate of the lower-right corner of the box.
     34 *  \param x X coordinate of the upper-left corner of the box.
     35 *  \param y Y coordinate of the upper-left corner of the box.
     36 *  \param w Width of the box.
     37 *  \param h Height of the box.
    3838 *  \param ch UTF-32 character to be used to draw the box.
    3939 *  \return This function always returns 0.
    4040 */
    41 int cucul_draw_box(cucul_canvas_t *cv, int x1, int y1, int x2, int y2,
     41int cucul_draw_box(cucul_canvas_t *cv, int x1, int y1, int w, int h,
    4242                   unsigned long int ch)
    4343{
     44    int x2 = x1 + w - 1;
     45    int y2 = y1 + h - 1;
     46
    4447    cucul_draw_line(cv, x1, y1, x1, y2, ch);
    4548    cucul_draw_line(cv, x1, y2, x2, y2, ch);
     
    5558 *
    5659 *  \param cv The handle to the libcucul canvas.
    57  *  \param x1 X coordinate of the upper-left corner of the box.
    58  *  \param y1 Y coordinate of the upper-left corner of the box.
    59  *  \param x2 X coordinate of the lower-right corner of the box.
    60  *  \param y2 Y coordinate of the lower-right corner of the box.
    61  *  \return This function always returns 0.
    62  */
    63 int cucul_draw_thin_box(cucul_canvas_t *cv, int x1, int y1, int x2, int y2)
     60 *  \param x X coordinate of the upper-left corner of the box.
     61 *  \param y Y coordinate of the upper-left corner of the box.
     62 *  \param w Width of the box.
     63 *  \param h Height of the box.
     64 *  \return This function always returns 0.
     65 */
     66int cucul_draw_thin_box(cucul_canvas_t *cv, int x1, int y1, int w, int h)
    6467{
    6568    int x, y, xmax, ymax;
     69
     70    int x2 = x1 + w - 1;
     71    int y2 = y1 + h - 1;
    6672
    6773    if(x1 > x2)
     
    114120 *
    115121 *  \param cv The handle to the libcucul canvas.
    116  *  \param x1 X coordinate of the upper-left corner of the box.
    117  *  \param y1 Y coordinate of the upper-left corner of the box.
    118  *  \param x2 X coordinate of the lower-right corner of the box.
    119  *  \param y2 Y coordinate of the lower-right corner of the box.
    120  *  \return This function always returns 0.
    121  */
    122 int cucul_draw_cp437_box(cucul_canvas_t *cv, int x1, int y1, int x2, int y2)
     122 *  \param x X coordinate of the upper-left corner of the box.
     123 *  \param y Y coordinate of the upper-left corner of the box.
     124 *  \param w Width of the box.
     125 *  \param h Height of the box.
     126 *  \return This function always returns 0.
     127 */
     128int cucul_draw_cp437_box(cucul_canvas_t *cv, int x1, int y1, int w, int h)
    123129{
    124130    int x, y, xmax, ymax;
     131
     132    int x2 = x1 + w - 1;
     133    int y2 = y1 + h - 1;
    125134
    126135    if(x1 > x2)
     
    173182 *
    174183 *  \param cv The handle to the libcucul canvas.
    175  *  \param x1 X coordinate of the upper-left corner of the box.
    176  *  \param y1 Y coordinate of the upper-left corner of the box.
    177  *  \param x2 X coordinate of the lower-right corner of the box.
    178  *  \param y2 Y coordinate of the lower-right corner of the box.
     184 *  \param x X coordinate of the upper-left corner of the box.
     185 *  \param y Y coordinate of the upper-left corner of the box.
     186 *  \param w Width of the box.
     187 *  \param h Height of the box.
    179188 *  \param ch UTF-32 character to be used to draw the box.
    180189 *  \return This function always returns 0.
    181190 */
    182 int cucul_fill_box(cucul_canvas_t *cv, int x1, int y1, int x2, int y2,
     191int cucul_fill_box(cucul_canvas_t *cv, int x1, int y1, int w, int h,
    183192                   unsigned long int ch)
    184193{
    185194    int x, y, xmax, ymax;
     195
     196    int x2 = x1 + w - 1;
     197    int y2 = y1 + h - 1;
    186198
    187199    if(x1 > x2)
Note: See TracChangeset for help on using the changeset viewer.