예제 #1
0
        static GeometryGroup BuildTextSpan(ClipArtViewer.TextShape shape)
        {
            double        x  = shape.X;
            double        y  = shape.Y;
            GeometryGroup gp = new GeometryGroup();

            BuildTextSpan(gp, shape.TextStyle, shape.TextSpan, ref x, ref y);
            return(gp);
        }
예제 #2
0
        // Use GlyphRun to build the text. This allows us to define letter and word spacing
        // http://books.google.com/books?id=558i6t1dKEAC&pg=PA485&source=gbs_toc_r&cad=4#v=onepage&q&f=false
        static GeometryGroup BuildGlyphRun(ClipArtViewer.TextShape shape, double xoffset, double yoffset)
        {
            GeometryGroup gp         = new GeometryGroup();
            double        totalwidth = 0;

            if (shape.TextSpan == null)
            {
                string txt = shape.Text;
                gp.Children.Add(BuildGlyphRun(shape.TextStyle, txt, shape.X, shape.Y, ref totalwidth));
                return(gp);
            }
            return(BuildTextSpan(shape));
        }
예제 #3
0
 static public GeometryGroup BuildTextGeometry(ClipArtViewer.TextShape shape)
 {
     return(BuildGlyphRun(shape, 0, 0));
 }