Title Banner

Previous Book Contents Book Index Next

Newton Developer Technical Information: Newton Programmer's Guide: 2.1 OS Addendum /
Chapter 6 - Drawing and Graphics 2.1 / Drawing and Graphics Reference
Data Structures


Patterns

Three types of patterns are supported: patterns, gray patterns, and dithered patterns.

Pattern

A pattern is a binary object containing an 8x8 bitmap of class 'pattern. The constants vfWhite, vfLtGray, vfGray, vfDkGray, and vfBlack are patterns in the ROM. For more information, see "Black and White Patterns".

Gray Pattern

A gray pattern is a binary object of class 'grayPattern containing 1 or more pixels in an 8x8 pixel map of class 'pattern. Each pixel is specified as an RGB triplet. Two bytes are used per color component, making for 6 bytes per pixel. For more information, see "Gray Patterns".

Dithered Pattern

A dithered pattern is a frame with the following slots:

Slot description

class
The symbol 'ditherPattern.
pattern
A black and white pattern, see "Pattern".
foreground
A gray tone to use wherever the pattern in the pattern slot contains an on pixel, such as one of the constants listed in "Gray Tone Constants".
background
A gray tone to use wherever the pattern in the pattern slot contains an off pixel, such as one of the constants listed in "Gray Tone Constants".
You should use the *MakeDitheredPattern function to created dithered patterns. This ensures that dithered pattern does not have its own frame map. For more information, see "Dithered Patterns".


Subtopics
Pattern
Gray Pattern
Dithered Pattern

Previous Book Contents Book Index Next

© Apple Computer, Inc.
26 APR 1997



Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help