Jump to content

DrawImage multiple times not transparent


Rick
 Share

Recommended Posts

I have an image of a heart (for player life). I draw 3 of them. The first one is transparent in the right places, but the other 2 are not. Not sure why.

 

// loading the heart in App:Start()
self.heartImage = Texture:Load("UI/heart_64.tex")

 

 

// drawing in App:Loop()
self.context:SetBlendMode(Blend.Alpha)
x = 0
for i = 0, self.heartCount - 1 do
self.context:DrawImage(self.heartImage, x, 35)
x = x + self.heartImage:GetWidth()
end

self.context:SetBlendMode(Blend.Solid)

--Refresh the screen
self.context:Sync(true)

 

On my Samsung tablet it's displayed correctly though, so seems like a PC thing.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...