Right - there's no API for drawing points explicitly.  We could add
something
like this as a convenience in some future release, but in the meantime
it should be a pretty easy constraint to work around.

You don't need to "create" rects or anything else; you just need to
draw a one-pixel rect or line to do what you want.

if you have a point (x, y), drawing a pixel at that point should be as
easy as:
   Graphics.drawLine(x, y, x, y);
or
   Graphics.drawRect(x, y, 0, 0);
or
   Graphics.fillRect(x, y, 1, 1);


Chet.


Gregory Pierce wrote:

While running some tests on a program that generates a dataset of
(x,y) pairs I decided that I would render them so I could see how the
data was distributed visually. Almost immediately I ran across an
interesting limitation:

"Except for Point2D and Dimension2D, each of the geometry classes
(geometries) implements the Shape interface, which provides a common
set of methods for describing and inspecting two-dimensional geometric
objects."

No biggie, I thought, I guess they aren't really 'shapes' so I'll just
draw them using Graphics2D. Hmmm... wait there is no method in
Graphics2D to draw them either. Ugh, that means I have to create one
pixel sized rectangles to draw points?

===========================================================================
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".

Reply via email to