[futurebasic] Re: [FB] Re: Hi res printing of graphics

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 1999 : Group Archive : Group : All Groups

From: Joe Lewis Wilkins <PepeToo@...>
Date: Mon, 04 Oct 1999 11:26:38 -0700
Robert Cogburn wrote:

> >One item of possible interest/"future resolution"; I've recently used one of
> >my older apps, though newly revived and enhanced, "MacDraft". It has 3
> >different width "hairlines": H, .5, .75; in addition to 1 (one pixel
> >width). I
> >suspect that the Hairlines routine could be enhanced without too much
> >difficulty to provide these additional options as well.
> >
> >Sorry I forgot to indicate that "Hairlines" should be called after ROUTE
> >_toPrinter.
> >
> >Joe Wilkins
>
> Joe, the following is a simple adaptation to FB of a routine in Appendix
> B of IM:Imaging
>
> BEGIN RECORD LineWidth
> dim v%
> dim h%
> END RECORD
>
> REGISTER OFF
> '-------------------------------------
> _SetLineWidth  = 182                              'Postscript Comment for
> hairlines
> _LineWidthSize = 4                                  'Data size( the
> LineWidth record)
> '-------------------------------------
> LOCAL FN SetLineWidth (oldPntr as POINTER, newPntr as POINTER)
> DIM scaleHndl&
>  scaleHndl& = FN NEWHANDLE (4)
>  LONG IF scaleHndl& <> 0 AND SYSERROR = _noErr
>       scaleHndl&..v% = oldPntr.h%
>       scaleHndl&..h% = oldPntr.v%
>       CALL PICCOMMENT (_setLineWidth, _LineWidthSize, scaleHndl&)
>       scaleHndl&..v% = newPntr.v%
>       scaleHndl&..h% = newPntr.h%
>       CALL PICCOMMENT (_setLineWidth, _LineWidthSize, scaleHndl&)
>       DEF DISPOSEH (scaleHndl&)
>  END IF
> END FN
>
> IM explains how this will reset both Laser and Quickdraw printers from a
> previous resolution to a new one (while in the same print job).
> Apparently it works for some other printers too, maybe most printers???
>
> The trick for setting different line widths is that the line width will
> be the normal 1/72 inch times the fraction LineWidth.v/LineWidth.h, which
> comes to 1/4 in the example you had. An example of calling this is
>
> DIM oldWidth as LineWidth
> DIM newWidth as LineWidth
> oldWidth.v = 1: oldWidth.h = 1                 'for the first call
> newWidth.v = 1: newWidth.h = 5              'to set width to 1/5 normal
> DEF LPRINT
> LONG IF NOT PRCANCEL
> route _toPrinter
> FN setLineWidth(oldWidth,newWidth)    'set hairlines
>
> then set oldWidth equal to newWidth for the next callS

Thanks for the info Robert. One other feature with programs like McDraft, and I
suppose it is a part of each object's Record, they provide the ability to assign
"different" line widths to each object; hence the additional "Hairlines" just
become additional object "data". How this works at Print time, I haven't the
foggiest. Seems like FB had a sample Draw Program at one time or maybe it was in
PG. Of course, I doubt that any of us will ever attempt something of this
nature; just food for thought!

Joe Wilkins