Go up one levelGo to Previous Go to Next

RtdImagePan(n)

NAME

 
 RtdImagePan - itcl widget managing the RtdImage panning window

NAMESPACE

 
 rtd

PARENT CLASS

 
 util::FrameWidget

SYNOPSIS

 
 RtdImagePan <path> ?options?

DESCRIPTION

 
 This widget displays a "view" of another RtdImage widget at a smaller
 magnification, so that the entire image is visible in a small window. A
 rectangle displayed over the image can be used to pan or move the image
 when the target image is to large to be viewed at all at once in its
 window. The rectangle is always notified of changes in the target image
 or its window, so it always displays the relative size of the visible
 image to the entire image. The pan window is based on the rtdimage
 "pan" subcommand and uses canvas graphics to display the rectangle.

 Since it is not known ahead of time how large or small an image will
 be, the pan window is given a maximum size when created. When an image
 is loaded, it shrinks the image by equal integer factors until it fits
 in the window. Then it fits the window around the image, so as not to
 leave a blank (black) space around it. Rotated and flipped images are
 also displayed as rotated and flipped in the pan window. Only the scale
 factor remains fixed.


ITK COMPONENTS

 
 image
        RtdImage(n) widget for displaying a copy of the image.

STANDARD OPTIONS

 
 -cursor -height -subsample -verbose -width -zoomwin

WIDGET OPTIONS

 
 -cursor
        Default cursor.

 -height
        Height of pan frame.

 -shelp
        Help text displayed when mouse enters widget.

 -subsample
        Flag: if true, pan image is "subsampled" when shrinking, otherwise
        the pixels are averaged.

 -target_image
        Target RtdImage (itcl widget).

 -usexshm
        X shared memory option.

 -usexsync
        X synchronisation option.

 -verbose
        Flag: if true, print diagnostic messages.

 -width
        Width of pan frame.

 -zoomwin
        Zoom window to update.

PUBLIC METHODS

 
 init_panning {}
        Initialize the pan window after a new image has been loaded and
        arrange to be notified of changes in the position and size of the
        visible image.

 notify_cmd {op}
        This method is called when the user moves or resizes the panning
        rect.  op is set to "resize" or "move" (resize not currently
        supported).

 stop_panning {}
        Stop the panning callback.

PROTECTED METHODS

 
 draw_compass {}
        Draw an ra,dec compass indicating N and E by following lines along
        ra and dec near the center of the image.

 pan {x1 y1 x2 y2 changed}
        Update the panner rectangle to display the current position and
        size of the target image x1 y1 x2 y2 give the visible portion of
        the image if "changed" is 1, there is a new image with pos.
        different dimensions.

PROTECTED VARIABLES

 
 canvas_
        Canvas for panning image.

 compassfont_
        Compass label fonts.

 draw_
        Name of CanvasDraw widget for image.

 image_
        Panning image.

 marker_
        Canvas id of a second rectangle used to mark old position.

 panFactor_
        Amount panning image was shrunk (=2 = 1/2, -4 = 1/4, ...).

 panImageHeight_
        Height of the panning image, after shrinking.

 panImageWidth_
        Width of the panning image, after shrinking.

 panner_
        Canvas id of the panning rectangle.

 pi_
        Const PI.

 target_canvas_
        Target image's canvas window.

 target_image_
        Internal target image being panned (rtdimage) .

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