Changeset 3494 for libcaca/trunk/caca/driver/x11.c
 Timestamp:
 May 21, 2009, 10:55:13 PM (12 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

libcaca/trunk/caca/driver/x11.c
r3480 r3494 1 1 /* 2 2 * libcaca Colour ASCIIArt library 3 * Copyright (c) 2002200 7 Sam Hocevar <sam@zoy.org>3 * Copyright (c) 20022009 Sam Hocevar <sam@hocevar.net> 4 4 * 2007 Ben Wiley Sittler <bsittler@gmail.com> 5 5 * All Rights Reserved … … 296 296 int x, y, i, len; 297 297 298 for(i = 0; i < caca_get_dirty_rect angle_count(dp>cv); i++)299 { 300 int xmin, ymin, xmax, ymax;301 302 caca_get_dirty_rect angle(dp>cv, i, &xmin, &ymin, &xmax, &ymax);298 for(i = 0; i < caca_get_dirty_rect_count(dp>cv); i++) 299 { 300 int dx, dy, dw, dh; 301 302 caca_get_dirty_rect(dp>cv, i, &dx, &dy, &dw, &dh); 303 303 304 304 /* First draw the background colours. Splitting the process in two 305 305 * loops like this is actually slightly faster. */ 306 for(y = ymin; y <= ymax; y++)307 { 308 for(x = xmin; x <= xmax; x += len)306 for(y = dy; y < dy + dh; y++) 307 { 308 for(x = dx; x < dx + dw; x += len) 309 309 { 310 310 uint32_t const *attrs = cvattrs + x + y * width; … … 328 328 329 329 /* Then print the foreground characters */ 330 for(y = ymin; y <= ymax; y++)330 for(y = dy; y < dy + dh; y++) 331 331 { 332 332 int yoff = (y + 1) * dp>drv.p>font_height 333 333  dp>drv.p>font_offset; 334 uint32_t const *chars = cvchars + xmin+ y * width;335 uint32_t const *attrs = cvattrs + xmin+ y * width;336 337 for(x = xmin; x <= xmax; x++, chars++, attrs++)334 uint32_t const *chars = cvchars + dx + y * width; 335 uint32_t const *attrs = cvattrs + dx + y * width; 336 337 for(x = dx; x < dx + dw; x++, chars++, attrs++) 338 338 { 339 339 XSetForeground(dp>drv.p>dpy, dp>drv.p>gc,
Note: See TracChangeset
for help on using the changeset viewer.