[Gambas-user] painting graph to image continuously

Benoît Minisini gambas at ...1...
Wed Dec 15 16:34:38 CET 2010


> Benoit,
> thank you,
> but how to paint the background of the new part first ?
> wally  :)
> 
> this works :          ... but isn't there a smarter way ?
> 
> 
> If t > myImage1.W Then
>       myImage1.Resize(myImage1.w + 1, myImage1.H)
> 
>       Paint.Begin(myImage1)
>         Paint.Brush = Paint.Color(Color.RGB(255, 255, 223))
>         Paint.Rectangle(myImage1.W - 1, 0, 1, myImage1.H)
>         Paint.Fill
>       Paint.End
> 
>       PictureBox1.w += 1
> 
>     Endif
> 

Use Draw instead of Paint for that: Paint integer coordinates lead to 
fractional pixels, not Draw. And so Draw will be faster.

-- 
Benoît Minisini




More information about the User mailing list