Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!ut-sally!utah-cs!utah-gr!stride!l5comp!scotty From: scotty@l5comp.UUCP (Scott Turner) Newsgroups: comp.sys.amiga Subject: Re: Program-independent rastports Message-ID: <329@l5comp.UUCP> Date: Sun, 23-Aug-87 00:19:05 EDT Article-I.D.: l5comp.329 Posted: Sun Aug 23 00:19:05 1987 Date-Received: Wed, 26-Aug-87 07:26:31 EDT References: <3878@garfield.UUCP> Reply-To: scotty@l5comp.UUCP (Scott Turner) Organization: L5 Computing, Edmonds, WA Lines: 78 Summary: How do you do what you want to do? In article <3878@garfield.UUCP> john13@garfield.UUCP (John Russell) writes: >-- >As far as my suggestion for a Draw: device goes, my dream would be to use it >as follows: > >draw:create 320 200 32 df0:palette (create custom screen) >draw:load df0:picture (loads iff file into custom screen) >copy df0:obj_description to draw: (plop on some pre-calced polygons) >draw:arc 0 0 300 200 etc (send various drawing commands) All the above looks good till you take an eye to actually creating such a draw: handler. First, what do you think is going to happen when you type in draw:create...? The CLI is going to try and load draw:create as a program and execute it. Do you propose having the handler return a "dummy" program to run which will then be passed the parameters? Because a) otherwise you'll get an error, nasty for exec files b) the 320 200 32 df0:palette will NOT be passed to the handler, they'll be passed to the program... Alternate proposal: touch draw:create/320/200/32/df0:palette touch draw:load/df0:picture copy df0:obj_description to draw:object touch draw:arc/0/0/300/200 The /'s are needed so all params get passed to the handler. But the above still isn't workable I think. the df0:palette and df0:picture would be a problem due to the embedded :'s I think. >dpaint (edit *that screen* with dpaint) OK, so we would give dpaint what for a filename so it can edit that picture? draw:save? But that violates the draw:load/filename concept... How about we fix that by: copy df0:picture to draw:load? That bags up one of them nasty :'s. But then another thought occurs to me. What do we do with the screen info embedded in the IFF file? Like the color map etc We also leave open: copy df0:picture to draw:load/10/10/100/100/0/0 This would extract a rectangle 10/10/100/100 from the picture at 0/0 and paste it into our draw:screen. We could slap on two more digits so we could say where in the screen to slap it in at too eh? While we're at it why not: copy df0:palette to draw:create/320/200/32 Then we nail the last :. >makeimage 10 10 100 25 "df0:image.h" (grab section as C source code) How about: copy draw:savec/10/10/100/25 to df0:image.h Which would also imply: copy draw:save/10/10/100/25 to df0:image.iff Which would also imply: copy draw:savec to df0:alltheimage.h And for the laser printer fans out there: copy draw:savep to df0:image.postscript Much nicer though would be to have named pictures so that multiple draw's could be open at once. Scott Turner -- UUCP-stick: stride!l5comp!scotty | If you want to injure my goldfish just make UUCP-auto: scotty@l5comp.UUCP | sure I don't run up a vet bill. GEnie: JST | "The bombs drop in 5 minutes" R. Reagan "Pirated software? Just say *NO*!" S. Turner