Re: Drawing 25 000 Shape fast



[post re-ordered]

"MTP" <mtp@xxxxxxxxxxxxxxx> wrote in message news:e95r4e$lkr$2@xxxxxxxxxxxxxxxxxxxxx
Andrey Kuznetsov a écrit :
i have to render 25 000 "points" with each one a specific fill color, and a specific Shape (java.awt.Shape or customized) in a JPanel.

Drawing every Shape, one by one, is too slow (panning the view ins't smooth). So i tried to create a BufferedImage for each point, and render them instead. But it is even slower.

Direct : 3 sec
BI: 4.5 sec

And all the BI take about 60 Mbytes of memory, which is a lot.

use one BufferedImage.
You need to draw your shapes to BI only if something changes.

I already use this. But it's unusable if one of these events happen:
- pan (let's say that i'm at Zoom Factor 2000)

Zoom factor 2000? So if an object was previous 1x1 pixel, it is now 2000x2000 pixels?

- zoom
- resize

What's the difference between zoom and resize, assuming vector (i.e. not raster) images?

- the user want to map column 3 instead of column 4 for colors OR size of the shape OR type of shape


I need to reach 0.1 sec by any mean. Right now i'm thinking to add some kind of Z-buffer but with aliasing it's pretty hard i think. Trying ideas take time so i'm asking if somebody can help me.

Have you considered using Java3D/OpenGL and taking advantage of the 3D accelerator to perform zoom and pan?

- Oliver

.



Relevant Pages

  • Re: Drawing 25 000 Shape fast
    ... - pan (let's say that i'm at Zoom Factor 2000) ... So if an object was previous 1x1 pixel, ... What's the difference between zoom and resize, assuming vector images? ... Have you considered using Java3D/OpenGL and taking advantage of the 3D accelerator to perform zoom and pan? ...
    (comp.lang.java.gui)
  • Re: NEW: Nikon Coolpix P90
    ... The readers of this NG might prefer to have 10X zoom, ... pixel count with my otherwise excellent 8MP Pana FZ30. ... card slot, extended shutter speed range, higher resolution EVF ... final selection chose two of those 1.2 MP shots. ...
    (rec.photo.digital)
  • Re: Slideshow with narration to VCD/DVD
    ... I like the new version of photo story. ... But I mainly use it to e-mail some pictures to my grandsons. ... do your zoom and pan slowly. ...
    (microsoft.public.windowsxp.photos)
  • Re: Browse Wright Brothers bike shop
    ... You can pan and zoom and go to the next room. ... It's not a normal video that runs for you as a movie. ... part of what you should see, a cluttered bike shop with a bike heading ...
    (rec.bicycles.tech)
  • Re: Finally got my videos working on my website
    ... I didn't do anything as far as pan and zoom go though I let the program work ... > cross-fade to a similarly framed alternate picture might flow ... > picture with a background. ...
    (microsoft.public.windowsxp.moviemaker)