コード例 #1
0
ファイル: BeamBlock.cs プロジェクト: suvjunmd/Moritz
 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();
 }