[<<] [<] Page 2 of 2 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: Pixmaps
From: Ben Pfaff ####@####.#### Date: 20 May 1999 19:58:53 -0000 Message-Id: <87g14rqzgv.fsf@pfaffben.user.msu.edu> Greg Haerr ####@####.#### writes: > > IMAGEBITS bits[]; > > // image data here, optionally followed by color data > > > > Make it a pointer, not an array. Otherwise, how can you make a bitmap > > that's part of the screen? > > Again, that won't work for bpp < 8. Fsck fsck fsck. Sure it will. The imagebits are then just piled in right next to each other, as they say "imagebits are imagebits"... ;-) Suppose you have a 1-bit depth bitmap. With a byte-granular quantity (i.e., line_len, etc.), how can you specify a non-byte-aligned subbitmap? You can't. So if you want to support subbitmaps you have to use pixel offsets, not byte offsets, which isn't as simple. -- "To the engineer, the world is a toy box full of sub-optimized and feature-poor toys." --Scott Adams | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
RE: Pixmaps
From: Greg Haerr ####@####.#### Date: 20 May 1999 20:03:19 -0000 Message-Id: <01BEA2C9.452FCF80.greg@censoft.com> > Suppose you have a 1-bit depth bitmap. With a byte-granular quantity > (i.e., line_len, etc.), how can you specify a non-byte-aligned > subbitmap? You can't. So if you want to support subbitmaps you have > to use pixel offsets, not byte offsets, which isn't as simple. > Ah yes, I figured you were going to comment on my quick comment. This can be solved by adding COORD x,y; which are the viewpoint's initial starting positions, relative to the bitmap origin, in pixel units. This is used to create the starting mask and/or pixel offset, much like the original bitmap will have to if required to blt to a screen pixel address... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 2 of 2 [>] [>>] |