• Post Reply Bookmark Topic Watch Topic
  • New Topic

Plotting points

 
colin shuker
Ranch Hand
Posts: 750
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, using a Graphics object, or Graphics2D object, I want to know how to plot a point(pixel) at (x,y).

Currently, I'm using g.drawLine(x,y,x,y), but the images I'm creating contain 1000's or hundreds of 1000's of points, and I feel using a line to plot a point is wasteful regarding performance.

Is there a simpler way? Like g.plot(x,y), I checked API and there isn't, but surely there is a better way to plot a point than using drawLine(..)

Thanks for any help.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There isn't. Using drawLine is fine.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!