Name
copy_rectanglecopy_rectangleCopyRectangleCopyRectangle — Copy all pixels within rectangles between output windows.
Herror copy_rectangle(const Hlong WindowHandleSource, const Hlong WindowHandleDestination, const Hlong Row1, const Hlong Column1, const Hlong Row2, const Hlong Column2, const Hlong DestRow, const Hlong DestColumn)
Herror T_copy_rectangle(const Htuple WindowHandleSource, const Htuple WindowHandleDestination, const Htuple Row1, const Htuple Column1, const Htuple Row2, const Htuple Column2, const Htuple DestRow, const Htuple DestColumn)
void CopyRectangle(const HTuple& WindowHandleSource, const HTuple& WindowHandleDestination, const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2, const HTuple& DestRow, const HTuple& DestColumn)
void HWindow::CopyRectangle(const HWindow& WindowHandleDestination, const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2, const HTuple& DestRow, const HTuple& DestColumn) const
void HWindow::CopyRectangle(const HWindow& WindowHandleDestination, Hlong Row1, Hlong Column1, Hlong Row2, Hlong Column2, Hlong DestRow, Hlong DestColumn) const
static void HOperatorSet.CopyRectangle(HTuple windowHandleSource, HTuple windowHandleDestination, HTuple row1, HTuple column1, HTuple row2, HTuple column2, HTuple destRow, HTuple destColumn)
void HWindow.CopyRectangle(HWindow windowHandleDestination, HTuple row1, HTuple column1, HTuple row2, HTuple column2, HTuple destRow, HTuple destColumn)
void HWindow.CopyRectangle(HWindow windowHandleDestination, int row1, int column1, int row2, int column2, int destRow, int destColumn)
copy_rectanglecopy_rectangleCopyRectangleCopyRectangleCopyRectangle copies all pixels from the window
WindowHandleSourceWindowHandleSourceWindowHandleSourceWindowHandleSourcewindowHandleSource in the
window
WindowHandleDestinationWindowHandleDestinationWindowHandleDestinationWindowHandleDestinationwindowHandleDestination. It copies pixels which reside
inside a rectangle which is specified by parameters Row1Row1Row1Row1row1,
Column1Column1Column1Column1column1, Row2Row2Row2Row2row2 and Column2Column2Column2Column2column2. The target
position is specified through the upper left corner of the rectangle
(DestRowDestRowDestRowDestRowdestRow, DestColumnDestColumnDestColumnDestColumndestColumn).
If you want to move more than one rectangle, you may pass them at
once (in form of the tuple mode).
You may use copy_rectanglecopy_rectangleCopyRectangleCopyRectangleCopyRectangle to copy edited graphics from an
“invisible” window in a visible window. Therefore a window with
the option 'buffer' is opened. The graphics is then displayed in
this window and is copied in a visible window afterwards. The
advantage of this strategy is, that copy_rectanglecopy_rectangleCopyRectangleCopyRectangleCopyRectangle is much
more rapid than output operators as, e.g., disp_channeldisp_channelDispChannelDispChannelDispChannel. This
means a particular advantage while using demo programs. You could
even realize short “clips”: you have to create for every image of
a sequence a window of a 'buffer' type and pass the data into
it. Output is the image sequence whereat all buffers are copied one
after another in a visible window.
Both windows have to reside on the same display.
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Destination window handle.
Row index of upper left corner in the source window.
Default value: 0
Typical range of values: 0
≤
Row1
Row1
Row1
Row1
row1
≤
511 (lin)
Minimum increment: 1
Recommended increment: 1
Column index of upper left corner in the source window.
Default value: 0
Typical range of values: 0
≤
Column1
Column1
Column1
Column1
column1
≤
511 (lin)
Minimum increment: 1
Recommended increment: 1
Row index of lower right corner in the source window.
Default value: 128
Typical range of values: 0
≤
Row2
Row2
Row2
Row2
row2
≤
511 (lin)
Minimum increment: 1
Recommended increment: 1
Restriction: Row2 >= Row1
Column index of lower right corner in the source window.
Default value: 128
Typical range of values: 0
≤
Column2
Column2
Column2
Column2
column2
≤
511 (lin)
Minimum increment: 1
Recommended increment: 1
Restriction: Column2 >= Column1
Row index of upper left corner in the target window.
Default value: 0
Typical range of values: 0
≤
DestRow
DestRow
DestRow
DestRow
destRow
≤
511 (lin)
Minimum increment: 1
Recommended increment: 1
Column index of upper left corner in the target window.
Default value: 0
Typical range of values: 0
≤
DestColumn
DestColumn
DestColumn
DestColumn
destColumn
≤
511 (lin)
Minimum increment: 1
Recommended increment: 1
read_image(Image,'monkey')
open_window(0,0,-1,-1,'root','buffer','',WindowHandleBuffer)
disp_obj(Image,WindowHandleBuffer)
dev_open_window (0, 0, 512, 512, 'black', WindowHandle)
draw_rectangle1 (WindowHandle, Row1, Column1, Row2, Column2)
copy_rectangle(WindowHandleBuffer,WindowHandle,\
Row1, Column1, Row2, Column2,Row1,Column1)
close_window(WindowHandleBuffer)
read_image(Image,"monkey") ;
open_window(0,0,-1,-1,"root","buffer","",&WindowHandle) ;
disp_image(Image,WindowHandle) ;
open_window(0,0,-1,-1,"root","visible","",&WindowHandleDestination) ;
do {
get_mbutton(WindowHandleDestination,&Row,&Column,&Button) ;
copy_rectangle(BufferID,WindowHandleDestination,90,120,390,Row,Column) ;
}
while(Button > 1) ;
close_window(WindowHandleDestination) ;
close_window(WindowHandle) ;
clear_obj(Image) ;
read_image(Image,'monkey')
open_window(0,0,-1,-1,'root','buffer','',WindowHandleBuffer)
disp_obj(Image,WindowHandleBuffer)
dev_open_window (0, 0, 512, 512, 'black', WindowHandle)
draw_rectangle1 (WindowHandle, Row1, Column1, Row2, Column2)
copy_rectangle(WindowHandleBuffer,WindowHandle,\
Row1, Column1, Row2, Column2,Row1,Column1)
close_window(WindowHandleBuffer)
read_image(Image,'monkey')
open_window(0,0,-1,-1,'root','buffer','',WindowHandleBuffer)
disp_obj(Image,WindowHandleBuffer)
dev_open_window (0, 0, 512, 512, 'black', WindowHandle)
draw_rectangle1 (WindowHandle, Row1, Column1, Row2, Column2)
copy_rectangle(WindowHandleBuffer,WindowHandle,\
Row1, Column1, Row2, Column2,Row1,Column1)
close_window(WindowHandleBuffer)
read_image(Image,'monkey')
open_window(0,0,-1,-1,'root','buffer','',WindowHandleBuffer)
disp_obj(Image,WindowHandleBuffer)
dev_open_window (0, 0, 512, 512, 'black', WindowHandle)
draw_rectangle1 (WindowHandle, Row1, Column1, Row2, Column2)
copy_rectangle(WindowHandleBuffer,WindowHandle,\
Row1, Column1, Row2, Column2,Row1,Column1)
close_window(WindowHandleBuffer)
If the output window is valid and if the specified parameters are correct
close_windowclose_windowCloseWindowCloseWindowCloseWindow returns 2 (H_MSG_TRUE).
If necessary an exception is raised.
open_windowopen_windowOpenWindowOpenWindowOpenWindow
close_windowclose_windowCloseWindowCloseWindowCloseWindow
move_rectanglemove_rectangleMoveRectangleMoveRectangleMoveRectangle,
slide_imageslide_imageSlideImageSlideImageSlideImage
open_windowopen_windowOpenWindowOpenWindowOpenWindow
Foundation