Results 1 to 2 of 2
  1. #1
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default 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!

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,298
    Rep Power
    20

    Default 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)

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. green channel extraction
    By sarah49 in forum Java 2D
    Replies: 1
    Last Post: 01-27-2012, 11:14 AM
  2. Sprites - My Game (Sort of)
    By David M. in forum Java 2D
    Replies: 2
    Last Post: 04-25-2011, 11:00 PM
  3. Need Support for Using Network service providers channel to carry speech
    By Nagasubramanian in forum Sun Java Wireless Toolkit
    Replies: 0
    Last Post: 02-13-2009, 12:10 PM
  4. Help with Java IRC Chat Channel
    By sari in forum New To Java
    Replies: 1
    Last Post: 02-03-2009, 07:21 AM
  5. Replies: 0
    Last Post: 06-28-2008, 09:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •