캔버스 » Api
  
drawpolygon
  
Description
SVG에 다각형을 그리는 API이다.
꼭지점 좌표배열을 기준으로 다각형을 그린다.
  
  
Parameters
  
    
      | Parameters | Type | Description | 
  
  
        
    
        | arrPoint | Array | 꼭지점좌표배열 | 
    
    
        | clrFillColor | COLOR | [옵션]내부 색상 | 
    
    
        | bTransparent | BOOL | [옵션]내부 투명 여부(기본값:false) | 
    
    
        | nLineWidth | short | [옵션]선 두께 | 
    
    
        | nLineStyle | short | [옵션]선 스타일 | 
    
    
        | clrLineColor | COLOR | [옵션]선 색상 | 
  
  
Return Value
  
    
      | Type | Description | 
  
  
    
      | short | 아이템 ID | 
  
Remark
* 옵션파라미터중 기본값이 명시되어 있지 않은 파라미터는 캔버스에 설정된 속성을 따른다.
  
 
  
Example
function canvas_on_click(objInst, nXPoint, nYPoint, nPageXPoint, nPageYPoint, nItemId)
{
	var id = -1;
	var fill_color = factory.rgb(255,255,0);
	// 평행사변형 그리기
	var points = [];
	points.push({x:nXPoint, y:nYPoint});
	points.push({x:nXPoint+80, y:nYPoint});
	points.push({x:nXPoint+60, y:nYPoint+60});
	points.push({x:nXPoint-20, y:nYPoint+60});
	id = canvas.drawpolygon(points, fill_color, false, 0);
	if (id >= 0) {
		// 평행사변형에 텍스트 출력
		canvas.setitemtext(id, "this is polygon");
	}
}
  
See Also
drawline
drawpolyline
drawrect
drawcircle
drawellipse
drawdiamond
drawtriangle
drawrighttriangle
drawpentagon
drawhexagon
drawheptagon
drawoctagon
drawroundrect
  
Viewer Ver.
9.1.1.1
  
Update Date
 20211115