[Gambas-user] Gambas3 Printing

Michael mdavies5 at ...169...
Sat Dec 4 07:13:05 CET 2010


Thanks Fabien,
I am getting there slowly. Can print in a small test app but in a real 
world app I just get blank pages. One of the problems I overcame was the 
different units used by the printer and Paint routines. In Gambas2 the 
printer and Draw objects both used pixels. Now we seem to have a mixture 
of pixels and mm so a lot of conversion is necessary.
I'll keep trying. SHould I call .Fill after every .Text or should I call 
.Fill only after all the text has been written?
Regards
Michael

On 04/12/10 01:19, Fabien Bodard wrote:
> Private hPrint As New Printer As "Printer"
> Public Sub Form_Open()
>
>    If Not hPrint.Configure() Then
>      hPrint.Print
>
>    Endif
>
> End
>
>
> Public Sub Printer_Begin()
>
>    hPrint.Count = 1
>
> End
>
>
> Public Sub Printer_Draw()
>    Paint.Font.Size = 12
>
>    Paint.Text("Hello", 30, 50)
>    Paint.fill
> End
>
> Public Sub Printer_End()
>
>
>
>
> End
>
>
>
> Tou need to learn more about the paint class :)
>
> first create a path and then draw around or fill it (stroke/fill)
>
> look at the paint example
>
> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App&  Earn a Chance To Win $500!
> Tap into the largest installed PC base&  get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
>



More information about the User mailing list