Skip to content

draw_xldDrawXldDrawXlddraw_xldT_draw_xldšŸ”—

Short descriptionšŸ”—

draw_xldDrawXldDrawXlddraw_xldT_draw_xld — Interactive drawing of a contour.

SignaturešŸ”—

draw_xld( out xld_cont ContOut, window WindowHandle, string Rotate, string Move, string Scale, string KeepRatio )void DrawXld( HObject* ContOut, const HTuple& WindowHandle, const HTuple& Rotate, const HTuple& Move, const HTuple& Scale, const HTuple& KeepRatio )static void HOperatorSet.DrawXld( out HObject contOut, HTuple windowHandle, HTuple rotate, HTuple move, HTuple scale, HTuple keepRatio )def draw_xld( window_handle: HHandle, rotate: str, move: str, scale: str, keep_ratio: str ) -> HObject

Herror T_draw_xld( Hobject* ContOut, const Htuple WindowHandle, const Htuple Rotate, const Htuple Move, const Htuple Scale, const Htuple KeepRatio )

void HXLDCont::DrawXld( const HWindow& WindowHandle, const HString& Rotate, const HString& Move, const HString& Scale, const HString& KeepRatio )

void HXLDCont::DrawXld( const HWindow& WindowHandle, const char* Rotate, const char* Move, const char* Scale, const char* KeepRatio )

void HXLDCont::DrawXld( const HWindow& WindowHandle, const wchar_t* Rotate, const wchar_t* Move, const wchar_t* Scale, const wchar_t* KeepRatio ) (Windows only)

HXLDCont HWindow::DrawXld( const HString& Rotate, const HString& Move, const HString& Scale, const HString& KeepRatio ) const

HXLDCont HWindow::DrawXld( const char* Rotate, const char* Move, const char* Scale, const char* KeepRatio ) const

HXLDCont HWindow::DrawXld( const wchar_t* Rotate, const wchar_t* Move, const wchar_t* Scale, const wchar_t* KeepRatio ) const (Windows only)

void HXLDCont.DrawXld( HWindow windowHandle, string rotate, string move, string scale, string keepRatio )

HXLDCont HWindow.DrawXld( string rotate, string move, string scale, string keepRatio )

DescriptionšŸ”—

draw_xldDrawXld returns a contour, which has been created interactively by the user in the window.

Directly after calling draw_xldDrawXld you can add contour points by clicking with the left mouse button in the window at the desired positions. You delete the point appended last by pressing the Ctrl key. As soon as you add three contour points, 5 so-called pick points are displayed, one in the middle and 4 at the corners of the surrounding rectangle. By clicking on a pick point you can close the contour or open it again. If the contour is closed, the pick points are displayed in form of squares, otherwise they are shaped like a ā€˜u’.

If the contour is closed you can

  • move contour points by clicking with the left mouse button on a point marked by a rectangle and keep the mouse button pressed while moving the mouse,

  • insert contour points by clicking with the left mouse button in the vicinity of a line and then move the mouse to the position where you want the new point to be placed, and

  • delete contour points by selecting the point which should be deleted with the left mouse button and then press the Ctrl key.

By pressing the Shift key, you can switch into the transformation mode. In this mode you can rotate, move, and scale the contour as a whole, but only if you set the parameters Rotaterotaterotate, Movemovemove, and Scalescalescale, respectively, to 'true'"true". Instead of the pick points, 3 symbols are displayed with the contour: a cross in the middle and an arrow to the right if Rotaterotaterotate is set to 'true'"true", and a double-headed arrow to the upper right if Scalescalescale is set to 'true'"true".

You can

  • move the contour by clicking the left mouse button on the cross in the center and then dragging it to the new position,

  • rotate it by clicking with the left mouse button on the arrow and then dragging it, till the contour has the right direction, and

  • scale it by dragging the double arrow. To keep the ratio the parameter KeepRatiokeepRatiokeep_ratio has to be set to 'true'"true".

Pressing the right mouse button terminates the procedure.

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šŸ”—

ContOutcontOutcont_out (output_object) xld_cont → objectHObjectHXLDContHObjectHobject *

Modified contour.

WindowHandlewindowHandlewindow_handle (input_control) window → (handle)HTuple (HHandle)HWindow, HTuple (IntPtr)HHandleHtuple (handle)

Window handle.

Rotaterotaterotate (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Enable rotation?

Default: 'true'"true"
List of values: 'false', 'true'"false", "true"

Movemovemove (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Enable moving?

Default: 'true'"true"
List of values: 'false', 'true'"false", "true"

Scalescalescale (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Enable scaling?

Default: 'true'"true"
List of values: 'false', 'true'"false", "true"

KeepRatiokeepRatiokeep_ratio (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Keep ratio while scaling?

Default: 'true'"true"
List of values: 'false', 'true'"false", "true"

ResultšŸ”—

draw_xldDrawXld 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_rectangle2DrawRectangle2, draw_rectangle1DrawRectangle1, draw_rectangle2DrawRectangle2, draw_regionDrawRegion

See also

gen_rectangle2GenRectangle2, draw_circleDrawCircle, draw_ellipseDrawEllipse

ModulešŸ”—

Foundation