Herror ::disp_rectangle2 (
    const HTuple &WindowHandle,
    const HTuple &CenterRow,
    const HTuple &CenterCol,
    const HTuple &Phi,
    const HTuple &Length1,
    const HTuple &Length2
)
void HWindow::DispRectangle2 (
    const HTuple &CenterRow,
    const HTuple &CenterCol,
    const HTuple &Phi,
    const HTuple &Length1,
    const HTuple &Length2
) const

Displays arbitrarily oriented rectangles.

::disp_rectangle2 draws one or several arbitrarily oriented rectangles in the output window. A rectangle is described by the center (CenterRow,CenterCol), the orientation Phi (in radians) and half the lengths of the edges Length1 and Length2. The procedures used to control the display of regions (e.g. ::set_draw, ::set_gray, ::set_draw) can also be used with rectangles. Several rectangles can be displayed with one call by using tuple parameters. For the use of colors with several rectangles, see ::set_color.


Attention

The center must lie within the window boundaries.


Parameters

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

CenterRow (input_control)
rectangle2.center.y(-array) -> HTuple.double / long
Row index of the center.
Default value: 48
Suggested values: 0, 64, 128, 256, 511
Typical range of values: 0 <= CenterRow <= 511 (lin)
Minimum increment: 1
Recommended increment: 10

CenterCol (input_control)
rectangle2.center.x(-array) -> HTuple.double / long
Column index of the center.
Default value: 64
Suggested values: 0, 64, 128, 256, 511
Typical range of values: 0 <= CenterCol <= 511 (lin)
Minimum increment: 1
Recommended increment: 10

Phi (input_control)
rectangle2.angle.rad(-array) -> HTuple.double / long
Orientation of rectangle in radians.
Default value: 0.0
Suggested values: 0.0, 0.785398, 1.570796, 3.1415926, 6.283185
Typical range of values: 0.0 <= Phi <= 6.283185 (lin)
Minimum increment: 0.01
Recommended increment: 0.1

Length1 (input_control)
rectangle2.hwidth(-array) -> HTuple.double / long
Half of the length of the longer side.
Default value: 48
Suggested values: 0, 64, 128, 256, 511
Typical range of values: 0 <= Length1 <= 511 (lin)
Minimum increment: 1
Recommended increment: 10

Length2 (input_control)
rectangle2.hheight(-array) -> HTuple.double / long
Half of the length of the shorter side.
Default value: 32
Suggested values: 0, 64, 128, 256, 511
Typical range of values: 0 <= Length2 <= 511 (lin)
Minimum increment: 1
Recommended increment: 10
Restriction: Length2 < Length1


Example
set_color(WindowHandle,"green") ;
draw_region(&MyRegion,WindowHandle) ;
elliptic_axis(MyRegion,&Ra,&Rb,&Phi) ;
area_center(MyRegion,_,&Row,&Column) ;
disp_gen_rectangle2(WindowHandle,Row,Column,Phi,Ra,Rb) ;

Result

::disp_rectangle2 returns H_MSG_TRUE, if the parameters are correct. Otherwise an exception handling is raised.


Possible Predecessors

::open_window, ::set_rgb, ::set_lut, ::set_hsi, ::set_draw, ::set_color, ::set_colored, ::set_line_width


Alternatives

::disp_region, ::gen_rectangle2, ::disp_rectangle1, ::set_shape


See also

::open_window, ::open_textwindow, ::disp_region, ::set_color, ::set_draw, ::set_line_width


Module

System



Copyright © 1996-2002 MVTec Software GmbH