bhyde@inmet.UUCP (02/28/85)
Use the capture procs. The pictures are much more complex. Pictures are encoded as a prefix byte code. This byte code is reasonably clever about having shorter forms for things, short vectors are an example. This byte code is also very complex, consider all the fields in a grafPort. Dynamic clipping regions are a particularly complex issue. With out Apple deciding to go public, or disassembling the picture interpreter it is very hard to be confident you know all about the picture encoding. The best reason to keep the picture secret is to save developers the trouble of thinking about using the information. Better documentation of the heap usage, and speed of "budget" ( of everything ) would be a big help! It would be nice to have an ascii form that one could ship to/from the Mac. The encoded picture form does have some nice uses for creating clever little drawing tools, but this use isn't very safe since Apple might decide to change (fix) something. The pictures form do not seem to have a subdrawing ablities, i.e. the byte code interpreter doesn't have goto or call instructions. You can do a lot with the comment instruction to simulate a call instruction within an application. Pictures are sort of complex to use for recognizing that a mouseDown hit a part of your drawing. You end up building a lot of mechinism into the comments to get you back to the object being hit's full information. It maybe that it is best to use the picture as the skeleton around which you wrap all your drawing data, embedding that data entirely in the comments. What have other people actually built to solve these problems? I like to say that 98% of all secrets exist to avoid embarressment. There doesn't appear to be anything embarressing in the picture encoding. Nothing very unusual either given that you've seen a task specific byte-code before. All that tense hacking is fun to pick thru. It would be unnatural to document tense hacking. Secrets do add another pleasing element of magic to an already magical machine. Ben Hyde, Cambridge Mass.