예제 #1
0
        private void WritePlainTextAttributes(SvgVoPlainText svg, PlainTextVObject vObject)
        {
            WriteTextAttributes(svg, vObject);

            svg.BaselineLocation = vObject.BaselineLocation;
            svg.IsVertical       = vObject.IsVertical;
        }
예제 #2
0
        private void ReadPlainTextAttributes(PlainTextVObject vObject, SvgVoPlainText svg)
        {
            ReadTextAttributes(vObject, svg);

            vObject.BaselineLocation = svg.BaselineLocation;
            vObject.IsVertical       = svg.IsVertical;
        }
예제 #3
0
 internal SvgElement ToSvg(VObject vObject)
 {
     if (vObject is GridVObject)
     {
         var svg = new SvgVoGrid();
         WriteGridAttributes(svg, vObject as GridVObject);
         return(svg);
     }
     else if (vObject is PolylineVObject)
     {
         var svg = new SvgPolyline();
         WritePolylineAttributes(svg, vObject as PolylineVObject);
         return(svg);
     }
     else if (vObject is DashedLineVObject)
     {
         var svg = new SvgVoDashLine();
         WriteDashLineAttributes(svg, vObject as DashedLineVObject);
         return(svg);
     }
     else if (vObject is LineVObject)
     {
         var svg = new SvgLine();
         WriteLineAttributes(svg, vObject as LineVObject);
         return(svg);
     }
     else if (vObject is EllipseVObject)
     {
         var svg = new SvgEllipse();
         WriteEllipseAttributes(svg, vObject as EllipseVObject);
         return(svg);
     }
     else if (vObject is SvgVObject)
     {
         var svg = new SvgVoSvg();
         WriteSvgAttributes(svg, vObject as SvgVObject);
         return(svg);
     }
     else if (vObject is ImageVObject)
     {
         var svg = new SvgVoImage();
         WriteImageAttributes(svg, vObject as ImageVObject);
         return(svg);
     }
     else if (vObject is PlainTextVObject)
     {
         var svg = new SvgVoPlainText();
         WritePlainTextAttributes(svg, vObject as PlainTextVObject);
         return(svg);
     }
     else if (vObject is CurvedTextVObject)
     {
         var svg = new SvgVoCurvedText();
         WriteCurvedTextAttributes(svg, vObject as CurvedTextVObject);
         return(svg);
     }
     else if (vObject is PathBoundedTextVObject)
     {
         var svg = new SvgVoPathBoundedText();
         WritePathBoundedTextAttributes(svg, vObject as PathBoundedTextVObject);
         return(svg);
     }
     else if (vObject is BoundedTextVObject)
     {
         var svg = new SvgVoBoundedText();
         WriteBoundedTextAttributes(svg, vObject as BoundedTextVObject);
         return(svg);
     }
     else if (vObject is AutoScaledTextVObject)
     {
         var svg = new SvgVoAutoScaledText();
         WriteAutoScaledTextAttributes(svg, vObject as AutoScaledTextVObject);
         return(svg);
     }
     else if (vObject is PlaceholderVObject)
     {
         var svg = new SvgVoPlaceholder();
         WritePlaceholderAttributes(svg, vObject as PlaceholderVObject);
         return(svg);
     }
     else if (vObject is RectangleVObject)
     {
         var svg = new SvgVoRectangle();
         WriteRectangleAttributes(svg, vObject as RectangleVObject);
         return(svg);
     }
     else if (vObject is ShapeVObject)
     {
         var svg = new SvgVoShape();
         WriteShapeAttributes(svg, vObject as ShapeVObject);
         return(svg);
     }
     else
     {
         return(null);
     }
 }