[Gambas-user] Paint an image

ukimiku mkuyumcu at ...3233...
Sun Nov 24 20:10:09 CET 2013


Monsieur,

here is a demo project I uploaded:
Link: https://www.dropbox.com/s/aztacpsshfo3h4i/Fr002DrawImage.zip

Basically, click on "Load", and you are prompted for a binary PPM or PGM
file. The picture is then displayed. If you click on "Save", you can select
a new filename and save the picture in binary PPM format (a tremendous waste
of space for several reasons, but I am getting to know Gambas, and this is
my first project).

*The problem appears to be in*
   Public Sub fr_Draw()
     Paint.Begin(fr)
     fr.Clear
  
     Paint.brush = Paint.Image(img)
     Paint.Rectangle(0, 0, img.Width, img.Height)
     Paint.fill
  
     'Paint.DrawImage(img, 0, 0)              ' This does not work, for
whatever reason (bug?)
     fr.Cached = False
     paint.End
   End

When you un-comment "'Paint.DrawImage(img,0,0)"
(img is a class-global image) and comment the three lines above it
(Paint.brush....), The image is not drawn.

Thank you for looking into this.

Regards,
ukimiku



-----
Before you criticise someone, you should walk a mile in his shoes. Because, when you criticize then, and he gets angry, you'll be a mile away - and have his shoes.
--
View this message in context: http://gambas.8142.n7.nabble.com/Paint-an-image-tp44343p44355.html
Sent from the gambas-user mailing list archive at Nabble.com.




More information about the User mailing list