Changeset 678 for libcaca/trunk
- Timestamp:
- Mar 23, 2006, 3:07:32 PM (15 years ago)
- Location:
- libcaca/trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/cucul/box.c
r672 r678 34 34 * \param x2 X coordinate of the lower-right corner of the box. 35 35 * \param y2 Y coordinate of the lower-right corner of the box. 36 * \param c Character to draw the box outline with.36 * \param str UTF-8 string containing the character to use to draw the box. 37 37 * \return void 38 38 */ 39 void cucul_draw_box(cucul_t *qq, int x1, int y1, int x2, int y2, char c) 39 void cucul_draw_box(cucul_t *qq, int x1, int y1, int x2, int y2, 40 char const *str) 40 41 { 41 cucul_draw_line(qq, x1, y1, x1, y2, c);42 cucul_draw_line(qq, x1, y2, x2, y2, c);43 cucul_draw_line(qq, x2, y2, x2, y1, c);44 cucul_draw_line(qq, x2, y1, x1, y1, c);42 cucul_draw_line(qq, x1, y1, x1, y2, str); 43 cucul_draw_line(qq, x1, y2, x2, y2, str); 44 cucul_draw_line(qq, x2, y2, x2, y1, str); 45 cucul_draw_line(qq, x2, y1, x1, y1, str); 45 46 } 46 47 … … 79 80 if(y1 >= 0) 80 81 for(x = x1 < 0 ? 1 : x1 + 1; x < x2 && x < xmax; x++) 81 cucul_putchar(qq, x, y1,'-');82 _cucul_putchar32(qq, x, y1, (uint32_t)'-'); 82 83 83 84 if(y2 <= ymax) 84 85 for(x = x1 < 0 ? 1 : x1 + 1; x < x2 && x < xmax; x++) 85 cucul_putchar(qq, x, y2,'-');86 _cucul_putchar32(qq, x, y2, (uint32_t)'-'); 86 87 87 88 if(x1 >= 0) 88 89 for(y = y1 < 0 ? 1 : y1 + 1; y < y2 && y < ymax; y++) 89 cucul_putchar(qq, x1, y,'|');90 _cucul_putchar32(qq, x1, y, (uint32_t)'|'); 90 91 91 92 if(x2 <= xmax) 92 93 for(y = y1 < 0 ? 1 : y1 + 1; y < y2 && y < ymax; y++) 93 cucul_putchar(qq, x2, y,'|');94 _cucul_putchar32(qq, x2, y, (uint32_t)'|'); 94 95 95 96 /* Draw corners */ 96 97 if(x1 >= 0 && y1 >= 0) 97 cucul_putchar(qq, x1, y1,',');98 _cucul_putchar32(qq, x1, y1, (uint32_t)','); 98 99 99 100 if(x1 >= 0 && y2 <= ymax) 100 cucul_putchar(qq, x1, y2,'`');101 _cucul_putchar32(qq, x1, y2, (uint32_t)'`'); 101 102 102 103 if(x2 <= xmax && y1 >= 0) 103 cucul_putchar(qq, x2, y1,'.');104 _cucul_putchar32(qq, x2, y1, (uint32_t)'.'); 104 105 105 106 if(x2 <= xmax && y2 <= ymax) 106 cucul_putchar(qq, x2, y2,'\'');107 _cucul_putchar32(qq, x2, y2, (uint32_t)'\''); 107 108 } 108 109 … … 114 115 * \param x2 X coordinate of the lower-right corner of the box. 115 116 * \param y2 Y coordinate of the lower-right corner of the box. 116 * \param c Character to fill the box with.117 * \param str UTF-8 string containing the character to fill the box with. 117 118 * \return void 118 119 */ 119 void cucul_fill_box(cucul_t *qq, int x1, int y1, int x2, int y2, char c) 120 void cucul_fill_box(cucul_t *qq, int x1, int y1, int x2, int y2, 121 char const *str) 120 122 { 121 123 int x, y, xmax, ymax; 124 uint32_t c; 122 125 123 126 if(x1 > x2) … … 144 147 if(y2 > ymax) y2 = ymax; 145 148 149 c = _cucul_utf8_to_utf32(str); 150 146 151 for(y = y1; y <= y2; y++) 147 152 for(x = x1; x <= x2; x++) 148 cucul_putchar(qq, x, y, c);153 _cucul_putchar32(qq, x, y, c); 149 154 } 150 155 -
libcaca/trunk/cucul/canvas.c
r672 r678 103 103 104 104 if((unsigned char)c < 0x20 || (unsigned char)c > 0x7f) 105 c = 0x20;106 107 qq->chars[x + y * qq->width] = c;108 qq->attr[x + y * qq->width] = (qq->bgcolor << 4) | qq->fgcolor;109 }110 111 /** \brief Print a Unicode character.112 *113 * FIXME: do we really want this function?114 *115 * This function prints a Unicode character (native-endian, 32 bits UCS-4,116 * also known as UTF-32) at the given coordinates, using the default117 * foreground and background values. If the coordinates are outside the118 * screen boundaries, nothing is printed. If the character is an invalid119 * Unicode character, it is replaced with a space.120 *121 * \param x X coordinate.122 * \param y Y coordinate.123 * \param c The character to print.124 */125 void cucul_putchar32(cucul_t *qq, int x, int y, unsigned long int c)126 {127 if(x < 0 || x >= (int)qq->width ||128 y < 0 || y >= (int)qq->height)129 return;130 131 if(c < 0x20 || c > 0x7f)132 105 c = 0x20; 133 106 … … 314 287 } 315 288 289 /* 290 * XXX: The following functions are not exported 291 */ 292 293 void _cucul_putchar32(cucul_t *qq, int x, int y, uint32_t c) 294 { 295 if(x < 0 || x >= (int)qq->width || 296 y < 0 || y >= (int)qq->height) 297 return; 298 299 qq->chars[x + y * qq->width] = c; 300 qq->attr[x + y * qq->width] = (qq->bgcolor << 4) | qq->fgcolor; 301 } 302 -
libcaca/trunk/cucul/conic.c
r672 r678 28 28 #include "cucul_internals.h" 29 29 30 static void ellipsepoints(cucul_t *, int, int, int, int, char);30 static void ellipsepoints(cucul_t *, int, int, int, int, uint32_t); 31 31 32 32 /** … … 39 39 * \return void 40 40 */ 41 void cucul_draw_circle(cucul_t *qq, int x, int y, int r, char c )41 void cucul_draw_circle(cucul_t *qq, int x, int y, int r, char const *str) 42 42 { 43 43 int test, dx, dy; 44 uint32_t c = _cucul_utf8_to_utf32(str); 44 45 45 46 /* Optimized Bresenham. Kick ass. */ … … 63 64 * \return void 64 65 */ 65 void cucul_fill_ellipse(cucul_t *qq, int xo, int yo, int a, int b, char c) 66 void cucul_fill_ellipse(cucul_t *qq, int xo, int yo, int a, int b, 67 char const *str) 66 68 { 67 69 int d2; … … 79 81 { 80 82 d1 += b*b*(2*x*1) + a*a*(-2*y+2); 81 cucul_draw_line(qq, xo - x, yo - y, xo + x, yo - y, c);82 cucul_draw_line(qq, xo - x, yo + y, xo + x, yo + y, c);83 cucul_draw_line(qq, xo - x, yo - y, xo + x, yo - y, str); 84 cucul_draw_line(qq, xo - x, yo + y, xo + x, yo + y, str); 83 85 y--; 84 86 } … … 86 88 } 87 89 88 cucul_draw_line(qq, xo - x, yo - y, xo + x, yo - y, c);89 cucul_draw_line(qq, xo - x, yo + y, xo + x, yo + y, c);90 cucul_draw_line(qq, xo - x, yo - y, xo + x, yo - y, str); 91 cucul_draw_line(qq, xo - x, yo + y, xo + x, yo + y, str); 90 92 91 93 d2 = b*b*(x+0.5)*(x+0.5) + a*a*(y-1)*(y-1) - a*a*b*b; … … 103 105 104 106 y--; 105 cucul_draw_line(qq, xo - x, yo - y, xo + x, yo - y, c);106 cucul_draw_line(qq, xo - x, yo + y, xo + x, yo + y, c);107 cucul_draw_line(qq, xo - x, yo - y, xo + x, yo - y, str); 108 cucul_draw_line(qq, xo - x, yo + y, xo + x, yo + y, str); 107 109 } 108 110 } … … 118 120 * \return void 119 121 */ 120 void cucul_draw_ellipse(cucul_t *qq, int xo, int yo, int a, int b, char c) 122 void cucul_draw_ellipse(cucul_t *qq, int xo, int yo, int a, int b, 123 char const *str) 121 124 { 122 125 int d2; … … 124 127 int y = b; 125 128 int d1 = b*b - (a*a*b) + (a*a/4); 129 uint32_t c = _cucul_utf8_to_utf32(str); 126 130 127 131 ellipsepoints(qq, xo, yo, x, y, c); … … 212 216 } 213 217 214 static void ellipsepoints(cucul_t *qq, int xo, int yo, int x, int y, charc)218 static void ellipsepoints(cucul_t *qq, int xo, int yo, int x, int y, uint32_t c) 215 219 { 216 220 uint8_t b = 0; … … 226 230 227 231 if((b & (0x1|0x4)) == (0x1|0x4)) 228 cucul_putchar(qq, xo + x, yo + y, c);232 _cucul_putchar32(qq, xo + x, yo + y, c); 229 233 230 234 if((b & (0x2|0x4)) == (0x2|0x4)) 231 cucul_putchar(qq, xo - x, yo + y, c);235 _cucul_putchar32(qq, xo - x, yo + y, c); 232 236 233 237 if((b & (0x1|0x8)) == (0x1|0x8)) 234 cucul_putchar(qq, xo + x, yo - y, c);238 _cucul_putchar32(qq, xo + x, yo - y, c); 235 239 236 240 if((b & (0x2|0x8)) == (0x2|0x8)) 237 cucul_putchar(qq, xo - x, yo - y, c);238 } 239 241 _cucul_putchar32(qq, xo - x, yo - y, c); 242 } 243 -
libcaca/trunk/cucul/cucul.h
r677 r678 163 163 * 164 164 * @{ */ 165 void cucul_draw_line(cucul_t *, int, int, int, int, char );166 void cucul_draw_polyline(cucul_t *, int const x[], int const y[], int, char );165 void cucul_draw_line(cucul_t *, int, int, int, int, char const *); 166 void cucul_draw_polyline(cucul_t *, int const x[], int const y[], int, char const *); 167 167 void cucul_draw_thin_line(cucul_t *, int, int, int, int); 168 168 void cucul_draw_thin_polyline(cucul_t *, int const x[], int const y[], int); 169 169 170 void cucul_draw_circle(cucul_t *, int, int, int, char );171 void cucul_draw_ellipse(cucul_t *, int, int, int, int, char );170 void cucul_draw_circle(cucul_t *, int, int, int, char const *); 171 void cucul_draw_ellipse(cucul_t *, int, int, int, int, char const *); 172 172 void cucul_draw_thin_ellipse(cucul_t *, int, int, int, int); 173 void cucul_fill_ellipse(cucul_t *, int, int, int, int, char );174 175 void cucul_draw_box(cucul_t *, int, int, int, int, char );173 void cucul_fill_ellipse(cucul_t *, int, int, int, int, char const *); 174 175 void cucul_draw_box(cucul_t *, int, int, int, int, char const *); 176 176 void cucul_draw_thin_box(cucul_t *, int, int, int, int); 177 void cucul_fill_box(cucul_t *, int, int, int, int, char );178 179 void cucul_draw_triangle(cucul_t *, int, int, int, int, int, int, char );177 void cucul_fill_box(cucul_t *, int, int, int, int, char const *); 178 179 void cucul_draw_triangle(cucul_t *, int, int, int, int, int, int, char const *); 180 180 void cucul_draw_thin_triangle(cucul_t *, int, int, int, int, int, int); 181 void cucul_fill_triangle(cucul_t *, int, int, int, int, int, int, char );181 void cucul_fill_triangle(cucul_t *, int, int, int, int, int, int, char const *); 182 182 /* @} */ 183 183 -
libcaca/trunk/cucul/cucul_internals.h
r672 r678 50 50 }; 51 51 52 /* Initialisationfunctions */52 /* Bitmap functions */ 53 53 extern int _cucul_init_bitmap(void); 54 54 extern int _cucul_end_bitmap(void); 55 56 /* Canvas functions */ 55 57 extern void _cucul_set_size(cucul_t *, unsigned int, unsigned int); 58 extern void _cucul_putchar32(cucul_t *qq, int x, int y, uint32_t c); 56 59 57 60 /* Charset functions */ -
libcaca/trunk/cucul/line.c
r672 r678 33 33 int x1, y1; 34 34 int x2, y2; 35 charc;35 uint32_t c; 36 36 void (*draw) (cucul_t *, struct line*); 37 37 }; … … 50 50 * \param x2 X coordinate of the second point. 51 51 * \param y2 Y coordinate of the second point. 52 * \param c Character to draw the line with. 53 * \return void 54 */ 55 void cucul_draw_line(cucul_t *qq, int x1, int y1, int x2, int y2, char c) 52 * \param str UTF-8 string containing the character to use to draw the line. 53 * \return void 54 */ 55 void cucul_draw_line(cucul_t *qq, int x1, int y1, int x2, int y2, 56 char const *str) 56 57 { 57 58 struct line s; … … 60 61 s.x2 = x2; 61 62 s.y2 = y2; 62 s.c = c;63 s.c = _cucul_utf8_to_utf32(str); 63 64 s.draw = draw_solid_line; 64 65 clip_line(qq, &s); … … 74 75 * \param y Array of Y coordinates. Must have \p n + 1 elements. 75 76 * \param n Number of lines to draw. 76 * \param c Character to draw the lines with. 77 * \return void 78 */ 79 void cucul_draw_polyline(cucul_t *qq, int const x[], int const y[], int n, char c) 77 * \param str UTF-8 string containing the character to use to draw the lines. 78 * \return void 79 */ 80 void cucul_draw_polyline(cucul_t *qq, int const x[], int const y[], int n, 81 char const *str) 80 82 { 81 83 int i; 82 84 struct line s; 83 s.c = c;85 s.c = _cucul_utf8_to_utf32(str); 84 86 s.draw = draw_solid_line; 85 87 … … 255 257 for(; dx>=0; dx--) 256 258 { 257 cucul_putchar(qq, x1, y1, s->c);259 _cucul_putchar32(qq, x1, y1, s->c); 258 260 if(delta > 0) 259 261 { … … 277 279 for(; dy >= 0; dy--) 278 280 { 279 cucul_putchar(qq, x1, y1, s->c);281 _cucul_putchar32(qq, x1, y1, s->c); 280 282 if(delta > 0) 281 283 { … … 302 304 static void draw_thin_line(cucul_t *qq, struct line* s) 303 305 { 304 char *charmapx, *charmapy;306 uint32_t charmapx[2], charmapy[2]; 305 307 int x1, y1, x2, y2; 306 308 int dx, dy; … … 309 311 if(s->x2 >= s->x1) 310 312 { 311 if(s->y1 > s->y2) 312 charmapx = ",'"; 313 else 314 charmapx = "`."; 313 charmapx[0] = (s->y1 > s->y2) ? (uint32_t)',' : (uint32_t)'`'; 314 charmapx[1] = (s->y1 > s->y2) ? (uint32_t)'\'' : (uint32_t)'.'; 315 315 x1 = s->x1; y1 = s->y1; x2 = s->x2; y2 = s->y2; 316 316 } 317 317 else 318 318 { 319 if(s->y1 > s->y2) 320 charmapx = "`."; 321 else 322 charmapx = ",'"; 319 charmapx[0] = (s->y1 > s->y2) ? (uint32_t)'`' : (uint32_t)'.'; 320 charmapx[1] = (s->y1 > s->y2) ? (uint32_t)',' : (uint32_t)'\''; 323 321 x2 = s->x1; y2 = s->y1; x1 = s->x2; y1 = s->y2; 324 322 } … … 329 327 if(y1 > y2) 330 328 { 331 charmapy = ",'"; 329 charmapy[0] = (uint32_t)','; 330 charmapy[1] = (uint32_t)'\''; 332 331 yinc = -1; 333 332 } … … 335 334 { 336 335 yinc = 1; 337 charmapy = "`."; 336 charmapy[0] = (uint32_t)'`'; 337 charmapy[1] = (uint32_t)'.'; 338 338 } 339 339 … … 349 349 if(delta > 0) 350 350 { 351 cucul_putchar(qq, x1, y1, charmapy[1]);351 _cucul_putchar32(qq, x1, y1, charmapy[1]); 352 352 x1++; 353 353 y1 += yinc; … … 358 358 { 359 359 if(prev) 360 cucul_putchar(qq, x1, y1, charmapy[0]);360 _cucul_putchar32(qq, x1, y1, charmapy[0]); 361 361 else 362 cucul_putchar(qq, x1, y1,'-');362 _cucul_putchar32(qq, x1, y1, (uint32_t)'-'); 363 363 x1++; 364 364 delta += dpr; … … 377 377 if(delta > 0) 378 378 { 379 cucul_putchar(qq, x1, y1, charmapx[0]);380 cucul_putchar(qq, x1 + 1, y1, charmapx[1]);379 _cucul_putchar32(qq, x1, y1, charmapx[0]); 380 _cucul_putchar32(qq, x1 + 1, y1, charmapx[1]); 381 381 x1++; 382 382 y1 += yinc; … … 385 385 else 386 386 { 387 cucul_putchar(qq, x1, y1,'|');387 _cucul_putchar32(qq, x1, y1, (uint32_t)'|'); 388 388 y1 += yinc; 389 389 delta += dpr; -
libcaca/trunk/cucul/triangle.c
r672 r678 39 39 * \return void 40 40 */ 41 void cucul_draw_triangle(cucul_t *qq, int x1, int y1, int x2, int y2, int x3, int y3, char c) 41 void cucul_draw_triangle(cucul_t *qq, int x1, int y1, int x2, int y2, 42 int x3, int y3, char const *str) 42 43 { 43 cucul_draw_line(qq, x1, y1, x2, y2, c);44 cucul_draw_line(qq, x2, y2, x3, y3, c);45 cucul_draw_line(qq, x3, y3, x1, y1, c);44 cucul_draw_line(qq, x1, y1, x2, y2, str); 45 cucul_draw_line(qq, x2, y2, x3, y3, str); 46 cucul_draw_line(qq, x3, y3, x1, y1, str); 46 47 } 47 48 … … 57 58 * \return void 58 59 */ 59 void cucul_draw_thin_triangle(cucul_t *qq, int x1, int y1, int x2, int y2, int x3, int y3) 60 void cucul_draw_thin_triangle(cucul_t *qq, int x1, int y1, int x2, int y2, 61 int x3, int y3) 60 62 { 61 63 cucul_draw_thin_line(qq, x1, y1, x2, y2); … … 76 78 * \return void 77 79 */ 78 void cucul_fill_triangle(cucul_t *qq, int x1, int y1, int x2, int y2, int x3, int y3, char c) 80 void cucul_fill_triangle(cucul_t *qq, int x1, int y1, int x2, int y2, 81 int x3, int y3, char const *str) 79 82 { 80 83 int x, y, xa, xb, xmax, ymax; 84 uint32_t c; 81 85 82 86 /* Bubble-sort y1 <= y2 <= y3 */ 83 87 if(y1 > y2) 84 88 { 85 cucul_fill_triangle(qq, x2, y2, x1, y1, x3, y3, c);89 cucul_fill_triangle(qq, x2, y2, x1, y1, x3, y3, str); 86 90 return; 87 91 } … … 89 93 if(y2 > y3) 90 94 { 91 cucul_fill_triangle(qq, x1, y1, x3, y3, x2, y2, c);95 cucul_fill_triangle(qq, x1, y1, x3, y3, x2, y2, str); 92 96 return; 93 97 } … … 100 104 xmax = qq->width - 1; 101 105 ymax = qq->height - 1; 106 107 c = _cucul_utf8_to_utf32(str); 102 108 103 109 /* Rasterize our triangle */ … … 131 137 132 138 for(x = xa; x <= xb; x++) 133 cucul_putchar(qq, x, y, c);139 _cucul_putchar32(qq, x, y, c); 134 140 } 135 141 } -
libcaca/trunk/src/cacaview.c
r677 r678 430 430 { 431 431 cucul_set_color(qq, CUCUL_COLOR_WHITE, CUCUL_COLOR_BLUE); 432 cucul_draw_line(qq, 0, 0, ww - 1, 0, ' ');433 cucul_draw_line(qq, 0, wh - 2, ww - 1, wh - 2, '-');432 cucul_draw_line(qq, 0, 0, ww - 1, 0, " "); 433 cucul_draw_line(qq, 0, wh - 2, ww - 1, wh - 2, "-"); 434 434 cucul_putstr(qq, 0, 0, "q:Quit np:Next/Prev +-x:Zoom gG:Gamma " 435 435 "hjkl:Move d:Dither a:Antialias"); … … 440 440 441 441 cucul_set_color(qq, CUCUL_COLOR_LIGHTGRAY, CUCUL_COLOR_BLACK); 442 cucul_draw_line(qq, 0, wh - 1, ww - 1, wh - 1, ' ');442 cucul_draw_line(qq, 0, wh - 1, ww - 1, wh - 1, " "); 443 443 } 444 444 -
libcaca/trunk/test/demo.c
r677 r678 242 242 j = 15 + sin(0.03*i) * 8; 243 243 cucul_set_color(qq, CUCUL_COLOR_WHITE, CUCUL_COLOR_BLACK); 244 cucul_fill_ellipse(qq, xo, yo, j, j / 2, '#');244 cucul_fill_ellipse(qq, xo, yo, j, j / 2, "#"); 245 245 cucul_set_color(qq, CUCUL_COLOR_YELLOW, CUCUL_COLOR_BLACK); 246 cucul_draw_ellipse(qq, xo, yo, j, j / 2, '#');246 cucul_draw_ellipse(qq, xo, yo, j, j / 2, "#"); 247 247 248 248 /* Draw the pyramid */ … … 260 260 261 261 cucul_set_color(qq, CUCUL_COLOR_GREEN, CUCUL_COLOR_BLACK); 262 cucul_fill_triangle(qq, xo, yo, xb, yb, xa, ya, '%');262 cucul_fill_triangle(qq, xo, yo, xb, yb, xa, ya, "%"); 263 263 cucul_set_color(qq, CUCUL_COLOR_YELLOW, CUCUL_COLOR_BLACK); 264 264 cucul_draw_thin_triangle(qq, xo, yo, xb, yb, xa, ya); 265 265 266 266 cucul_set_color(qq, CUCUL_COLOR_RED, CUCUL_COLOR_BLACK); 267 cucul_fill_triangle(qq, xa, ya, xb, yb, xc, yc, '#');267 cucul_fill_triangle(qq, xa, ya, xb, yb, xc, yc, "#"); 268 268 cucul_set_color(qq, CUCUL_COLOR_YELLOW, CUCUL_COLOR_BLACK); 269 269 cucul_draw_thin_triangle(qq, xa, ya, xb, yb, xc, yc); 270 270 271 271 cucul_set_color(qq, CUCUL_COLOR_BLUE, CUCUL_COLOR_BLACK); 272 cucul_fill_triangle(qq, xo, yo, xb, yb, xc, yc, '%');272 cucul_fill_triangle(qq, xo, yo, xb, yb, xc, yc, "%"); 273 273 cucul_set_color(qq, CUCUL_COLOR_YELLOW, CUCUL_COLOR_BLACK); 274 274 cucul_draw_thin_triangle(qq, xo, yo, xb, yb, xc, yc); … … 374 374 cucul_draw_thin_line(qq, xa, ya, xb, yb); 375 375 else 376 cucul_draw_line(qq, xa, ya, xb, yb, '#');376 cucul_draw_line(qq, xa, ya, xb, yb, "#"); 377 377 } 378 378 … … 395 395 396 396 cucul_set_color(qq, cucul_rand(0, 15), cucul_rand(0, 15)); 397 cucul_fill_box(qq, xa, ya, xb, yb, '#');397 cucul_fill_box(qq, xa, ya, xb, yb, "#"); 398 398 399 399 cucul_set_color(qq, cucul_rand(0, 15), CUCUL_COLOR_BLACK); … … 401 401 cucul_draw_thin_box(qq, xa, ya, xb, yb); 402 402 else if(outline == 1) 403 cucul_draw_box(qq, xa, ya, xb, yb, '#');403 cucul_draw_box(qq, xa, ya, xb, yb, "#"); 404 404 } 405 405 … … 426 426 427 427 cucul_set_color(qq, cucul_rand(0, 15), cucul_rand(0, 15)); 428 cucul_fill_ellipse(qq, x, y, a, b, '#');428 cucul_fill_ellipse(qq, x, y, a, b, "#"); 429 429 430 430 cucul_set_color(qq, cucul_rand(0, 15), CUCUL_COLOR_BLACK); … … 432 432 cucul_draw_thin_ellipse(qq, x, y, a, b); 433 433 else if(outline == 1) 434 cucul_draw_ellipse(qq, x, y, a, b, '#');434 cucul_draw_ellipse(qq, x, y, a, b, "#"); 435 435 } 436 436 … … 456 456 457 457 cucul_set_color(qq, cucul_rand(0, 15), cucul_rand(0, 15)); 458 cucul_fill_triangle(qq, xa, ya, xb, yb, xc, yc, '#');458 cucul_fill_triangle(qq, xa, ya, xb, yb, xc, yc, "#"); 459 459 460 460 cucul_set_color(qq, cucul_rand(0, 15), CUCUL_COLOR_BLACK); … … 462 462 cucul_draw_thin_triangle(qq, xa, ya, xb, yb, xc, yc); 463 463 else if(outline == 1) 464 cucul_draw_triangle(qq, xa, ya, xb, yb, xc, yc, '#');464 cucul_draw_triangle(qq, xa, ya, xb, yb, xc, yc, "#"); 465 465 } 466 466 -
libcaca/trunk/test/event.c
r677 r678 41 41 42 42 cucul_set_color(qq, CUCUL_COLOR_WHITE, CUCUL_COLOR_BLUE); 43 cucul_draw_line(qq, 0, 0, cucul_get_width(qq) - 1, 0, ' ');43 cucul_draw_line(qq, 0, 0, cucul_get_width(qq) - 1, 0, " "); 44 44 45 cucul_draw_line(qq, 0, h, cucul_get_width(qq) - 1, h, ' ');45 cucul_draw_line(qq, 0, h, cucul_get_width(qq) - 1, h, " "); 46 46 cucul_putstr(qq, 0, h, "type \"quit\" to exit"); 47 47 … … 85 85 /* Print current event */ 86 86 cucul_set_color(qq, CUCUL_COLOR_WHITE, CUCUL_COLOR_BLUE); 87 cucul_draw_line(qq, 0, 0, cucul_get_width(qq) - 1, 0, ' ');87 cucul_draw_line(qq, 0, 0, cucul_get_width(qq) - 1, 0, " "); 88 88 print_event(0, 0, events[0]); 89 89 90 cucul_draw_line(qq, 0, h, cucul_get_width(qq) - 1, h, ' ');90 cucul_draw_line(qq, 0, h, cucul_get_width(qq) - 1, h, " "); 91 91 cucul_printf(qq, 0, h, "type \"quit\" to exit: %s", quit_string[quit]); 92 92 -
libcaca/trunk/test/export.c
r677 r678 92 92 93 93 cucul_set_color(qq, CUCUL_COLOR_BLACK, CUCUL_COLOR_WHITE); 94 cucul_fill_ellipse(qq, WIDTH / 2, HEIGHT / 2, WIDTH / 4, HEIGHT / 4, ' ');94 cucul_fill_ellipse(qq, WIDTH / 2, HEIGHT / 2, WIDTH / 4, HEIGHT / 4, " "); 95 95 cucul_putstr(qq, WIDTH / 2 - 5, HEIGHT / 2 - 2, "(\") \\o/ <&>"); 96 96 cucul_putstr(qq, WIDTH / 2 - 7, HEIGHT / 2 + 2, "äβç ░▒▓█▓▒░ ΔЗҒ"); -
libcaca/trunk/test/spritedit.c
r677 r678 101 101 yb = ya + 1 + cucul_get_sprite_height(qq, sprite, frame); 102 102 cucul_set_color(qq, CUCUL_COLOR_BLACK, CUCUL_COLOR_BLACK); 103 cucul_fill_box(qq, 57 + xa, 10 + ya, 57 + xb, 10 + yb, ' ');103 cucul_fill_box(qq, 57 + xa, 10 + ya, 57 + xb, 10 + yb, " "); 104 104 cucul_set_color(qq, CUCUL_COLOR_LIGHTGRAY, CUCUL_COLOR_BLACK); 105 105 cucul_draw_thin_box(qq, 57 + xa, 10 + ya, 57 + xb, 10 + yb);
Note: See TracChangeset
for help on using the changeset viewer.