Skip to content

draw_xld_modDrawXldModDrawXldModdraw_xld_modT_draw_xld_modšŸ”—

Short descriptionšŸ”—

draw_xld_modDrawXldModDrawXldModdraw_xld_modT_draw_xld_mod — Interactive modification of a contour.

SignaturešŸ”—

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

Herror T_draw_xld_mod( const Hobject ContIn, Hobject* ContOut, const Htuple WindowHandle, const Htuple Rotate, const Htuple Move, const Htuple Scale, const Htuple KeepRatio, const Htuple Edit )

HXLDCont HXLDCont::DrawXldMod( const HWindow& WindowHandle, const HString& Rotate, const HString& Move, const HString& Scale, const HString& KeepRatio, const HString& Edit ) const

HXLDCont HXLDCont::DrawXldMod( const HWindow& WindowHandle, const char* Rotate, const char* Move, const char* Scale, const char* KeepRatio, const char* Edit ) const

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

HXLDCont HWindow::DrawXldMod( const HXLDCont& ContIn, const HString& Rotate, const HString& Move, const HString& Scale, const HString& KeepRatio, const HString& Edit ) const

HXLDCont HWindow::DrawXldMod( const HXLDCont& ContIn, const char* Rotate, const char* Move, const char* Scale, const char* KeepRatio, const char* Edit ) const

HXLDCont HWindow::DrawXldMod( const HXLDCont& ContIn, const wchar_t* Rotate, const wchar_t* Move, const wchar_t* Scale, const wchar_t* KeepRatio, const wchar_t* Edit ) const (Windows only)

HXLDCont HXLDCont.DrawXldMod( HWindow windowHandle, string rotate, string move, string scale, string keepRatio, string edit )

HXLDCont HWindow.DrawXldMod( HXLDCont contIn, string rotate, string move, string scale, string keepRatio, string edit )

DescriptionšŸ”—

draw_xld_modDrawXldMod returns a contour, which has been interactively modified by the user in the window.

You can modify the contour in two ways: by editing the contour itself, e.g., by inserting or moving contour points, or by transforming the contour as a whole, e.g., by rotating moving or scaling it. Note that you can only edit a contour if Editeditedit is set to 'true'"true". Similarly, you can only rotate, move or scale it if Rotaterotaterotate, Movemovemove, and Scalescalescale, respectively, are set to 'true'"true".

draw_xld_modDrawXldMod starts in the transformation mode. In this mode, the contour is displayed together with 3 symbols: 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". To switch into the edit mode, press the Shift key; by pressing it again, you can switch back into the transformation mode.

Transformation ModešŸ”—

In this mode a contour can be rotated, moved and scaled, as long as the respective parameter Rotaterotaterotate, Movemovemove and Scalescalescale are set to 'true'"true". The contour is displayed along with a cross in its center, an arrow pointing to the right (if Rotaterotaterotate is set to 'true'"true"), and a double arrow (if Scalescalescale is set to 'true'"true").

  • To move the contour, click with the left mouse button on the cross in the center and then drag it to the new position, i.e., keep the mouse button pressed while moving the mouse.

  • To rotate it, click with the left mouse button on the arrow and then drag it, till the contour has the right direction.

  • Scaling is achieved by dragging the double arrow. To keep the ratio the parameter KeepRatiokeepRatiokeep_ratio has to be set to 'true'"true".

Edit ModešŸ”—

In this mode, the contour is display together with 5 pick points, which are located in the middle and at the corners of the surrounding rectangle. If the contour is closed, the pick points are displayed as squares, otherwise shaped like a ā€˜u’. By clicking on a pick point, you can close an open contour and vice versa. Depending on the state of the contour, you can perform different modifications. Open contours (pick points shaped like a ā€˜u’)

  • To append points, click with the left mouse button in the window and a new point is added at this position.

  • You can delete the point appended last by pressing the Ctrl key.

  • To move or insert points, you must first close the contour by clicking on one of the pick points.

Closed contours (square pick points)

  • To move a point, click with the left mouse button on a point marked by a rectangle and then drag it to the new position.

  • To insert a point, click 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.

  • To delete a point, select the point which should be deleted with the left mouse button and then press the Ctrl key.

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

ContIncontIncont_in (input_object) xld_cont → objectHObjectHXLDContHObjectHobject

Input contour.

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"

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

Enable editing?

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

ResultšŸ”—

draw_xld_modDrawXldMod 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