[futurebasic] Re: [FB] Re: Page Centering

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : February 2002 : Group Archive : Group : All Groups

From: Martin Fitzgibbons <rush@...>
Date: Thu, 21 Feb 2002 14:50:29 +1100
Excellent Craig, I guess my method was the result of something
I developed a long time ago and sort of worked but now
I am demanding more accurate printouts it is falling over.

Many thanks
Martin

Also thank you Robert

Craig Hoyt wrote:

> Hi Martin,
> You may already have this solved but here's how I do it.
>
> ROUTE _toPrinter
> printRect;8 = [PRHANDLE]+_prInfo_RPage
>
> This will put the exact dimension of the selected printer's page into
> printRect. At this point you can use your...
>
> CALL PENSIZE(2,2)
> CALL FRAMEROUNDRECT(printRect,16,16)
>
> Do not assume any size rect will fit on a page (your 550 and 720). To
> shrink the rect but keep it centered use...
>
> Call InsetRect (printRect,hDist%,vDist%)
>
> hDist% and vDist% are the amount you want to shrink your rect from it's
> original size.
>
> In you example I didn't see ystart defined anywhere but it looks like it
> should be zero so you should drop it and just use the 20 and 720. This
> might solve your problem right there but I suggest you use my approach as
> it will accommodate any size printer page. You can always change any param
> of printRect by doing printRect.top = 20.
>
> Hope this helps.
> Craig
>
> >How do you center a frame on a printed page.  I was using the following
> >but it doesn't seem to work on inkjet printers
> >
> >ph& = PRHANDLE
> >wd& = ph&..prInfo.rPage.right%
> >
> >xstart = (wd& - 550)/2'print
> >ROUTE _toPrinter
> >CALL PENSIZE(2,2)
> >CALL SETRECT(aRect,xstart,(20+ystart),(550+xstart) ,(720+ystart) )
> >CALL FRAMEROUNDRECT(aRect,16,16)
> >
> >
> >Martin
>
> ======================================================================
> Aztech Professional On-Site Service
>
> * Craig Hoyt
> * Phone: 818-773-0864   Fax: 818-773-0675
> * E-mail: craig@...
> * Web: http://www.aztech4mac.com
>
> Macintosh Technology Solutions Since 1984
> =======================================================================
>
> --
> To unsubscribe, send ANY message to <futurebasic-unsubscribe@...>