Results 1 to 2 of 2
- 02-18-2012, 08:52 PM #1
Drawing monochrome/alpha channel sprites in different colors
Say I have one BufferedImage that is my canvas, and another BufferedImage that is a sprite sheet. I understand how to draw part of the sprite sheet onto the canvas. But I can't figure out how to draw the sprites in different colors, using the sprite sheet as an alpha mask.
Any pointers?Get in the habit of using standard Java naming conventions!
- 02-18-2012, 09:47 PM #2
Re: Drawing monochrome/alpha channel sprites in different colors
Would Graphics#setColor(...) followed by Graphics#setXORMode() do it?
If you can use JavaFX, it has Effects for this kind of stuff (javafx.scene.effect.ColorAdjust)
dbIf you're forever cleaning cobwebs, it's time to get rid of the spiders.
- By sarah49 in forum Java 2DReplies: 1Last Post: 01-27-2012, 12:14 PM
- By David M. in forum Java 2DReplies: 2Last Post: 04-26-2011, 12:00 AM
- By Nagasubramanian in forum Sun Java Wireless ToolkitReplies: 0Last Post: 02-13-2009, 01:10 PM
- By sari in forum New To JavaReplies: 1Last Post: 02-03-2009, 08:21 AM
- By Java Tip in forum SWTReplies: 0Last Post: 06-28-2008, 10:29 PM