|
NXImageLayerVectorEditorCreateNewOBJ(eXvcObjType, ArrayList) Method
|
객체 형식과 정점 배열을 이용하여 새로운 객체를 생성한다.
Namespace: Pixoneer.NXDL.NXImageAssembly: NXImage (in NXImage.dll) Version: 2.0.3.38
Syntaxpublic XvcObj CreateNewOBJ(
eXvcObjType type,
ArrayList vertexList
)
Parameters
- type eXvcObjType
- [In] 객체 형식
- vertexList ArrayList
- [In] XVertex3d 형식의 정점 목록
Return Value
XvcObj 객체가 생성되면 XvcObj 객체를 반환하고, 그렇지 않으면 null을 반환하다.
Example
예제 #1:
private void pointToolStripMenuItem_Click(object sender, EventArgs e)
{
XvcObj obj = nxImageLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.POINT, null);
}
private void lineToolStripMenuItem_Click(object sender, EventArgs e)
{
XvcObj obj = nxImageLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.LINE, null);
}
private void ellipseToolStripMenuItem_Click(object sender, EventArgs e)
{
XvcObj obj = nxImageLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.ELLIPSE, null);
}
private void rectangleToolStripMenuItem_Click(object sender, EventArgs e)
{
XvcObj obj = nxImageLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.RECTANGLE, null);
}
private void polylineToolStripMenuItem_Click(object sender, EventArgs e)
{
XvcObj obj = nxImageLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.POLYLINE, null);
}
private void textToolStripMenuItem_Click(object sender, EventArgs e)
{
XvcObj obj = nxImageLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.TEXT, null);
}
private void polygonToolStripMenuItem_Click(object sender, EventArgs e)
{
XvcObj obj = nxImageLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.POLYGON, null);
}
private void textBoxToolStripMenuItem_Click(object sender, EventArgs e)
{
XvcObj obj = nxImageLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.TEXTBOX, null);
}
private void measurePointToolStripMenuItem_Click(object sender, EventArgs e)
{
XvcObj obj = nxImageLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.MEASURE_POINT, null);
}
private void measureDistanceToolStripMenuItem_Click(object sender, EventArgs e)
{
XvcObj obj = nxImageLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.MEASURE_DIST, null);
}
private void measureAreaToolStripMenuItem_Click(object sender, EventArgs e)
{
XvcObj obj = nxImageLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.MEASURE_AREA, null);
}
private void measureAngleToolStripMenuItem_Click(object sender, EventArgs e)
{
XvcObj obj = nxImageLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.MEASURE_ANGLE, null);
}
private void bitmapToolStripMenuItem_Click(object sender, EventArgs e)
{
XvcObj obj = nxImageLayerVectorEditor1.CreateNewOBJ(Pixoneer.NXDL.NVC.eXvcObjType.BITMAP, null);
if (obj != null)
{
string strError = string.Empty;
string strFilePath = Xfn.GetResourcePath() + "\\indexmap.bmp";
((XvcBitmap)obj).BitmapName = "INDEX_MAP";
((XvcBitmap)obj).SetImage(strFilePath, ref strError);
}
}
예제 #2:
private void rectangleToolStripMenuItem_Click(object sender, EventArgs e)
{
System.Collections.ArrayList vertexList = new System.Collections.ArrayList();
vertexList.Add(new XVertex3d(10, 10, 0));
vertexList.Add(new XVertex3d(30, 30, 0));
XvcObj obj = nxImageLayerVectorEditor.CreateNewOBJ(eXvcObjType.Rectangle, vertexList);
obj.IsFixed = true;
nxImageLayerVectorEditor.SelectNone();
}
See Also