• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help! Having trouble animating translucent window.

 
Dan Bizman
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What I'm trying to do is have a small window that is over a Frame and is comes out of the right side of the frame and appears bit-by-bit as it moves to the left side. It will be a translucent (NOT transparent) window, so I'm using AlphaComposite (with a float of 0.2f). The problem is that when I draw the background and then each time draw a few more pixels of it as translucent (to simulate the window moving over it), the translucence gets less and less so until it's transparent! I don't know how to fix this.

Basically right now I'm using a Timer and doing something like:



But this doesn't work!
[ January 28, 2005: Message edited by: Dan Bizman ]
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

[ January 28, 2005: Message edited by: Craig Wood ]
 
Dan Bizman
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks! That's actually quite close to what I ended up doing, but definitely much nicer code. Thanks again!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic