draw_xldT_draw_xldDrawXldDrawXlddraw_xld (算子)
名称
draw_xldT_draw_xldDrawXldDrawXlddraw_xld — 交互式绘制轮廓。
签名
void DrawXld(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)
static void HOperatorSet.DrawXld(out HObject contOut, HTuple windowHandle, HTuple rotate, HTuple move, HTuple scale, HTuple keepRatio)
void HXLDCont.DrawXld(HWindow windowHandle, string rotate, string move, string scale, string keepRatio)
HXLDCont HWindow.DrawXld(string rotate, string move, string scale, string keepRatio)
描述
draw_xlddraw_xldDrawXldDrawXldDrawXlddraw_xld returns a contour, which has been created interactively
by the user in the window.
Directly after calling draw_xlddraw_xldDrawXldDrawXldDrawXlddraw_xld 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 RotateRotateRotateRotaterotaterotate, MoveMoveMoveMovemovemove, and
ScaleScaleScaleScalescalescale, respectively, to 'true'"true""true""true""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 RotateRotateRotateRotaterotaterotate is set to 'true'"true""true""true""true""true", and a double-headed
arrow to the upper right if ScaleScaleScaleScalescalescale is set to 'true'"true""true""true""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 KeepRatioKeepRatioKeepRatioKeepRatiokeepRatiokeep_ratio has to be set to 'true'"true""true""true""true""true".
Pressing the right mouse button terminates the procedure.
注意
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.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
ContOutContOutContOutContOutcontOutcont_out (输出对象) xld_cont → objectHXLDContHObjectHXLDContHobject *
Modified contour.
WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (输入控制) window → HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
窗口句柄。
RotateRotateRotateRotaterotaterotate (输入控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Enable rotation?
默认值:
'true'
"true"
"true"
"true"
"true"
"true"
值列表:
'false'"false""false""false""false""false", 'true'"true""true""true""true""true"
MoveMoveMoveMovemovemove (输入控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Enable moving?
默认值:
'true'
"true"
"true"
"true"
"true"
"true"
值列表:
'false'"false""false""false""false""false", 'true'"true""true""true""true""true"
ScaleScaleScaleScalescalescale (输入控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Enable scaling?
默认值:
'true'
"true"
"true"
"true"
"true"
"true"
值列表:
'false'"false""false""false""false""false", 'true'"true""true""true""true""true"
KeepRatioKeepRatioKeepRatioKeepRatiokeepRatiokeep_ratio (输入控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Keep ratio while scaling?
默认值:
'true'
"true"
"true"
"true"
"true"
"true"
值列表:
'false'"false""false""false""false""false", 'true'"true""true""true""true""true"
结果
draw_xlddraw_xldDrawXldDrawXldDrawXlddraw_xld returns 2 (
H_MSG_TRUE)
, if the window is valid and the
needed drawing mode (see set_insertset_insertSetInsertSetInsertSetInsertset_insert) is available。如有必要,则抛出异常。
可能的前趋
open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window
可能的后继
reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain,
disp_regiondisp_regionDispRegionDispRegionDispRegiondisp_region,
set_coloredset_coloredSetColoredSetColoredSetColoredset_colored,
set_line_widthset_line_widthSetLineWidthSetLineWidthSetLineWidthset_line_width,
set_drawset_drawSetDrawSetDrawSetDrawset_draw,
set_insertset_insertSetInsertSetInsertSetInsertset_insert
替代
draw_rectangle2draw_rectangle2DrawRectangle2DrawRectangle2DrawRectangle2draw_rectangle2,
draw_rectangle1draw_rectangle1DrawRectangle1DrawRectangle1DrawRectangle1draw_rectangle1,
draw_rectangle2draw_rectangle2DrawRectangle2DrawRectangle2DrawRectangle2draw_rectangle2,
draw_regiondraw_regionDrawRegionDrawRegionDrawRegiondraw_region
另见
gen_rectangle2gen_rectangle2GenRectangle2GenRectangle2GenRectangle2gen_rectangle2,
draw_circledraw_circleDrawCircleDrawCircleDrawCircledraw_circle,
draw_ellipsedraw_ellipseDrawEllipseDrawEllipseDrawEllipsedraw_ellipse,
set_insertset_insertSetInsertSetInsertSetInsertset_insert
模块
基础