Microsoft KB Archive/44034

From BetaArchive Wiki
Knowledge Base


How Bits in PAINT Tiling String Represent Pixels in Basic

Article ID: 44034

Article Last Modified on 11/21/2006

This article was previously published under Q44034

SUMMARY

For the best explanation of tiling with the PAINT statement, please refer to one of the following manuals:

  1. Pages 181 to 191 (Section 5.8.2, "Painting with Patterns: Tiling") of the "Microsoft QuickBasic 4.5: Programming in Basic" manual for Version 4.50
  2. Pages 228 to 239 (Section 5.8.2, "Painting with Patterns: Tiling") of the "Microsoft QuickBasic 4.0: Programming in Basic: Selected Topics" manual for Versions 4.00 and 4.00b
  3. Pages 228 to 239 (Section 5.8.2, "Painting with Patterns: Tiling") of "Microsoft Basic Compiler 6.0: Programming in Basic: Selected Topics" for Versions 6.00 and 6.00b for MS OS/2 and MS-DOS
  4. Pages 179 to 189 ("Painting with Patterns: Tiling") of "Microsoft Basic 7.0: Programmer's Guide" for Microsoft Basic Professional Development System (PDS) Version 7.00 for MS OS/2 and MS-DOS

The tiling information on these pages also applies to QuickBasic 2.00, 2.01, and 3.00 (which support only SCREENs 0, 1, 2, 7, 8, 9, 10).

Please also see a separate article in this Knowledge Base, which can be found by querying on the following words:

PAINT and tiling and QuickBasic


MORE INFORMATION

Consider the following sentence taken from the PAINT statement in the language reference manual:

In the tile string, each byte masks eight bits along the x-axis when putting down points.


The effect of each bit on screen pixels depends upon how many attributes are in that screen mode. On two-attribute screen modes (SCREENs 2, 3, 4, 11), each bit in the tile string directly represents a pixel, and each byte in the tile string represents 8 pixels along the x-axis. In graphics screens with more than two attributes (1, 7, 8, 9, 10, 12, 13), each pixel is represented by more than 1 bit (in order to carry the extra color information). In SCREEN 13, which has 8 bits per pixel, tiling is not very useful. Tiling is most flexible in SCREENs 2, 3, 4, and 11.


Additional query words: QuickBas BasicCom

Keywords: KB44034