GetTextObjectNoteAnchorPosition
public Vertex3D GetTextObjectNoteAnchorPosition(int noteId, AnchorPoint anchor)
TextObjectNote 의 지정 AnchorPoint 위치를 월드 좌표로 반환.
Remarks
AnchorPoint 는 텍스트 박스의 정규화 위치(Horizontal 0=Left..1=Right, Vertical 0=Top..1=Bottom)이며,
텍스트의 방향/회전이 반영된 실제 월드 좌표를 반환한다.
노트가 없거나 TextObjectNote 가 아니거나 아직 화면에 렌더링되지 않은 경우 null 반환.
Parameters
| Name | Type | Description |
|---|---|---|
| noteId | int | TextObjectNote ID |
| anchor | AnchorPoint | 위치를 조회할 기준 anchor (예: AnchorPoint.Center, AnchorPoint.TopLeft) |
Returns
| Type | Description |
|---|---|
| Vertex3D | anchor 지점의 월드 좌표. 해석 불가 시 null. |
Examples
// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;
private void Example()
{
// [전제] AddSurfaceTextObjectNote 로 생성한 TextObjectNote 필요.
int noteId = vizcore3d.Review.Note.AddSurfaceTextObjectNote(
"TEXT", "", new VIZCore3D.NET.Data.Vertex3D(0, 0, 0),
new VIZCore3D.NET.Data.Vertex3D(1, 0, 0), new VIZCore3D.NET.Data.Vertex3D(0, 1, 0));
// 텍스트 박스 상단 중앙의 월드 좌표 조회
VIZCore3D.NET.Data.Vertex3D top = vizcore3d.Review.Note.GetTextObjectNoteAnchorPosition(
noteId, VIZCore3D.NET.Data.AnchorPoint.TopCenter);
}