Herror ::disp_ellipse (
    const HTuple &WindowHandle,
    const HTuple &CenterRow,
    const HTuple &CenterCol,
    const HTuple &Phi,
    const HTuple &Radius1,
    const HTuple &Radius2
)
void HWindow::DispEllipse (
    const HTuple &CenterRow,
    const HTuple &CenterCol,
    const HTuple &Phi,
    const HTuple &Radius1,
    const HTuple &Radius2
) const

Displays ellipses.

::disp_ellipse displays one or several ellipses in the output window. An ellipse is described by the center (CenterRow, CenterCol), the orientation Phi (in radians) and the radii of the major and the minor axis (Radius1 and Radius2).

The procedures used to control the display of regions (e.g. ::set_draw, ::set_gray, ::set_draw) can also be used with ellipses. Several ellipses can be displayed with one call by using tuple parameters. For the use of colors with several ellipses, see ::set_color.


Attention

The center of the ellipse must be within the window.


Parameters

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

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

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

Phi (input_control)
ellipse.angle.rad(-array) -> HTuple.double / long
Orientation of the ellipse 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

Radius1 (input_control)
ellipse.radius1(-array) -> HTuple.double / long
Radius of major axis.
Default value: 24.0
Suggested values: 0.0, 64.0, 128.0, 256.0
Typical range of values: 0.0 <= Radius1 <= 511.0 (lin)
Minimum increment: 1.0
Recommended increment: 10.0

Radius2 (input_control)
ellipse.radius2(-array) -> HTuple.double / long
Radius of minor axis.
Default value: 14.0
Suggested values: 0.0, 64.0, 128.0, 256.0
Typical range of values: 0.0 <= Radius2 <= 511.0 (lin)
Minimum increment: 1.0
Recommended increment: 10.0


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

Result

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


Possible Predecessors

::open_window, ::set_draw, ::set_color, ::set_colored, ::set_line_width, ::set_rgb, ::set_hsi, ::elliptic_axis, ::area_center


Alternatives

::disp_circle, ::disp_region, ::gen_ellipse, ::gen_circle


See also

::open_window, ::open_textwindow, ::set_color, ::set_rgb, ::set_hsi, ::set_draw, ::set_line_width


Module

System



Copyright © 1996-2002 MVTec Software GmbH