본문으로 건너뛰기

GetImage

Overloads

NameDescription
GetImage(List<int> index, int width, int height)지정된 개체의 이미지를 반환
GetImage(int width, int height)선택된 개체의 이미지를 반환

GetImage(List<int> index, int width, int height)

public Image GetImage(List&lt;int&gt; index, int width, int height)

지정된 개체의 이미지를 반환

Parameters

NameTypeDescription
indexList<int>Node Index List
widthint가로 길이 px
heightint세로 길이 px

Returns

TypeDescription
Image개체 이미지

Examples

// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;

private void Example()
{
if (vizcore3d.Model.IsOpen() == false) return;

List<int> index = new List<int>() { 100, 200, 300 };

System.Drawing.Image img = vizcore3d.View.GetImage(
index /* Node Index */
, 800 /* Width */
, 600 /* Height */
);
if (img == null) return;

SaveFileDialog dlg = new SaveFileDialog();
dlg.Filter = "Image (.png)|*.png";
if (dlg.ShowDialog() != DialogResult.OK) return;

img.Save(dlg.FileName);

VIZCore3D.NET.Utility.ExplorerHelper.Show(dlg.FileName);
}

GetImage(int width, int height)

public Image GetImage(int width, int height)

선택된 개체의 이미지를 반환

Parameters

NameTypeDescription
widthint가로 길이 px
heightint세로 길이 px

Returns

TypeDescription
Image개체 이미지

Examples

// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;

private void Example()
{
if (vizcore3d.Model.IsOpen() == false) return;
if (vizcore3d.Object3D.FromFilter(VIZCore3D.NET.Data.Object3dFilter.SELECTED_TOP).Count == 0) return;

System.Drawing.Image img = vizcore3d.View.GetImage(
800 /* Width */
, 600 /* Height */
);
if (img == null) return;

SaveFileDialog dlg = new SaveFileDialog();
dlg.Filter = "Image (.png)|*.png";
if (dlg.ShowDialog() != DialogResult.OK) return;

img.Save(dlg.FileName);

VIZCore3D.NET.Utility.ExplorerHelper.Show(dlg.FileName);
}