Herror ::move_rectangle (
    const HTuple &WindowHandle,
    const HTuple &Row1,
    const HTuple &Column1,
    const HTuple &Row2,
    const HTuple &Column2,
    const HTuple &DestRow,
    const HTuple &DestColumn
)
void HWindow::MoveRectangle (
    const HTuple &Row1,
    const HTuple &Column1,
    const HTuple &Row2,
    const HTuple &Column2,
    const HTuple &DestRow,
    const HTuple &DestColumn
) const

Copy inside an output window.

::move_rectangle copies all entries in the rectangle (Row1,Column1), (Row2,Column2) of the output window to a new position inside the same window. This position is determined by the upper left corner (DestRow, DestColumn). Regions of the window, which are "uncovered" through moving the rectangle, are set to the color of the background.

If you want to move several rectangles at once, you may pass parameters in form of tupels.


Parameters

WindowHandle (input_control)
window -> HTuple.long
Window identifier.

Row1 (input_control)
rectangle.origin.y(-array) -> HTuple.long
Row index of upper left corner of the source rectangle.
Default value: 0
Typical range of values: 0 <= Row1 <= 511 (lin)
Minimum increment: 1
Recommended increment: 1

Column1 (input_control)
rectangle.origin.x(-array) -> HTuple.long
Column index of upper left corner of the source rectangle.
Default value: 0
Typical range of values: 0 <= Column1 <= 511 (lin)
Minimum increment: 1
Recommended increment: 1

Row2 (input_control)
rectangle.corner.y(-array) -> HTuple.long
Row index of lower right corner of the source rectangle.
Default value: 64
Typical range of values: 0 <= Row2 <= 511 (lin)
Minimum increment: 1
Recommended increment: 1

Column2 (input_control)
rectangle.corner.x(-array) -> HTuple.long
Column index of lower right corner of the source rectangle.
Default value: 64
Typical range of values: 0 <= Column2 <= 511 (lin)
Minimum increment: 1
Recommended increment: 1

DestRow (input_control)
point.y(-array) -> HTuple.long
Row index of upper left corner of the target position.
Default value: 64
Typical range of values: 0 <= DestRow <= 511 (lin)
Minimum increment: 1
Recommended increment: 1

DestColumn (input_control)
point.x(-array) -> HTuple.long
Column index of upper left corner of the target position.
Default value: 64
Typical range of values: 0 <= DestColumn <= 511 (lin)
Minimum increment: 1
Recommended increment: 1


Example
/* "Interactiv" copy of a rectangle in the same window */
draw_rectangle1(WindowHandle,&L1,&C1,&L2,&C2) ;
get_mbutton(WindowHandle,LN,CN,_) ;  
move_rectangle(WindowHandle,L1,C1,L2,C2,LN,CN) ;

Result

If the window is valid and the specified parameters are correct ::move_rectangle returns H_MSG_TRUE. If necessary an exception handling is raised.


Possible Predecessors

::open_window, ::open_textwindow


Alternatives

::copy_rectangle


See also

::open_window, ::open_textwindow


Module

System



Copyright © 1996-2002 MVTec Software GmbH