Last modified: December 2013

URL: https://cxc.cfa.harvard.edu/chips/ahelp/move_frame.html
Jump to: Description · Examples · Bugs · See Also


AHELP for CIAO 4.11 ChIPS v1

move_frame

Context: frames

Synopsis

Moves the frame to a new location.

Syntax

move_frame(xval, yval)
move_frame(xval, yval, mode)
move_frame(id, xval, yval)
move_frame(id, xval, yval, mode)

Description

The function arguments.

Argument Description
xval, yval The x and y coordinates to move. The mode parameter determines whether these are relative or absolute. Unless explicitly specified by the coord_sys field of the optional ChipsId argument, the coordinate system used to create the object is used.
mode The position is in absolute coordinates (mode=0) or relative (mode=1). The default is absolute.
id A ChipsId structure identifying the item.

The move_frame command moves the frame to a new position. The new location may be specified as an absolute position (default) or as relative offsets from the original location. The move_frame command cannot specify (xval,yval) that moves the frame outside of the window.

The following coordinate systems may be used to move a frame: PIXEL or WINDOW_NORM. The system is specified by setting the coord_sys field of the optional ChipsId structure which may be passed into the move_frame routine. If a ChipsId is not provided, the window normalized coordinate system is used.

This command is equivalent to calling the move command with 'chips_frame' specified as the object.


Examples

Example 1

chips> move_frame(0.5, 0.5)

Move the current frame to (0.5, 0.5) in the coordinate system used to create it.

Example 2

chips> id = ChipsId()
chips> id.coord_sys = PIXEL
chips> move_frame(id, -20, 0, 1)

Adjust the position by 20 pixels to the left in the x direction. Do not move it in the y direction.


Bugs

See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.

See Also

frames
add_frame, arrange_frames, blink_frames, current_frame, delete_frame, display_frame, get_frame, hide_frame, next_frame, reposition_frame, set_frame, tile, view_placed_frame, view_single_frame
utilities
erase, get_object_count