NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Helen- Helen Yi wrote:
Thanks, Tom. Is there a way to draw a circle interactively, that is, press and drag the mouse button to draw a circle or oval on the display? (Something like drawing a rubberband on a display )
You could use visad.bom.CurveManipulationRendererJ3D but that will not give a smooth curve like you have in most drawing programs. You could create your own subclass of CurveManipulationRenderer and override the drag_direct method combining the logic in RubberBandBoxRendererJ3D and CurveManipulationRendererJ3D to make a smooth circle based on the position of the cursor at any time. Basically, you would be updating the Gridded2DSet of points that make up the circle as the mouse is dragged. Don ************************************************************* Don Murray UCAR Unidata Program dmurray@xxxxxxxxxxxxxxxx P.O. Box 3000 (303) 497-8628 Boulder, CO 80307 http://www.unidata.ucar.edu/staff/donm *************************************************************
visad
archives: