background image
C H A P T E R 1 3
Drawing and Graphics
13-8
About Drawing
Drawing Compatibility
13
The following new functionality has been added for Newton OS 2.0. For complete
details on the new drawing functions, see the "Drawing and Graphics Reference"
in the Newton Programmer's Reference.
New Functions
13
The following functions have been added:
GetShapeInfo
--returns a frame containing slots of interest for the shape.
DrawIntoBitmap
--draws shapes into a bitmap in the same way that the
DrawShape
method draws shapes into a view.
MakeBitmap
--returns a blank (white) bitmap shape of the specified size.
MungeBitmap
--performs various destructive bitmap operations such as
rotating or flipping the bitmap.
ViewIntoBitmap
--provides a screen-capture capability, writing a portion of
the specified view into the specified bitmap.
New Style Attribute Slots
13
Version 2.0 of Newton system software supports two new slots in the style frame:
clipping
and the
transform
.
Changes to Bitmaps
13
Previous versions of Newton system software treated bitmaps statically. They were
created only from compile-time data, and the operations one could perform on
them were limited to drawing them.
Version 2.0 of Newton system software provides a more dynamic treatment of
bitmaps. You can dynamically create and destroy them, draw into them, and
perform such operations as rotating and flipping them. This more flexible treatment
of bitmaps allows you to use them as offscreen buffers as well as for storage of
documents such as fax pages.
Changes to the HitShape Method
13
Previous versions of
HitShape
returned a non-
nil
value if a specified point lies
within the boundaries of one or more shapes passed to it. Version 2.0 of the
HitShape
function now returns additional information.
© 2007-2017, o7 studio » при воспроизведении материала сайта ссылка обязательна