Re: [Pipmak-Devel] Problems/bugs with patch images
Status: Alpha
Brought to you by:
cwalther
From: Christian W. <cwa...@gm...> - 2008-01-04 20:29:42
|
Andrea Viarengo wrote: > 2) I would like to create a transparent hole (alpha=0) in a png image, I > need this for doors and windows, so I have operated in this manner: > > img=pipmak.loadimage(texture.."/front.png") > w,h=img:size() > img:color(0,0,0,0) > img:fill(w/3,h/3,w/3,2*h/3) > > but I get only a black shape and not a transparent hole: this is a bug? image:fill() doesn't add an alpha channel to an image that doesn't already have one. Whether that's a bug or not is debatable, it's certainly a limitation that needs to be documented at least. Fixing it is probably going to be non-trivial. Depending on how we decide to solve the loadimage-returns-existing-object problem, it may go away entirely. Thanks for finding this! -Christian |