Click or drag to resize
XDL

XvcObj Class

XDL의 벡터 객체 계층구조에서 모두 사용되며, 상속받는 모든 클래스에 기본 서비스를 제공한다. 이 클래스는 vc(벡터) 객체의 가장 근간이 되는 클래스이다. 계층구조의 근간이다.
Inheritance Hierarchy
SystemObject
  Pixoneer.NXDL.NVCXvcObj
    More...

Namespace:  Pixoneer.NXDL.NVC
Assembly:  NXDLvc (in NXDLvc.dll) Version: 2.0.3.31
Syntax
C#
public class XvcObj : IDisposable

The XvcObj type exposes the following members.

Constructors
  NameDescription
Public methodXvcObj
XvcObj 객체를 생성하고 데이터 멤버를 초기화한다. 기본 생성자.
Top
Properties
  NameDescription
Public propertyColorBack
객체의 배경색을 가져오거나 설정한다.
Public propertyColorFore
객체의 전경색을 가져오거나 설정한다.
Public propertyColorLine
객체의 선 색상을 가져오거나 설정한다.
Public propertyColorName
객체의 이름 색상을 가져오거나 설정한다.
Public propertyColorText
객체의 문자열 색상을 가져오거나 설정한다.
Public propertyDrawNameFlagForSpeed
그리는 속도를 위한 설정을 확인하거나 설정한다.
false인 경우 매번 이름 문자열의 렌더링 DIB를 생성하여 도시하고, 그렇지 않은 경우 렌더링 DIB를 생성한 후 재사용하여 렌더링 속도를 높인다. 기본값은 false.
Public propertyID
객체 ID를 가져오거나 설정한다.
Public propertyIsFixed
객체 고정 유무를 가져오거나 설정한다.
Public propertyIsRotatable
객체 회전 가능 유무를 가져오거나 설정한다.
Public propertyMaxX
경계 영역의 최대 X 값을 가져온다.
Public propertyMaxY
경계 영역의 최대 X 값을 가져온다.
Public propertyMaxZ
경계 영역의 최대 Z 값을 가져온다.
Public propertyMinX
경계 영역의 최소 X 값을 가져온다.
Public propertyMinY
경계 영역의 최소 Y 값을 가져온다.
Public propertyMinZ
경계 영역의 최소 Z 값을 가져온다.
Public propertyName
객체 이름을 가져오거나 설정한다.
Public propertyNameAlignH
객체 이름의 가로 정렬 값을 확인하거나 설정한다.
Public propertyNameAlignV
객체 이름의 세로 정렬 값을 확인하거나 설정한다.
Public propertyNameBold
이름 문자열을 굵게 도시할지 여부를 확인하거나 설정한다.
Public propertyNameFontName
이름 문자열의 글꼴 이름을 설정한다.
Public propertyNameFontSize
이름 문자열의 글꼴 크기를 설정한다.
Public propertyNameItalic
이름 문자열을 기울여서 도시할지 여부를 확인하거나 설정한다.
Public propertyNameMultiLine
이름 문자열의 Carriage return-Line Feed(\r\n) 처리를 문자열 분리로 할지 여부를 설정하고 확인한다.
Public propertyNameOffsetX
객체 이름의 위치를 가로축 방향으로 설정하거나 확인한다.
화소(pixel) 단위로 오른쪽 방향으로 증가한다.
Public propertyNameOffsetY
객체 이름의 위치를 세로축 방향으로 설정하거나 확인한다.
화소(pixel) 단위로 아래쪽 방향으로 증가한다.
Public propertyNameStrikeOut
이름 문자열의 바깥 라인 표시여부를 확인하거나 설정한다.
Public propertyNameUnderline
이름 문자열의 밑줄을 확인하거나 설정한다.
Public propertyNumProperties
객체 속성 정보를 가져온다.
Public propertyShowName
객체의 이름 도시여부를 확인하거나 설정한다.
Public propertyStyleFill
객체의 채우기 스타일을 가져오거나 설정한다.
Public propertyStyleLine
객체의 선 스타일을 가져오거나 설정한다.
Public propertyType
객체를 구별할 수 있도록 객체 형식을 가져온다.
Public propertyVisible
객체를 보일지 여부를 확인하고 설정한다.
Top
Methods
  NameDescription
Public methodCalcRange
객체의 경계 영역을 계산한다.
Public methodGetPropertyNameAt
입력 인덱스에 대응하는 객체 속성(필드) 이름을 가져온다.
Public methodGetPropertyValueAt
입력 인덱스에 대응하는 객체 속성값을 가져온다.
Public methodGetThick
객체의 두께를 가져온다.
Public methodHitTest
특정 위치에 대해서 객체가 선택되었는지와 이에 대한 정보를 가져온다.
Public methodMoveObject
입력 오프셋만큼 객체를 이동한다.
Public methodNormalize
객체의 영역을 정규화한다.
Public methodSetThick
객체의 두께를 설정한다.
Top
Examples
XvcObj 객체의 속성 정보를 가져오는 예제이다. 외부 벡터 파일을 로딩하는 경우 파일 형식에 따라 데이터베이스 혹은 속성정보를 가지고 있는 파일이 있는데 이 정보가 XvcObj의 property로 변환되어 사용할 수 있다.
using Pixoneer.NXDL;
using Pixoneer.NXDL.NIO;
using Pixoneer.NXDL.NRS;
using Pixoneer.NXDL.NCC;
using Pixoneer.NXDL.NVC;

//Create Vector IO Manager
XVectorIO VectorIO = new XVectorIO();
String strError = "";
if (VectorIO.Initialize(out strError) == false)
{
    return;
}

// Create spatial reference of input vector file.
XSpatialReference srIn = new XSpatialReference();
srIn.importFromEPSG(4326); // Geographic Lat/Lon (WGS84)
String strFilePathLoad = "D:\\Sample\\Vector_Sample\\sample.shp";
XvcBase vectorBase = VectorIO.LoadFile(strFilePathLoad, out strError, ref srIn);
if (vectorBase != null)
{
    long layerPos = vectorBase.GetHeaderLayerPos();
    while (layerPos != 0)
    {
        XvcLayer vectorLayer = vectorBase.GetLayer(layerPos);
        if (vectorLayer != null)
        {
            long objPos = vectorLayer.GetHeadObjPos();
            while (objPos != 0)
            {
                XvcObj vectorObj = layer.GetObj(objPos);
                if (vectorObj != null)
                {
                    int numProperties = vectorObj.NumProperties;
                    for (int i = 0; i < numProperties; i++)
                    {
                        string strName = vectorObj.GetPropertyNameAt(i);
                        string strValue = vectorObj.GetPropertyValueAt(i);

                        // do something
                    }
                }
                objPos = vectorLayer.GetNextObjPos(objPos);                    
            }
        }
        layerPos = vectorBase.GetNextLayerPos(layerPos);
    }
}
See Also
Inheritance Hierarchy
SystemObject
  Pixoneer.NXDL.NVCXvcObj
    Pixoneer.NXDL.NVCXvcBitmap
    Pixoneer.NXDL.NVCXvcEllipse
    Pixoneer.NXDL.NVCXvcGroup
    Pixoneer.NXDL.NVCXvcLine
    Pixoneer.NXDL.NVCXvcMeasureAngle
    Pixoneer.NXDL.NVCXvcMeasureArea
    Pixoneer.NXDL.NVCXvcMeasureDist
    Pixoneer.NXDL.NVCXvcMeasurePoint
    Pixoneer.NXDL.NVCXvcPoint
    Pixoneer.NXDL.NVCXvcPolygon
    Pixoneer.NXDL.NVCXvcPolyline
    Pixoneer.NXDL.NVCXvcRectangle
    Pixoneer.NXDL.NVCXvcScaleBar
    Pixoneer.NXDL.NVCXvcSpiderLine
    Pixoneer.NXDL.NVCXvcSymbol
    Pixoneer.NXDL.NVCXvcText
    Pixoneer.NXDL.NVCXvcTextBox