dbCreate 관련 함수들에 대해서 적은 강좌 글입니다. 일단 dbCreate 관련 함수들이 어떤 것이 있는지 찾아보려면 Finder에서 dbCreate라는 검색어로 검색해보면 정말 많은 함수들이 나오는데요.
그중에 많이 사용되는 녀석들 몇 개만 살펴볼까 합니다. 다른 것들도 응용하면 비슷해요~
◆ dbCreateRect() 함수
dbCreateRect(
d_cellView
tx_layer [ t_purpose ]
l_bBox
)
=> d_rect | nil
Creates a rectangle.
cv = deGetCellView()
dbID = dbCreateRect(cv list("METAL1" "drawing") list(list(0 0) list(3 3)))
description은 간단하고, 역시 example로 작성한 것도 한 line으로 복잡하지 않다. 단순히 Rectangle을 마우스 없이 그렸다는 것이 중요한 것은 아니고, 이러한 dbCreate 관련 함수들로 복잡한 Cell 들을 제작할 수 있기에 활용도를 알아 두는 것이 더 중요하다. 이를테면 width=3 height=5라는 변수가 있을 때 왼쪽 하단의 좌표가 (1 2)인 rectangular가 있다면
width=3
height=5
dbCreateRect(cv list("METAL1" "drawing") list(list(1 2) list(1+width 2+height)))
하지만 db가 그려진 이후에~ width=4로 바꾼다고 해서 그려져 있는 rect의 size가 변하진 않습니다. 뭔가 외부에서 값을 주고 그 값을 받아서 특정 cell을 그려주는 역할을 하는 게 Pcell이죠. 일단 강의의 처음 종착지는 Pcell이 될 겁니다.
◆ dbCreatePath() 함수
dbCreatePath(
d_cellView
tx_layer [ t_purpose ]
l_points
x_width
[ t_pathStyle ]
)
=> d_path | nil
Creates a path.
# dbCreatePath 도 별다를건 없지만 rectangular 처럼 bBox (좌측하단과 우측상단) 좌표를 받지 않고
# 시작점과 끝점 그리고 Path의 두께를 입력받아야 합니다.
dbCreatePath(cv list("METAL1" "drawing") list(list(0 0) list(3 0)) 1)
◆ dbCreatePolygon() 함수
dbCreatePolygon(
d_cellView
tx_layer [ t_purpose ]
l_points
)
=> d_polygon | nil
Creates a polygon.
# dbCreatePolygon 역시 각 point 의 좌표를 list로 입력하면 됩니다.
dbCreatePolygon(cv list("METAL1" "drawing") list(list(0 0) list(3 0) list(3 2) list(2 2)))
◆ dbCreateLabel() 함수
dbCreateLabel(
d_cellView
tx_layer [ t_purpose ]
l_point
t_label
t_just
t_orient
t_font
x_height
)
=> d_label / nil
Creates a graphic text-string label.
# dbCreateLabel은 입력받을 변수가 좀 많습니다.
dbCreateLabel(cv list("METAL1" "pin") list(1 1) "TEST" "centerCenter" "R0" "roman" 1)
'Programming 언어 > Skill' 카테고리의 다른 글
| [SKILL] pcDefinePCell 맛보기 - 2편 (1) | 2017.02.11 |
|---|---|
| [SKILL] pcDefinePCell 맛보기 - 1편 (0) | 2017.02.11 |
| [SKILL] _le 함수 List (0) | 2017.02.07 |
| [SKILL] dbOpenPanicCellView 와 panic.log (0) | 2017.02.05 |
| [SKILL 강좌] geGetSelSet() 함수와 foreach 문 (0) | 2017.02.05 |