# 도형 서식 지정

## Content

SpreadJS는 도형의 외형을 사용자 정의할 수 있도록 다양한 유형의 복합 선을 지원합니다. 다음과 같은 유형이 제공됩니다:

| @cols=3:**복합 선 유형** |
| ------- | ------- | ------- |
| ![simple-line.png](https://gcdocumentsitekrblob.blob.core.windows.net/document-site-files/images/8d606653-16a0-474d-b9dc-e2b4d01c2446/simple-line.0e27b3.png) | ![double-line.png](https://gcdocumentsitekrblob.blob.core.windows.net/document-site-files/images/8d606653-16a0-474d-b9dc-e2b4d01c2446/double-line.3d276e.png) | ![thick-thin-line.png](https://gcdocumentsitekrblob.blob.core.windows.net/document-site-files/images/8d606653-16a0-474d-b9dc-e2b4d01c2446/thick-thin-line.4cbd11.png) |
| ![thin-thick-line.png](https://gcdocumentsitekrblob.blob.core.windows.net/document-site-files/images/8d606653-16a0-474d-b9dc-e2b4d01c2446/thin-thick-line.f66a78.png) | ![triple-line.png](https://gcdocumentsitekrblob.blob.core.windows.net/document-site-files/images/8d606653-16a0-474d-b9dc-e2b4d01c2446/triple-line.0c5833.png) |

아래는 자동 도형 및 커넥터에 복합 선을 추가하여 아래 이미지처럼 표현하는 코드 샘플입니다.
![](https://gcdocumentsitekrblob.blob.core.windows.net/document-site-files/images/8d606653-16a0-474d-b9dc-e2b4d01c2446/images/compound-example.png)

```javascript
function applyShapeStyle(shapeVar) {
    var shapeStyle = shapeVar.style();
    shapeStyle.fill.color = "pink";
    shapeStyle.line.joinType = 1;
// 복합 선 유형 중 double(이중선) 추가
    shapeStyle.line.compoundType = 1;
    shapeStyle.line.color = "grey";
    shapeStyle.line.width = 5;
    shapeStyle.textFrame.vAlign = GC.Spread.Sheets.VerticalAlign.center;
    shapeStyle.textFrame.hAlign = GC.Spread.Sheets.HorizontalAlign.center;
    shapeVar.style(shapeStyle);
}

function applyLineStyle(lineVar) {
    var style = lineVar.style(); 
    var line = style.line; 
    line.width = 10; 
    line.color = 'pink';
    line.endArrowheadStyle = GC.Spread.Sheets.Shapes.ArrowheadStyle.triangle;
// 복합 선 유형 중 thickThin(굵은-가는 선) 추가
    line.compoundType = GC.Spread.Sheets.Shapes.CompoundType.thickThin;  
    lineVar.style(style);
}
```