Re: How to draw a circle ?


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 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 Murray                               UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx                        P.O. Box 3000
(303) 497-8628                              Boulder, CO 80307

  • 2002 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: