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 / Using Drawing and Graphics in the Newton 2.1 OS


Anti-Aliasing Monochrome Bitmaps

There are two ways in which black and white bitmaps can be anti-aliased when being reduce in size. Bitmaps in protoImageView views are anti-aliased automatically if the view contains a drawGrayScaled slot set to true. You can also anti-alias bitmaps programmatically with the new *GrayShrink function.

IMPORTANT
The image slot of a protoImageView can contain a variety of objects. However, you may only set the drawGrayScaled slot to true if the image slot contains a bitmap shape.
*GrayShrink accepts two arguments, the bitmap to draw and a style frame. The style frame must contain a transform slot, and the transformation must represent a reduction in size either horizontally or vertically. *GrayShrink renders the bitmap on the screen anti-aliased. You use it instead of using a combination of *MakeShape and DrawShape. If *GrayShrink is not passed a 1-bit bitmap, and a style frame with a transform slot representing a reduction on either axis, the bitmap is not anti-aliased, but still drawn on the screen.

Note
The anti-aliasing algorithm is somewhat time expensive. You should not use *GrayShrink indiscriminately.

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