Changeset 325
- Timestamp:
- Jan 7, 2004, 7:15:10 PM (19 years ago)
- Location:
- libcaca/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/NEWS
r322 r325 4 4 ---------------------------- 5 5 6 * many bugfixes in the event handling 6 7 * cacaball, a metaball animation example 7 8 -
libcaca/trunk/src/bitmap.c
r322 r325 171 171 * \brief Create an internal bitmap object. 172 172 * 173 * \param bpp The bitmap depth in bits per pixel. 174 * \param w The bitmap width in pixels. 175 * \param h The bitmap height in pixels. 176 * \param pitch The bitmap pitch in bytes. 177 * \param rmask The bitmask for red values. 178 * \param gmask The bitmask for green values. 179 * \param bmask The bitmask for blue values. 180 * \param amask The bitmask for alpha values. 181 * \return A bitmap object or NULL upon error. 173 * Create a bitmap structure from its coordinates (depth, width, height and 174 * pitch) and pixel mask values. If the depth is 8 bits per pixel, the mask 175 * values are ignored and the colour palette should be set using the 176 * caca_set_bitmap_palette() function. For depths greater than 8 bits per 177 * pixel, a zero alpha mask causes the alpha values to be ignored. 178 * 179 * \param bpp Bitmap depth in bits per pixel. 180 * \param w Bitmap width in pixels. 181 * \param h Bitmap height in pixels. 182 * \param pitch Bitmap pitch in bytes. 183 * \param rmask Bitmask for red values. 184 * \param gmask Bitmask for green values. 185 * \param bmask Bitmask for blue values. 186 * \param amask Bitmask for alpha values. 187 * \return Bitmap object, or NULL upon error. 182 188 */ 183 189 struct caca_bitmap *caca_create_bitmap(unsigned int bpp, unsigned int w, … … 238 244 * \brief Set the palette of an 8bpp bitmap object. 239 245 * 240 * \param bitmap The bitmap object. 241 * \param red An array of 256 red values. 242 * \param green An array of 256 green values. 243 * \param blue An array of 256 blue values. 244 * \param alpha An array of 256 alpha values. 246 * Set the palette of an 8 bits per pixel bitmap. Values should be between 247 * 0 and 4095 (0xfff). 248 * 249 * \param bitmap Bitmap object. 250 * \param red Array of 256 red values. 251 * \param green Array of 256 green values. 252 * \param blue Array of 256 blue values. 253 * \param alpha Array of 256 alpha values. 245 254 */ 246 255 void caca_set_bitmap_palette(struct caca_bitmap *bitmap, … … 277 286 * \brief Free the memory associated with a bitmap. 278 287 * 279 * \param bitmap The bitmap object to be freed. 280 * \return void 288 * Free the memory allocated by caca_create_bitmap(). 289 * 290 * \param bitmap Bitmap object. 281 291 */ 282 292 void caca_free_bitmap(struct caca_bitmap *bitmap) … … 378 388 * \brief Draw a bitmap on the screen. 379 389 * 390 * Draw a bitmap at the given coordinates. The bitmap can be of any size and 391 * will be stretched to the text area. 392 * 380 393 * \param x1 X coordinate of the upper-left corner of the drawing area. 381 394 * \param y1 Y coordinate of the upper-left corner of the drawing area. 382 395 * \param x2 X coordinate of the lower-right corner of the drawing area. 383 396 * \param y2 Y coordinate of the lower-right corner of the drawing area. 384 * \param bitmap The bitmap object to be drawn. 385 * \param pixels A pointer to the bitmap's pixels. 386 * \return void 397 * \param bitmap Bitmap object to be drawn. 398 * \param pixels Bitmap's pixels. 387 399 */ 388 400 void caca_draw_bitmap(int x1, int y1, int x2, int y2, -
libcaca/trunk/src/io.c
r324 r325 139 139 unsigned int newy = xevent.xmotion.y / x11_font_height; 140 140 141 if(x11_x == newx && x11_y == newy)142 continue;143 144 141 if(newx >= _caca_width) 145 142 newx = _caca_width - 1; 146 143 if(newy >= _caca_height) 147 144 newy = _caca_height - 1; 145 146 if(x11_x == newx && x11_y == newy) 147 continue; 148 148 149 149 x11_x = newx & 0xfff;
Note: See TracChangeset
for help on using the changeset viewer.