Re: linewidth of box, docs for ScarlarType names, data point in the same pixels

m huang wrote:
> I would like to know how to change the line widths of
> the 2D box (the frame around the plot, it's perhaps not
> onlt a 2D plot question) and scales. GraphicsModeControl*
> has a method to change linewidth but it is only for the
> data lines. It seems me that VisAD

In the next release, the GraphicsModeControl.setLineWidth()
method will change line widths for the box and cursor. We'll
have to think about scales.

> I know there are some restrictions as what characters
> cannot be used in a name for ScalarType (white space,
> ".", etc) is documented officially.

The illegal characters are " ", ".", "(" and ")". Note
the ScalarType.alias() method allows applications to set
arbitrary alias Strings for displays.

> If I want to draw lines to connect a lot of data points
> sequentially according to the indix. A large number
> of the data points are so close to the following points
> that they actually fall in the same pixel. Does visAD (its
> DisplayRenderers, I guess) keep an array of device coordinates
> (in pixels) for all the points to be drawn, or only for those in
> different pixes?

No, VisAD displays are geomtery based. It leaves pixels to
graphics API rendering code and doesn't know about them in
general (except VisAD itself implements a rendering loop
for DisplayImplJ2D).

Culling lines based on pixel coincidence would require
retransform of data into depictions when users panned
and zoomed, which would be an unaceptable performance

> If it keep all the coordinates, does VisAD try to draw lines
> between dots in the same pixel?

In a DisplayImplJ3D, VisAD leaves this to Java3D.
In a DisplayImplJ2D, yes for the reason described above.

> Does VisAD use
>[], int[], int)
> to draw these lines?

In a DisplayImplJ3D, VisAD leaves this to Java3D.
In a DisplayImplJ2D, no. For width = 1 lines it uses:

  Graphics2D.draw(new Line2D.Float(...))

> If yes, does anyone know if awt actually try
> to draw all these lines? (this last question is not a VisAD
> question). If VisAD does not keep points of the same
> device coordinates, people who can expect drawing time to
> be somewhat proportional to plot size (i.e. thumbnails can
> be cheap to have in terms of memory and time consumption)

You can make thumbnails of image data [i.e., MathType ((x, y) -> value)]
by resampling and use those. You can make thumbnails of complex
data using DisplayImpl.getImage(). But as I described above,
dynamically culling lines based on pixel coincidence would be a
terrible performance hit for panning and zooming.