public override void WriteSVG(SvgWriter w, bool staffIsVisible)
        {
            if(Visible && staffIsVisible)
            {
                w.SvgStartGroup("cautionaryChord");
                w.SvgStartGroup(null);

                this.ChordMetrics.WriteSvg(w);

                w.SvgEndGroup();
                w.SvgEndGroup();
            }
        }
Esempio n. 2
0
        public override void WriteSVG(SvgWriter w, bool staffIsVisible)
        {
            if(Visible && staffIsVisible)
            {
                w.SvgStartGroup(null, "cautionaryChord" + SvgScore.UniqueID_Number);
                w.SvgStartGroup(null, null);

                this.ChordMetrics.WriteSvg(w);

                w.SvgEndGroup();
                w.SvgEndGroup();
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Writes out the stafflines and noteObjects of an OutputStaff.
        /// </summary>
        public override void WriteSVG(SvgWriter w, int systemNumber, int staffNumber)
        {
            w.SvgStartGroup("outputStaff");

            base.WriteSVG(w, true, systemNumber, staffNumber);

            w.SvgEndGroup(); // outputStaff
        }
Esempio n. 4
0
        /// <summary>
        /// Writes out the stafflines, and noteObjects for an InputStaff.
        /// </summary>
        public override void WriteSVG(SvgWriter w, int systemNumber, int staffNumber)
        {
            w.SvgStartGroup("inputStaff", "sys" + systemNumber.ToString() + "staff" + staffNumber.ToString());

            base.WriteSVG(w, true, systemNumber, staffNumber);

            w.SvgEndGroup(); // InputStaff
        }
Esempio n. 5
0
 /// <summary>
 /// Writes this ClefChangeSymbol to the SVG file if both _isVisible is true.
 /// The character metrics have been set in SvgSystem.Justify()
 /// </summary>
 public override void WriteSVG(SvgWriter w, bool staffIsVisible)
 {
     if(_isVisible && staffIsVisible)
     {
         w.SvgStartGroup("clefChange");
         base.WriteSVG(w, staffIsVisible);
         w.SvgEndGroup();
     }
 }
Esempio n. 6
0
 /// <summary>
 /// Writes this ClefChangeSymbol to the SVG file if both _isVisible is true.
 /// The character metrics have been set in SvgSystem.Justify()
 /// </summary>
 public override void WriteSVG(SvgWriter w, bool staffIsVisible)
 {
     if(_isVisible && staffIsVisible)
     {
         w.SvgStartGroup(null, "clefChange" + SvgScore.UniqueID_Number);
         base.WriteSVG(w, staffIsVisible);
         w.SvgEndGroup();
     }
 }
Esempio n. 7
0
        public override void WriteSVG(SvgWriter w, bool staffIsVisible)
        {
            if(staffIsVisible && ChordMetrics.BeamBlock != null)
                ChordMetrics.BeamBlock.WriteSVG(w);

            w.SvgStartGroup("outputChord", "outputChord" + SvgScore.UniqueID_Number);
            if(staffIsVisible)
            {
                w.WriteAttributeString("score", "alignmentX", null, ChordMetrics.OriginX.ToString(M.En_USNumberFormat));
            }

            _midiChordDef.WriteSvg(w);

            if(staffIsVisible)
            {
                w.SvgStartGroup(null, "graphics" + SvgScore.UniqueID_Number);
                ChordMetrics.WriteSVG(w);
                w.SvgEndGroup();
            }

            w.SvgEndGroup();
        }
Esempio n. 8
0
        public override void WriteSVG(SvgWriter w, bool staffIsVisible, int systemNumber, int staffNumber, int voiceNumber)
        {
            w.SvgStartGroup("outputVoice");

            if(MasterVolume != null) // is non-null only in the first system
            {
                w.WriteAttributeString("score", "midiChannel", null, MidiChannel.ToString());
                w.WriteAttributeString("score", "masterVolume", null, MasterVolume.ToString());
            }

            base.WriteSVG(w, staffIsVisible);
            w.SvgEndGroup(); // outputVoice
        }
Esempio n. 9
0
        /// <summary>
        /// Writes out the (invisible) voices
        /// </summary>
        public override void WriteSVG(SvgWriter w, int systemNumber, int staffNumber)
        {
            w.SvgStartGroup("outputStaff");
            w.WriteAttributeString("score", "invisible", null, "1");

            int voiceNumber = 1;
            foreach(Voice voice in Voices)
            {
                voice.WriteSVG(w, false, systemNumber, staffNumber, voiceNumber++);
            }

            w.SvgEndGroup(); // outputStaff
        }
Esempio n. 10
0
        /// <summary>
        /// Writes out the noteObjects, and possibly the performanceOptions for an InputVoice.
        /// </summary>
        public override void WriteSVG(SvgWriter w, bool staffIsVisible, int systemNumber, int staffNumber, int voiceNumber)
        {
            w.SvgStartGroup("inputVoice", "sys" + systemNumber.ToString() + "staff" + staffNumber.ToString() + "voice" + voiceNumber.ToString());

            if(_midiChannel < byte.MaxValue)
            {
                // This can only happen on the first system in the score. See SetMidiChannel(...) below.
                w.WriteAttributeString("score", "midiChannel", null, MidiChannel.ToString());
            }

            base.WriteSVG(w, true); // input voices are always visible

            w.SvgEndGroup(); // inputVoice
        }
Esempio n. 11
0
        public override void WriteSVG(SvgWriter w, bool staffIsVisible)
        {
            if(LocalCautionaryChordDef == null)
            {
                w.SvgStartGroup("rest", "rest" + SvgScore.UniqueID_Number);

                Debug.Assert(_msDuration > 0);
                if(staffIsVisible)
                {
                    w.WriteAttributeString("score", "alignmentX", null, ((Metrics.Left + Metrics.Right) / 2).ToString(M.En_USNumberFormat));
                }
                w.WriteAttributeString("score", "msDuration", null, _msDuration.ToString());

                if(this.Metrics != null && staffIsVisible)
                    this.Metrics.WriteSVG(w);

                w.SvgEndGroup();
            }
        }
Esempio n. 12
0
        public override void WriteSVG(SvgWriter w, bool staffIsVisible)
        {
            if(ChordMetrics.BeamBlock != null)
                ChordMetrics.BeamBlock.WriteSVG(w);

            w.SvgStartGroup("inputChord");

            Debug.Assert(_msDuration > 0);

            if(staffIsVisible)
            {
                w.WriteAttributeString("score", "alignmentX", null, ChordMetrics.OriginX.ToString(M.En_USNumberFormat));
            }
            w.WriteAttributeString("score", "msDuration", null, _msDuration.ToString());

            _inputChordDef.WriteSvg(w);

            w.SvgStartGroup("graphics");
            ChordMetrics.WriteSVG(w);
            w.SvgEndGroup();

            w.SvgEndGroup();
        }
Esempio n. 13
0
 public override void WriteSVG(SvgWriter w)
 {
     w.SvgStartGroup(null, "beamBlock" + SvgScore.UniqueID_Number);
     foreach(Beam beam in Beams)
     {
         if(!(beam is QuaverBeam))
         {
             float topLeft = 0F;
             float topRight = 0F;
             if(_stemDirection == VerticalDir.down)
             {
                 topLeft = beam.LeftTopY + _beamThickness;
                 topRight = beam.RightTopY + _beamThickness;
             }
             else
             {
                 topLeft = beam.LeftTopY - _beamThickness;
                 topRight = beam.RightTopY - _beamThickness;
             }
             w.SvgBeam("beam" + SvgScore.UniqueID_Number, beam.LeftX, beam.RightX, topLeft, topRight, _beamThickness * 1.5F, 0F, 0.65F);
         }
         w.SvgBeam("beam" + SvgScore.UniqueID_Number, beam.LeftX, beam.RightX, beam.LeftTopY, beam.RightTopY, _beamThickness, _strokeThickness, 1.0F);
     }
     w.SvgEndGroup();
 }
Esempio n. 14
0
 public void WriteSVG(SvgWriter w, string id)
 {
     w.SvgStartGroup(null);
     foreach(Metrics metrics in MetricsList)
     {
         metrics.WriteSVG(w);
     }
     w.SvgEndGroup();
 }
Esempio n. 15
0
        /// <summary>
        /// Writes out all the SVGSystem's staves. 
        /// </summary>
        /// <param name="w"></param>
        public void WriteSVG(SvgWriter w, int systemNumber, PageFormat pageFormat)
        {
            w.SvgStartGroup("system");

            for(int staffIndex = 0; staffIndex < Staves.Count; staffIndex++)
            {
                Staves[staffIndex].WriteSVG(w, systemNumber, staffIndex + 1);
            }

            w.SvgStartGroup("staffConnectors");

            WriteConnectors(w, systemNumber, pageFormat);

            w.SvgEndGroup(); // connectors

            w.SvgEndGroup(); // system
        }