ba0k+@andrew.cmu.edu (Brian Patrick Arnold) (09/12/89)
Howdy Mac Developer Tech Support People and/or Proficient QuickDraw Programmers (hint as to audience): I need help making a program print better from a Mac than its Sun-III version counterpart. Macs are better, right? (!!!) In reading about support for dashed lines in tech note #91, I found that I should be using this in my program. I assume QuickDraw ignores the PicComment for dashed lines when drawing to the screen. I use MacApp, so my TView.Draw method normally calls DrawPicture and it's pretty ignorant of whether I'm printing or drawing to the screen. Presently, I fake dashed lines now by computing each point for my different dashed line types in QuickDraw. The code for this was written to mimic PostScript dashed lines on an Andrew Window Manager-based Sun-III workstation. The Sun version wrote PostScript files for printing, but the Mac version relies on MacApp's print handling. I have complete control over generating the picture, and I allow undoable copying to the clipboard. What's the recommended approach in this matter? Would it be "best" if I trapped for the piccomment when drawing to the screen? In the MacApp world, does anybody have sample starter code for this if this is what I should do? The reason why this is important is because the present version doesn't print as cleanly with the QuickDraw- based dashed-line-imitations, nor print as fast as the Sun version. Printing is very important to my users who are making technical reports and the like, and I'd hate to refer them to the Sun version for better printing! Also, until I support editing of graphs, can anybody suggest or recommend drawing programs that can deal with the dashed line piccomment, so I could at least refer my users to a Macintosh drawing program to use to edit my pictures (which happen to be graphs)? I'd appreciate help in this fact-finding endeavor. Help! - Brian
wdh@well.UUCP (Bill Hofmann) (09/13/89)
MacDraw II v1.1 (and all MacDraw II versions, I think), support and parse the dashed line picComment. I just implemented dashed (dotted, dash-dot-dashed...) lines in an app. Claris suggests a way to draw all this stuff properly. Basically, what one does is set the dashed line picComment, but also draw the dashed lines by hand (uck-a real pain). But there's more! What you want is for smart applications (like MacDrawII) to parse the picComment and use it, and for dumb applications (like the Scrapbook or, eg, my app) to display the quickdraw. Claris has introduced this whole baroque scheme of a hierarchy of apps which recognize certain picComments to mean "start displaying (wake)" and "sleep." I'd recommend getting in touch with Claris and asking them for a copy of "MacDraw II Version 1.1 PICT File Format" (An update to TN#27). The version I have is dated April 5, 1989. They've got an example of dashed line drawing. -Bill Hofmann