그리기 모드를 지정하는 API이다.
Parameters | Type | Description |
---|---|---|
nDrawMode | short | 그리기 모드 |
Type | Description |
---|---|
BOOL | 정상 처리 여부 |
그리기 모드는 아래와 같다. 0: none 1: pen 2: straight 3: eraser 4: text(drawtext API를 통해 문자열을 출력할때 사용)
svg_mode가 false일때만 동작합니다.
function setdrawmode_on_mousedown(objInst)
{
var nvalue = canvas.getdrawmode();
if (nvalue == 1) {
nvalue = 2; // 직선
} else {
nvalue = 1; // 펜
}
canvas.setdrawmode(nvalue);
}