- Timestamp:
- Mar 27, 2006, 9:40:30 AM (15 years ago)
- Location:
- libcaca/trunk/cucul
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/cucul/cucul.h
r690 r696 152 152 * 153 153 * @{ */ 154 void cucul_invert(cucul_t *); 154 155 void cucul_flip(cucul_t *); 155 156 void cucul_flop(cucul_t *); -
libcaca/trunk/cucul/transform.c
r693 r696 29 29 static uint32_t flopchar(uint32_t ch); 30 30 static uint32_t rotatechar(uint32_t ch); 31 32 /** \brief Invert a canvas' colours. 33 * 34 * This function inverts a canvas' colours (black becomes white, red 35 * becomes cyan, etc.) without changing the characters in it. 36 * 37 * \param qq The canvas to invert. 38 */ 39 void cucul_invert(cucul_t *qq) 40 { 41 uint8_t *attr = qq->attr; 42 unsigned int i; 43 44 for(i = qq->height * qq->width; i--; ) 45 { 46 *attr = ~*attr; 47 attr++; 48 } 49 } 31 50 32 51 /** \brief Flip a canvas horizontally.
Note: See TracChangeset
for help on using the changeset viewer.