Ejemplo n.º 1
0
 public override void WriteSVG(SvgWriter w)
 {
     //w.SvgText(TextInfo, Metrics as TextMetrics); // does not work with DynamicMetrics
     if(Metrics != null)
         Metrics.WriteSVG(w);
     if(_frameInfo != null)
     {
         switch(_frameInfo.FrameType)
         {
             case TextFrameType.none:
             break;
             case TextFrameType.rectangle:
             w.SvgRect("rectangle", Metrics.Left, Metrics.Top, Metrics.Right - Metrics.Left, Metrics.Bottom - Metrics.Top,
                 _frameInfo.ColorString.String, _frameInfo.StrokeWidth, "none");
             break;
             case TextFrameType.ellipse:
             w.SvgEllipse("ellipse", Metrics.Left, Metrics.Top, (Metrics.Right - Metrics.Left) / 2, (Metrics.Bottom - Metrics.Top) / 2,
                 _frameInfo.ColorString.String, _frameInfo.StrokeWidth, "none");
             break;
             case TextFrameType.circle:
             w.SvgCircle("circle", Metrics.Right - Metrics.Left, Metrics.Bottom - Metrics.Top, ((Metrics.Right - Metrics.Left) / 2),
                 _frameInfo.ColorString.String, _frameInfo.StrokeWidth, "none");
             break;
         }
     }
 }