This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
An off-topic question regarding basic Java Programming
#3
(11-24-2011, 11:03 AM)gid15 Wrote:
Code:
gd.setColor(new Color( red[counter],green[counter],blue[counter]));
          gd.drawLine(start.x, start.y, end.x, end.y);
Have you tried to also set the alpha value of the line's color?

Yes, I have...
Code:
gd.setColor(new Color( red[counter],green[counter],blue[counter], 255 ));
Using maximum alpha value 255 still no good. The color itself indeed will adjust to its own alpha value, but it is contained within the main panel / frame which has its own opacity. It the end, the opacity of line will be adjusted with the opacity of its container...
If we set the container's opacity to 0f, then no line will be showed...

P.S : my final objective is to get this line drawn in fully transparent background ^_^. The cursor image will act like a "laser pointer" used in presentations... so when the pointer is moved, we will have a line drawn to imitate a highlighter.
Reply


Messages In This Thread
RE: An off-topic question regarding basic Java Programming - by tr4nquility - 11-24-2011, 11:55 AM

Forum Jump:


Users browsing this thread: 3 Guest(s)