Drawing on the Array to be PUT - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: QBasic (http://qbasicnews.com/newforum/forum-4.html) +--- Forum: QB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-11.html) +--- Thread: Drawing on the Array to be PUT (/thread-9447.html) |
Drawing on the Array to be PUT - torstum - 06-24-2006 This is probably trivial to the veterans, but I've been thinking about manipulating directly the (sprite ) array before it gets PUT. Does anyone use this technique to draw lines, squares, shapes on screen? Is it faster this way, or is it slower because QBasic lacks high-level bitwise operations (am I wrong?)? I will have to have a good understanding of the QBasic image file format, though. Drawing on the Array to be PUT - Anonymous - 06-25-2006 the image is stored like this first 2 bytes = width * 8 next 2 bytes = height rest data = one byte per pixel (8-bit) thats why the size (in 16-bit integers) is ((w * h ) / 2) + 2 Drawing on the Array to be PUT - torstum - 06-26-2006 Chaos, 1 byte per pixel is for VGA, but isn't it 4 bits (16 colors) per pixel for EGA? Drawing on the Array to be PUT - Anonymous - 06-26-2006 No idea. You'd have to be high to use EGA, it's 2006 =) Drawing on the Array to be PUT - RyanKelly - 06-27-2006 Quote:Chaos, 1 byte per pixel is for VGA, but isn't it 4 bits (16 colors) per pixel for EGA? Most VGA modes resemble the EGA modes in that respect. The 256 color mode is only VGA mode with 8 bit pixel data. |