Ejemplo n.º 1
0
        private void DrawText()
        {
            Space3D space = new Space3D();

            // Prepare text points and lines
            Text3D text = Text3D.FromString("This is a test string...", new Font("Times New Roman", 24), 10f, FontStyle.Regular, 50);

            // Set color for tag 1, if color is need to be specified directly use 0x7f000000 | rgb color (0xrrggbb)
            space.SetColor(0, Color.Black);
            space.Text(0, text, Text3DLocation.XY, Text3DFlip.None, 10f, 10f, 10f);

            text = Text3D.FromString("This is another test string...", new Font("Arial", 24), 10f, FontStyle.Bold, 50);
            space.Text(Form1.ColorToTag(Color.Orange), text, Text3DLocation.XZ, Text3DFlip.None, 10f, 10f, 10f);


            space.SetColor(1, Color.SandyBrown);
            space.SetColor(2, Color.RoyalBlue);
            space.SetColor(3, Color.SeaGreen);
            for (int i = 0; i < 5; i++)
            {
                text = Text3D.FromString(String.Format("String #{0}", i + 1), new Font("Courier New", 24), 10f, FontStyle.Italic, 50);
                space.Text(i % 4, text, Text3DLocation.YZ, Text3DFlip.None, 10f, 10f * (float)i, 10f);
            }


            this.view.Space = space;
        }