Apple Newton Utilities Guide de l'utilisateur Page 548

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 942
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 547
CHAPTER 13
Drawing and Graphics
13-22 Using the Drawing Interface
Notice that there are two types of pictures: bitmaps (a frame with bits, a
bounds, and mask slots) and Format 1 PICTs (binary objects of class picture).
clPictureView can draw both of these types of objects,
so you just need to choose a format and use
SetValue on the icon slot,
as follows:
SetValue(myView, 'icon, kPictureAsBitMap);
or
SetValue(myView, 'icon, kPictureAsPict);
Optimizing Drawing Performance 13
You can use several methods to make drawing functions execute faster.
If you have a fairly static background picture, you can use a predened PICT
resource. Create the PICT in your favorite drawing program, and use the PICT as
the background (
clIconView). The graphics system also has a picture-making
function that enables you to create pictures that you can draw over and over again.
If you want to improve hit-testing of objects, use a larger view in combination with
a
ViewDrawScript or a ViewClickScript rather than using smaller views
with an individual
ViewClickScript. This is especially true of a view that
consists of regular smaller views.
Vue de la page 547
1 2 ... 543 544 545 546 547 548 549 550 551 552 553 ... 941 942

Commentaires sur ces manuels

Pas de commentaire