background image
C H A P T E R 1 3
Drawing and Graphics
Using the Drawing Interface
Making CopyBits Scale Its Output Bitmap
uses the bounds of the bitmap passed to it to scale the bitmap that it
draws; so, by changing the bounds of the bitmap passed to
, you can
make this method scale the bitmap it draws. If you want to scale the output bitmap
without changing the bounds of the original, call
on a clone of the
original bitmap and pass the modified clone bitmap to the
Storing Compressed Pictures and Bitmaps
NTK supports limited compression of pictures and bitmaps. If you store your
package compressed (using the "optimize for space" setting), all items in your
package are compressed in small (approximately 1 KB) pages, rather than object
by object.
You can use the NTK compile-time function
to get a
Macintosh PICT resource that can be drawn on the Newton in a view of the
class. PICT resources are generally smaller than bitmap
frames because each bitmap within the PICT resource contains compressed
bitmap data.
This information applies to the Mac OS version of NTK; the
Windows version differs. See the Newton Toolkit User's Guide
for details.
Capturing a Portion of a View Into a Bitmap
Use the
method to capture a portion of a specified view into a
specified bitmap. This function does not provide scaling capability, although
scaling can be accomplished by passing the destBitmap bitmap returned by this
method to the
function as the value of its shape parameter.
Figure 13-10 shows the relationships between the view to be captured, the source
rectangle, the destination bitmap, and the destination rectangle.
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна