Exemplo 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(CSSObjectClass.regionInfoFrame, Metrics.Left, Metrics.Top, Metrics.Right - Metrics.Left, Metrics.Bottom - Metrics.Top);
                    break;

                case TextFrameType.ellipse:
                    w.SvgEllipse(CSSObjectClass.regionInfoFrame, Metrics.Left, Metrics.Top, (Metrics.Right - Metrics.Left) / 2, ((Metrics.Bottom - Metrics.Top) / 2));
                    break;

                case TextFrameType.circle:
                    w.SvgCircle(CSSObjectClass.regionInfoFrame, Metrics.Right - Metrics.Left, Metrics.Bottom - Metrics.Top, ((Metrics.Right - Metrics.Left) / 2));
                    break;
                }
            }
        }
Exemplo n.º 2
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" + SvgScore.UniqueID_Number, 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" + SvgScore.UniqueID_Number, 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" + SvgScore.UniqueID_Number, Metrics.Right - Metrics.Left, Metrics.Bottom - Metrics.Top, ((Metrics.Right - Metrics.Left) / 2),
                                _frameInfo.ColorString.String, _frameInfo.StrokeWidth, "none");
                    break;
                }
            }
        }
Exemplo n.º 3
0
 public override void WriteSVG(SvgWriter w)
 {
     if (_textAndBracketMetrics != null)
     {
         _textAndBracketMetrics.WriteSVG(w); // writes both text and brackets
     }
     else
     {
         Metrics.WriteSVG(w); // only writes the text
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Writes a time signature to the SVG file.
 /// The metrics have been set in SvgSystem.Justify()
 /// </summary>
 public void WriteSVG(SvgWriter w, string fifths, double originX, double originY)
 {
     Metrics.WriteSVG(w);
 }
Exemplo n.º 5
0
 /// <summary>
 /// Writes a time signature to the SVG file.
 /// The metrics have been set in SvgSystem.Justify()
 /// </summary>
 public void WriteSVG(SvgWriter w, string timeSigSignature, double originX, double originY)
 {
     Metrics.WriteSVG(w);
 }