Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Graphics2D: create a visible line, read on

 
Vinicius Souza
Ranch Hand
Posts: 70
1
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Im creating an app where I need that a rectangle be visible all the time over the background. So I created this:

But in this example the rectangle is draw using white color. How can I do something like a xor that react with the background color to make this rectangle visible with any background?
Thanks in advance!
 
Darryl Burke
Bartender
Posts: 5132
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
setXORMode(...)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic