[Gambas-user] Drawing

Christian Faure christian.faurebouvard at ...357...
Sat Apr 22 23:50:15 CEST 2006


El Viernes 21 Abril 2006 09:48, javier romero escribió:
> PUBLIC p1 AS Drawing
> PUBLIC pag AS DrawingArea
>
> PUBLIC SUB _new()
>     p1 = NEW Drawing
>     draw.Begin(p1)
>       draw.Text("Hello", 0, 0)
>     draw.End
>
> END
>
> PUBLIC SUB Form_Open()
>
> pag = NEW DrawingArea(sv1)
>    
>   pag.Cached = TRUE
>   pag.Clear
>   pag.BackColor = color.White
>   pag.Width = printer.Width
>   pag.Height = printer.Height
>   pag.Border = 1
>   draw.Begin(pag)
>     draw.Drawing(p1, 0, 0)
>   draw.End
> ' This works OK
>   pag.Visible = TRUE
>  
> END
>
> PUBLIC SUB Button1_Click()
>    
>   draw.Begin(printer)
>     draw.drawing(p1,0,0, pag.Width, pag.Height)
>   draw.End
> ' This doesn't works
> END

Hi Javier,

Some printers can't print in (0,0)
Try
 draw.drawing(p1, 350, 350)

it work, but very small, need to be scaled.

Regards,
Christian 




More information about the User mailing list