Пример #1
0
 public ScoreLayoutAlgorithm(
     StavesMetrics metrics,
     StaffLinesLayoutAlgorithm staffLinesLayout,
     LedgerLinesComputation ledgerLinesComputation,
     BeatGroupLayoutAlgorithm beatGroupLayoutAlgorithm,
     BeatGroupSpanComputation beatGroupSpanComputation,
     HorizontalLayoutAlgorithm horizontalLayout,
     VerticalLayoutAlgorithm verticalLayout,
     StemsLayoutAlgorithm stemsLayout)
 {
     Metrics                  = metrics;
     StaffLinesLayout         = staffLinesLayout;
     LedgerLinesComputation   = ledgerLinesComputation;
     VerticalLayout           = verticalLayout;
     StemsLayout              = stemsLayout;
     BeatGroupLayoutAlgorithm = beatGroupLayoutAlgorithm;
     BeatGroupSpanComputation = beatGroupSpanComputation;
     HorizontalLayout         = horizontalLayout;
 }
Пример #2
0
        public IEnumerable <LineObject> CreateGrandStaffLines(StavesMetrics metrics)
        {
            var treebleStaffOrigin = metrics.Origin;
            var treebleLines       = CreateLines(
                treebleStaffOrigin,
                metrics.StaffLinesDistance,
                metrics.StaffLinesLength,
                Const.LinesInStaff,
                metrics.StaffLineThickness);
            var bassStaffOrigin = treebleStaffOrigin + new Vector(0.0, metrics.GrandStaffOffset);
            var bassLines       = CreateLines(
                bassStaffOrigin,
                metrics.StaffLinesDistance,
                metrics.StaffLinesLength,
                Const.LinesInStaff,
                metrics.StaffLineThickness);

            return(treebleLines.Concat(bassLines));
        }
Пример #3
0
 public IReadOnlyList <LineObject> CreateLedgerLines(
     StavesMetrics metrics,
     IReadOnlyDictionary <Beat, (GrandStaffLedgerLines, bool)> ledgerLinesForBeats,
Пример #4
0
 public TestLayout(StavesMetrics metrics)
 {
     Metrics = metrics;
 }
Пример #5
0
 public BeatGroupSpanComputation(StavesMetrics metrics)
 {
     Metrics = metrics;
 }
Пример #6
0
 public StemsLayoutAlgorithm(StavesMetrics metrics, VerticalLayoutAlgorithm verticalLayout)
 {
     Metrics        = metrics;
     VerticalLayout = verticalLayout;
 }
Пример #7
0
 public HorizontalLayoutAlgorithm(StavesMetrics metrics)
 {
     Metrics = metrics;
 }
Пример #8
0
 public VerticalLayoutAlgorithm(StavesMetrics metrics)
 {
     Metrics = metrics;
 }