> > >   
> > >   'Set scale
> > >   wFactor = prtPrinter.PaperWidth / Paint.Width
> > >   hFactor = prtPrinter.PaperHeight / Paint.Height
> > >   Paint.Scale(wFactor, hFactor)
> > >   

I'm stupid, the scale factors must be inverted!

        wFactor = Paint.Width / prtPrinter.PaperWidth
        hFactor = Paint.Height / prtPrinter.PaperHeight
        Paint.Scale(wFactor, hFactor)

And prtPrinter.FullPage must be set to TRUE before calling prtPrinter.Print. 
Otherwise, Paint.Width and Paint.Height will take the margins into account.

-- 
Benoît Minisini

------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to