From: Alper Akçan (distch@hotmail.com)
Date: Sat 22 Feb 2003 - 13:36:31 IST
Hi, char buf[w * h * BYTESPERPIXEL]; gl_getbox(x, y, w, h, buf); When I get a buffer like that; I can use gl_putboxpart(x, y, w, h, 1, 1, buf, 5, 5); to draw one pixel at (5,5) to (x,y) position. this is OK. But what if I use vga_drawscansegment() ? I have tried this; int i = ((5 * w) + 5) * BYTESPERPIXEL; // to get (5, 5) in buffer. vga_drawscansegment(buf, x, y, BYTESPERPIXEL); // draw (5,5) to (x,y). is this ok? I have also tried this; int i = 0; int bufsize = w * h * BYTESPERPIXEL gl_getbox(x, y, w, h, BYTESPERPIXEL); while (i < bufsize) { y = i / w; x = i % w; vga_drawscansegment(buf, x, y, BYTESPERPIXEL); i += BYTESPERPIXEL; } this puts a box with w , h at correct position. but let sey our box must be; ***** (5 x 5) at position (x, y) ***** ***** ***** ***** that draws like this; *-*-* (5 x 5) at position (x, y), * are OK. - not drawn. *-*-* *-*-* *-*-* *-*-* what is going wrong? Alper. _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail ------------------------------------------------------------------ Unsubscribe: To: listbot@svgalib.org Body: unsubscribe linux-svgalib
This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:25 IST