Hi,
Probably you can try to use different compositions
depending on what color is used for fillOval, but it will be a mess…
Consider to use different layers for rendering
lines and nodes.
Dmitry.
From: Discussion list
for Java 2D API [mailto:[EMAIL PROTECTED] On Behalf Of Thanasis (Hotmail)
Sent: March 27, 2006 1:12 PM
To: [EMAIL PROTECTED]
Subject: [JAVA2D] getting pixel
color information from a rectangle inside a Panel
Hi to everyone,
i have built a graphics application using only AWT.
Inside a Panel i illustrate a graph which has a number of nodes and arcs
(i have drawn THE GRAPH using g.fillOval and g.drawLine methods).
What i want to achieve is to move a red node (circle) from one point P1 inside
the
Panel to another Point P2.
I have done it as follows:
...
while (P1!=P2){
draw the node in red color(fillOval)
delay(100ms)
draw the node in white color(fillOval)
move P1
}
The problem is that as the node is moving it ERASES any previous pixels
lying below it.
Is there any way to get the color of these pixels that lie below the moving
node
and DRAW IT ONLY if those pixels are white?
Thanks in advance
Thanasis
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help". |