Archived

This topic is now archived and is closed to further replies.

DeVore

[java] Transparent blitting in java - How?

Recommended Posts

Hi, How do you blit images in java using a transparent colour. I want to write a game where there isn''t a black box around my game objects like the player etc... Cheers, DeVore

Share this post


Link to post
Share on other sites
transparant gif colours work for me else you''d need to get @ the image source (i''d use the PixelGrabber class), parse it to int[][] (int[] is better, but the maths harder), and use logic to mask out the colour.

Share this post


Link to post
Share on other sites
There are examples of both transparent blitting and blitting using alpha blends (translucent rather than transparent) on the FAQ (for situations where transparent GIF''s are not an option).

Just search for ''transparent''.

(That is of course assuming you can get to the FAQ, which depends on the mood of my ISP).

http://games.cpbinc.com/faq

Share this post


Link to post
Share on other sites