Go up one levelGo to Previous Go to Next

RtdImageColorRamp(n)

NAME

 
 RtdImageColorRamp - itcl widget used to display contents of the

NAMESPACE

 
 rtd

PARENT CLASS

 
 util::FrameWidget

SYNOPSIS

 
 RtdImageColorRamp <path> ?options?

DESCRIPTION

 
 This [incr Tk] widget class displays the colors in the colormap from
 left to right in a generated rtdimage. In addition, bindings are added
 to the colorramp to rotate, shift, stretch and squeeze the colormap by
 dragging the mouse pointer with a button pressed.


ITK COMPONENTS

 
 image
        RtdImage item used to display colors in colormap.

WIDGET OPTIONS

 
 -cursor
        Cursor for window.

 -height
        Height of colorramp (width is same as window).

 -shelp
        Help text displayed when mouse enters widget.

 -usexshm
        X shared memory option.

 -viewmaster
        "viewmaster" image. This is also updated when colorramp changes.
        This allows changes to be propagated, even if using a read-only
        visual. .

PUBLIC METHODS

 
 reset_colors {}
        Reset the colormap.

 update_colors {}
        Update the colorramp after the window has been resized or the
        number of colors has changed (need to delay to always get the
        correct size).

PROTECTED METHODS

 
 mark {pos}
        Mark the given position for later reference.

 mark_for_shift {pos}
        Mark the given position for later reference and set things up for
        a shift operation.  (The dummy rotate op causes an internal copy
        between cmap and itt
         that initializes the shift from the current itt.).

 rotate_colors {pos}
        Rotate the colormap by the difference between the given position
        and the position set with mark.

 save_cmap {}
        Called after a shift or scale operation is done (button up) to
        save the colormap state. We just do a null rotate here, since it
        does what we want. This prevents the colormap from reverting to
        the original state before each shift or scale operation. The
        reason it would revert is that otherwise colors shifted off to the
        left or right, for example, would be lost.

 scale_itt {pos}
        Scale the current ITT based on the difference between the given
        position and the position set with mark.

 shift_colors {pos}
        Shift the colormap by the difference between the given position
        and the position set with mark.

PROTECTED VARIABLES

 
 canvas_
        Canvas window containing ramp image.

 image_
        Internal rtdimage widget for colorramp.

 mark_
        Used to save a position for rotating the colormap.

SEE ALSO

 
 FrameWidget(n)

 


- - - - - -
Last change: 07 May 99

 


Go up one levelGo to Previous Go to Next

Please send questions or comments to abrighto@eso.org.
Copyright © 1998 ESO - European Southern Observatory