Ignore:
Timestamp:
Nov 11, 2006, 9:11:26 AM (14 years ago)
Author:
Sam Hocevar
Message:
  • Switch back to UTF-32 arguments for drawing primitives, now that we properly export cucul_utf8_to_utf32(). Evil API breakage, but no one uses these functions anyway.
File:
1 edited

Legend:

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

    r1329 r1330  
    3535 *  \param x2 X coordinate of the lower-right corner of the box.
    3636 *  \param y2 Y coordinate of the lower-right corner of the box.
    37  *  \param str UTF-8 string containing the character to use to draw the box.
     37 *  \param ch UTF-32 character to be used to draw the box.
    3838 *  \return This function always returns 0.
    3939 */
    4040int cucul_draw_box(cucul_canvas_t *cv, int x1, int y1, int x2, int y2,
    41                    char const *str)
    42 {
    43     cucul_draw_line(cv, x1, y1, x1, y2, str);
    44     cucul_draw_line(cv, x1, y2, x2, y2, str);
    45     cucul_draw_line(cv, x2, y2, x2, y1, str);
    46     cucul_draw_line(cv, x2, y1, x1, y1, str);
     41                   unsigned long int ch)
     42{
     43    cucul_draw_line(cv, x1, y1, x1, y2, ch);
     44    cucul_draw_line(cv, x1, y2, x2, y2, ch);
     45    cucul_draw_line(cv, x2, y2, x2, y1, ch);
     46    cucul_draw_line(cv, x2, y1, x1, y1, ch);
    4747
    4848    return 0;
     
    176176 *  \param x2 X coordinate of the lower-right corner of the box.
    177177 *  \param y2 Y coordinate of the lower-right corner of the box.
    178  *  \param str UTF-8 string containing the character to fill the box with.
     178 *  \param ch UTF-32 character to be used to draw the box.
    179179 *  \return This function always returns 0.
    180180 */
    181181int cucul_fill_box(cucul_canvas_t *cv, int x1, int y1, int x2, int y2,
    182                    char const *str)
     182                   unsigned long int ch)
    183183{
    184184    int x, y, xmax, ymax;
    185     uint32_t ch;
    186185
    187186    if(x1 > x2)
     
    208207    if(y2 > ymax) y2 = ymax;
    209208
    210     ch = cucul_utf8_to_utf32(str, NULL);
    211 
    212209    for(y = y1; y <= y2; y++)
    213210        for(x = x1; x <= x2; x++)
Note: See TracChangeset for help on using the changeset viewer.