[Gambas-user] Image overlays

GuruLounge - MailLists maillists at ...1367...
Fri Mar 17 11:02:15 CET 2006


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)
  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



On Mon, 2006-03-06 at 18:45 -0800, GuruLounge - MailLists wrote:
> Hi,
> 
> Does anyone have an idea how I might be able to overlay one image on top
> of another in a picture object?
> 
> I have a lot of icons in my project and I need to be able to mark an
> icon as locked or not in a treeview control.  Creating a "locked" icon
> for every item wouldn't work for this particular project.
> 
> Thanx,
> Jeff
> 
-- 

     .^.
     /V\
    /( )\
    ^^-^^
Linux Advocate





More information about the User mailing list