Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!mailrus!bbn!metasoft!rln From: rln@metasoft.UUCP (Roberta Norin) Newsgroups: comp.sys.mac.programmer Subject: Converting PICT's Message-ID: <1082@metasoft.UUCP> Date: 8 Feb 90 23:42:19 GMT Organization: Meta Software Corporation, Cambridge MA Lines: 32 I am trying to read the contents of a PICT and convert the data to my own format. I have noticed other applications doing this. In my first attempt I just used the documentation on PICT opcodes and processed through pointer to the picture data. This worked but documentation seems to indicate that you should not do this. So I installed my own StdPutPic procedure, opened a new picture, drew the picture, and then closed and killed the new picture. Is this a legitimate approach? The Mac repeatedly calls my StdPutPic procedure with a pointer to the data and a count. For the the most part it sends me the code one time and the data the next time. However, this is not always the case. For the ShortLine opcode, for example, my procedure gets called with the code first, then with a point, then with a vertical offset, and then with a horizontal offset. For the Version opcode my routine is called with the code and the data. I am having difficulty writing a StdPutPic procedure that handles all these cases. If anyone has any insights, suggestions, or references, please e-mail them to me. Thanks, Roberta Norin rln%metasoft@bbn.com