drawing alpha png on canvas

Im drawing a png with alpha channel on a canvas with g.drawpicture

It randers the alpha channel as a black pixel, Does anyone know how to make it use the alpha channel from the png?

Dave

What does your code look like?

Post a sample project, there’s a bunch of questions.

You’re running Windows ?

What is the kind of the original image file (jpg ?)

A screenshots for the result would be helpful too.

I don’t see an issue there, please post the code you use to create the sprites array.
Please encase it with [code] tags (you can select all of your code and then click the button)

[quote=268225:@dave duke]the actual draw line is
g.DrawPicture(sprites(i).Spritesheet, sprites(i).x, sprites(i).y, sprites(i).Spritesheet.width, sprites(i).Spritesheet.Height)

The spritesheet is a picture object with a .png (with transparency)

I get a black square around everything that is drawn.[/quote]

How do you want anybody to help with so little details ? Emile asked which system you run. Windows ? Mac ? Linux ?

Actually a small project demonstrating the issue would be best. Sam Rowlands already suggested on the third post 5 days ago. What is holding you ?

Unfortunately, your code does not suffice to explain what is going on. At a minimum, what is needed is :

  • Platform : Windows, Mac, Linux. This important.
  • Xojo Version
  • The sprite sheet
  • The code that displays it in Canvas

Best wishes for your health.

Thanks. Now what is needed to experiment and confirm the issue or find a workaround is the sprite sheet itself.