Skip to main content
gamedev.net
🔒 Locked

[java] drawing image??

Started by role 2 replies 300+ views
Original Post
role
role
i create a map editor. and now i''m in progress in making selection tools but i stuck in drawing the selected image different from the others? for example i pick a fence object, and i want the fence object drawn red or transparent. is anyone know how to draw image in one color? or make the image transparent? or whatever to change the image into something different from the other thanxx
jermz
jermz
I would create several images if I were you. After loading the fence image from disk or whatnot, create a second image using MemoryImageSource and PixelGrabber and modify the color and alpha bits to achieve the look you want.

You could also make it easier on yourself by creating a MediaManager class to handle automatic conversion and tracking of your images by use of flags for loading/getting handles/etc.

This is pre-java 1.4 stuff. I think a whole slew of new image processing capabilities were added but I stopped paying attention
role
role
thanx guys..
i have solved this problem
i''m using composite for this

thank you

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.