Skip to content

draw_rectangle2DrawRectangle2DrawRectangle2draw_rectangle2T_draw_rectangle2πŸ”—

Short descriptionπŸ”—

draw_rectangle2DrawRectangle2DrawRectangle2draw_rectangle2T_draw_rectangle2 β€” Interactive drawing of any orientated rectangle.

SignatureπŸ”—

draw_rectangle2( window WindowHandle, out rectangle2.center.y Row, out rectangle2.center.x Column, out rectangle2.angle.rad Phi, out rectangle2.hwidth Length1, out rectangle2.hheight Length2 )void DrawRectangle2( const HTuple& WindowHandle, HTuple* Row, HTuple* Column, HTuple* Phi, HTuple* Length1, HTuple* Length2 )static void HOperatorSet.DrawRectangle2( HTuple windowHandle, out HTuple row, out HTuple column, out HTuple phi, out HTuple length1, out HTuple length2 )def draw_rectangle2( window_handle: HHandle ) -> Tuple[float, float, float, float, float]

Herror T_draw_rectangle2( const Htuple WindowHandle, Htuple* Row, Htuple* Column, Htuple* Phi, Htuple* Length1, Htuple* Length2 )

void HWindow::DrawRectangle2( double* Row, double* Column, double* Phi, double* Length1, double* Length2 ) const

void HWindow.DrawRectangle2( out double row, out double column, out double phi, out double length1, out double length2 )

DescriptionπŸ”—

draw_rectangle2DrawRectangle2 returns the parameter for any orientated rectangle, which has been created interactively by the user in the window.

The created rectangle is described by its center, its two half axes and the angle between the first half axis and the horizontal coordinate axis.

To create a rectangle you have to press the left mouse button for the center of the rectangle. While keeping the button pressed you may dimension the length (Length1length1length_1) and the orientation (Phiphiphi) of the first half axis. In doing so a temporary default length for the second half axis is assumed, which may be modified afterwards on demand. After another mouse click in the middle of the created rectangle, you can move it. A click close to one side β€œgrips” it to modify the rectangle’s dimension in perpendicular direction to this side. You only can modify the orientation, if you grip a side perpendicular to the first half axis. Pressing the right mouse button terminates the procedure.

After terminating the procedure the rectangle is not visible in the window any longer.

AttentionπŸ”—

If used in a buffer window, mouse events have to be supplied by the application, while the draw operator must be run in another thread.

Execution informationπŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

ParametersπŸ”—

WindowHandlewindowHandlewindow_handle (input_control) window β†’ (handle)HTuple (HHandle)HWindow, HTuple (IntPtr)HHandleHtuple (handle)

Window handle.

Rowrowrow (output_control) rectangle2.center.y β†’ (real)HTuple (double)HTuple (double)floatHtuple (double)

Row index of the center.

Columncolumncolumn (output_control) rectangle2.center.x β†’ (real)HTuple (double)HTuple (double)floatHtuple (double)

Column index of the center.

Phiphiphi (output_control) rectangle2.angle.rad β†’ (real)HTuple (double)HTuple (double)floatHtuple (double)

Orientation of the bigger half axis in radians.

Length1length1length_1 (output_control) rectangle2.hwidth β†’ (real)HTuple (double)HTuple (double)floatHtuple (double)

Bigger half axis.

Length2length2length_2 (output_control) rectangle2.hheight β†’ (real)HTuple (double)HTuple (double)floatHtuple (double)

Smaller half axis.

ResultπŸ”—

draw_rectangle2DrawRectangle2 returns 2 (H_MSG_TRUE) if the window is valid. If necessary, an exception is raised.

Combinations with other operatorsπŸ”—

Combinations

Possible predecessors

open_windowOpenWindow

Possible successors

reduce_domainReduceDomain, disp_regionDispRegion, set_coloredSetColored, set_line_widthSetLineWidth, set_drawSetDraw

Alternatives

draw_rectangle2_modDrawRectangle2Mod, draw_rectangle1DrawRectangle1, draw_regionDrawRegion

See also

gen_rectangle2GenRectangle2, draw_circleDrawCircle, draw_ellipseDrawEllipse

ModuleπŸ”—

Foundation