[Gambas-user] Paint an image
Michael Kuyumcu
mkuyumcu at ...3233...
Sun Nov 24 13:28:20 CET 2013
Dear list members,
in my program I seemingly cannot get an image to be painted.
I have a DrawingArea called "fr".
In memory I keep an image named "img".
In my form code, I declare
public img as image
In the Form_Open handler, I instantiate "img" with
img = New Image(fr.Width, fr.Height)
In some other code that is then run, I fill the x/y pixels of "img" with
integer values
img[x,y] = < some integer >
Then I issue a "fr.Refresh" command, hoping "fr" would display
> Public Sub fr_Draw()
> Paint.Begin(fr)
> fr.Cached = True
> fr.Background = Color.RGB(100, 140, 180)
>
> Paint.Image(img, 0, 0) ???
>
> paint.End
>
> End
In the line containing the "???", I have tried many variations of code
to make "img" appear in the "fr" DrawingArea, all without success.
The background color, however, is displayed correctly.
What do I have to write in place of "???" to make "img" display?
Thank you.
Regards,
ukimiku
More information about the User
mailing list