[Gambas-user] Image overlays
Benoit Minisini
gambas at ...1...
Fri Mar 17 12:18:25 CET 2006
On Friday 17 March 2006 11:02, GuruLounge - MailLists wrote:
> Well, I finally answered my own question on this one. Here's the
> solution I found:
>
> PUBLIC FUNCTION CreateLockedFileIcon(myIcon AS Picture) AS Picture
> DIM drawIcon AS picture
> DIM imgLocked AS image
> DIM wX AS Integer
> DIM wY AS Integer
>
> wX = myIcon.Width
> wY = myIcon.Height
>
> drawIcon = picture[Main.strImagePath & "locked-corner.png"]
> imgLocked = NEW Image(wX,wY)
That line is useless. Because the Stretch method returns a newly created image
- it calls 'NEW Image(wX, wY)' for you.
> imgLocked = drawIcon.Image.Stretch(wX,wY)
> drawIcon = NEW picture(wX,wY,TRUE)
> Draw.Begin(drawIcon)
> Draw.picture(myIcon,0,0)
> Draw.picture(imgLocked.Picture,0,0)
> Draw.End
>
> RETURN drawIcon
>
> END
>
> Take Care!
> Jeff
>
Regards,
--
Benoit Minisini
More information about the User
mailing list