Go Back   CodingForums.com > :: Server side development > Java and JSP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-22-2009, 02:52 AM   PM User | #1
ShaneC
Codeasaurus Rex


 
Join Date: Jun 2008
Location: Redmond, WA
Posts: 659
Thanks: 31
Thanked 100 Times in 94 Posts
ShaneC is on a distinguished road
Recolor imported images

Heya,

I'm currently working on an RPG-style game whereby the player uses a menu system to interact with the environment.

I have created an image-based font (so that I am not bound by the default Windows fonts) and would like to be able to have it multiple colors.

Each image is imported as such:
ImageDatabase[i] = getImage(getCodeBase(),"images/rfont" + Integer.toString(i) + ".png");
(Where public static Image[] ImageDatabase;)

I would like to know if there is a way to allow for me to recolor the imported images. (They are all a solid white.) I'm almost certain it could be done but I'm not quite sure how to approach it. I have tried XOR Mode, which has the ability to do what I want with it, but when the rendered images overlap, they become inverted (i.e. XOR) which is very undesirable.

Any suggestions?
__________________
Unless otherwise stated, any code posted is most likely untested and may contain syntax errors.
My posts, comments, code, and suggestions reflect only my personal views.
Web Portfolio and Code Snippets: http://shanechism.com
ShaneC is offline   Reply With Quote
Users who have thanked ShaneC for this post:
sereoga92 (03-30-2009)
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:42 AM.


Advertisement
Log in to turn off these ads.