캔버스 » Api

setitemuserdata

Description

SVG의 아이템에 특정값을 저장하는 API이다.

Parameters

Parameters Type Description
nItemId short 아이템 ID
strUserData STRING 사용자 정의 데이터

Return Value

Type Description
BOOL 성공/실패 여부

Remark

svg_mode가 true일때만 동작합니다.

Example

function add_on_mouseup(objInst) { var id = -1; var fill_color = factory.rgb(255,255,0); // 사각형 그리기 id = canvas.drawrect(10, 10, 100, 50, fill_color, false, 0); if (id >= 0) { // 사각형에 사용자정보 저장 canvas.setitemuserdata(id, "rect's User Data"); } }

See Also

getitemuserdata

Viewer Ver.

9.1.1.1

Update Date

20211208