화면 » Api

createshape

Description

도형을 동적으로 생성하는 API이다.

파라미터 strStyleID는 옵션 파라미터로 스타일을 지정할 경우 값을 전달하고
불필요할 경우 값을 주지 않으면된다.

Parameters

Parameters Type Description
nShapeKind short 생성할 도형 종류
nLeft long 생성될 X좌표
nTop long 생성될 Y좌표
nWidth long 생성될 넓이
nHeight long 생성될 넓이
strStyleID STRING 스타일 아이디

Return Value

Type Description
INSTANCE 생성된 도형의 Instance

Remark

** nShapeKind 상수값

XFD_SHAPEKIND_ELLIPSE = 1
XFD_SHAPEKIND_LINE = 2
XFD_SHAPEKIND_RECT = 3
XFD_SHAPEKIND_ROUNDRECT = 4
XFD_SHAPEKIND_DIAMOND = 5
XFD_SHAPEKIND_TRIANGLE = 6
XFD_SHAPEKIND_CAPTION = 7
XFD_SHAPEKIND_IMAGE = 8

Example

function btnImageBoxCreate(objInst, nXPoint, nYPoint, nWinXPoint, nWinYPoint) { var instImgBox = screen.createshape(XFD_SHAPEKIND_IMAGE, 0, 0, 100, 100); if(instNewObj != null) { factory.consoleprint("-->> create success"); } else { factory.consoleprint("-->> create fail.."); } }

See Also

createobject

Viewer Ver.

9.1.1.1

Update Date

20140218