// Draw text with a border of segments.
        private void DrawTextWithBorder(string text,
                                        Point3D ll, Point3D lr, Point3D ur, Point3D ul,
                                        Brush bgBrush, Brush fgBrush,
                                        TextAlignment textAlign, FontFamily fontFamily = null)
        {
            MeshGeometry3D mesh1 = new MeshGeometry3D();

            MainGroup.Children.Add(mesh1.AddFittedText(text,
                                                       ll, lr, ur, ul,
                                                       bgBrush, fgBrush, textAlign, fontFamily));

            MeshGeometry3D mesh2 = new MeshGeometry3D();
            HashSet <Edge> edges = new HashSet <Edge>();

            mesh2.AddPolygon(edges, 0.01, ll, lr, ur, ul);
            MainGroup.Children.Add(mesh2.MakeModel(Brushes.Red));
        }