Changeset 1066
- Timestamp:
- Sep 19, 2006, 6:07:13 PM (14 years ago)
- Location:
- libcaca/trunk/cucul
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/cucul/canvas.c
r988 r1066 73 73 74 74 return 0; 75 } 76 77 /** \brief Get the Unicode character at the given coordinates. 78 * 79 * This function gets the ASCII or Unicode value of the character at 80 * the given coordinates. If the value is less or equal to 127 (0x7f), 81 * the character can be printed as ASCII. Otherise, it must be handled 82 * as a UTF-32 value. 83 * 84 * If the coordinates are outside the canvas boundaries, a space (0x20) 85 * is returned. 86 * 87 * This function never fails. 88 * 89 * \param cv A handle to the libcucul canvas. 90 * \param x X coordinate. 91 * \param y Y coordinate. 92 * \param ch The requested character value. 93 * \return The character always returns 0. 94 */ 95 unsigned long int cucul_getchar(cucul_canvas_t *cv, int x, int y) 96 { 97 if(x < 0 || x >= (int)cv->width || y < 0 || y >= (int)cv->height) 98 return 0; 99 100 return (unsigned long int)cv->chars[x + y * cv->width]; 75 101 } 76 102 -
libcaca/trunk/cucul/cucul.h
r1062 r1066 102 102 char const *cucul_get_color_name(unsigned int); 103 103 int cucul_putchar(cucul_canvas_t *, int, int, unsigned long int); 104 unsigned long int cucul_getchar(cucul_canvas_t *, int, int); 104 105 int cucul_putstr(cucul_canvas_t *, int, int, char const *); 105 106 int cucul_printf(cucul_canvas_t *, int, int, char const *, ...);
Note: See TracChangeset
for help on using the changeset viewer.