draw_xld_modT_draw_xld_modDrawXldModDrawXldModdraw_xld_mod (Operator)

Name

draw_xld_modT_draw_xld_modDrawXldModDrawXldModdraw_xld_mod — Interactive modification of a contour.

Signature

draw_xld_mod(ContIn : ContOut : WindowHandle, Rotate, Move, Scale, KeepRatio, Edit : )

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)

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)

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)

static void HOperatorSet.DrawXldMod(HObject contIn, out HObject contOut, HTuple windowHandle, HTuple rotate, HTuple move, HTuple scale, HTuple keepRatio, HTuple edit)

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)

def draw_xld_mod(cont_in: HObject, window_handle: HHandle, rotate: str, move: str, scale: str, keep_ratio: str, edit: str) -> HObject

Description

draw_xld_moddraw_xld_modDrawXldModDrawXldModdraw_xld_mod 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 EditEditEditeditedit is set to 'true'"true""true""true""true". Similarly, you can only rotate, move or scale it if RotateRotateRotaterotaterotate, MoveMoveMovemovemove, and ScaleScaleScalescalescale, respectively, are set to 'true'"true""true""true""true".

draw_xld_moddraw_xld_modDrawXldModDrawXldModdraw_xld_mod 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 RotateRotateRotaterotaterotate is set to 'true'"true""true""true""true", and a double-headed arrow to the upper right if ScaleScaleScalescalescale is set to 'true'"true""true""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 RotateRotateRotaterotaterotate, MoveMoveMovemovemove and ScaleScaleScalescalescale are set to 'true'"true""true""true""true". The contour is displayed along with a cross in its center, an arrow pointing to the right (if RotateRotateRotaterotaterotate is set to 'true'"true""true""true""true"), and a double arrow (if ScaleScaleScalescalescale is set to 'true'"true""true""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')

Closed contours (square pick points)

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

Parameters

ContInContInContIncontIncont_in (input_object)  xld_cont objectHXLDContHObjectHObjectHobject

Input contour.

ContOutContOutContOutcontOutcont_out (output_object)  xld_cont objectHXLDContHObjectHObjectHobject *

Modified contour.

WindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (input_control)  window HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Window handle.

RotateRotateRotaterotaterotate (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Enable rotation?

Default: 'true' "true" "true" "true" "true"

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

MoveMoveMovemovemove (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Enable moving?

Default: 'true' "true" "true" "true" "true"

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

ScaleScaleScalescalescale (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Enable scaling?

Default: 'true' "true" "true" "true" "true"

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

KeepRatioKeepRatioKeepRatiokeepRatiokeep_ratio (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Keep ratio while scaling?

Default: 'true' "true" "true" "true" "true"

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

EditEditEditeditedit (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Enable editing?

Default: 'true' "true" "true" "true" "true"

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

Result

draw_xld_moddraw_xld_modDrawXldModDrawXldModdraw_xld_mod returns 2 ( H_MSG_TRUE) , if the window is valid and the needed drawing mode (see set_insertset_insertSetInsertSetInsertset_insert) is available. If necessary, an exception is raised.

Possible Predecessors

open_windowopen_windowOpenWindowOpenWindowopen_window

Possible Successors

reduce_domainreduce_domainReduceDomainReduceDomainreduce_domain, disp_regiondisp_regionDispRegionDispRegiondisp_region, set_coloredset_coloredSetColoredSetColoredset_colored, set_line_widthset_line_widthSetLineWidthSetLineWidthset_line_width, set_drawset_drawSetDrawSetDrawset_draw, set_insertset_insertSetInsertSetInsertset_insert

Alternatives

draw_rectangle2draw_rectangle2DrawRectangle2DrawRectangle2draw_rectangle2, draw_rectangle1draw_rectangle1DrawRectangle1DrawRectangle1draw_rectangle1, draw_rectangle2draw_rectangle2DrawRectangle2DrawRectangle2draw_rectangle2, draw_regiondraw_regionDrawRegionDrawRegiondraw_region

See also

gen_rectangle2gen_rectangle2GenRectangle2GenRectangle2gen_rectangle2, draw_circledraw_circleDrawCircleDrawCircledraw_circle, draw_ellipsedraw_ellipseDrawEllipseDrawEllipsedraw_ellipse, set_insertset_insertSetInsertSetInsertset_insert

Module

Foundation