![]() | XTextPrinter Class |
Namespace: Pixoneer.NXDL.NGR
public class XTextPrinter : IDisposable
The XTextPrinter type exposes the following members.
Name | Description | |
---|---|---|
![]() | XTextPrinter | XTextPrinter클래스의 기본 생성자로서, 멤버변수에 대하여 초기화를 수행한다. |
Name | Description | |
---|---|---|
![]() | Initialize | this객체에 대해서 입력되는 Font를 기준으로 초기화를 수행한다. |
![]() | Print(String, XVertex3d, eTextAlign, Color, Boolean, Color) |
스크린 상에 입력된 텍스트를 도시한다.
|
![]() | Print(String, XVertex3d, eTextAlign, eTextAlignV, Color, Boolean, Color) |
스크린 상에 입력된 텍스트를 도시한다.
|
![]() | Print(String, XVertex3d, XVertex2d, XVertex2d, Color, Boolean, Color) |
스크린 상에 입력된 텍스트를 도시한다.
|
public XTextPrinter m_TextPrinter; private void FormPlanetView_Load(object sender, EventArgs e) { m_TextPrinter = new XTextPrinter(); Font myFont = new Font("Gulim", 12, FontStyle.Strikeout | FontStyle.Underline | FontStyle.Bold); m_TextPrinter.Initialize(myFont); } private bool nxPlanetLayer1_OnRender(object sender, Pixoneer.NXDL.NXPlanet.NXPlanetDrawArgs e) { XVertex3d pt1 = e.ViewArea.GeographicToWorld(XGeoPoint.FromDegree(127.0, 37.0, 0)); XVertex3d pt2 = e.ViewArea.GeographicToWorld(XGeoPoint.FromDegree(127.0, 38.0, 0)); e.Graphics.glDisable(XGraphics.GL_DEPTH_TEST); e.Graphics.glPushMatrix(); // Changes World coordinate to Vertex coordinate. e.Graphics.glTranslated(-e.WOS.x, -e.WOS.y, -e.WOS.z); // Draws line. e.Graphics.glColor3f(1.0f, 0.0f, 0.0f); e.Graphics.glBegin(XGraphics.GL_LINES); e.Graphics.glVertex3d(pt1.x, pt1.y, pt1.z); e.Graphics.glVertex3d(pt2.x, pt2.y, pt2.z); e.Graphics.glEnd(); // Prints text. e.Graphics.glColor3f(1.0f, 1.0f, 1.0f); e.Graphics.glEnable(XGraphics.GL_DEPTH_TEST); XVertex2d posOffset = new XVertex2d(0, 0); XVertex2d align = new XVertex2d(0, 0); m_TextPrinter.Print("127.0, 37.0", pt1, posOffset, align, Color.Black, true, Color.Gray); m_TextPrinter.Print("127.0, 38.0", pt2, posOffset, align, Color.Black, true, Color.Gray); e.Graphics.glPopMatrix(); return default(bool); }