Ejemplo n.º 1
0
        public MusicModule()
        {
            var metrics = new StavesMetrics(halfSpace: 8.0, staffLineThickness: 1.5);

            //var layout = CreateTestLayoutEngine(metrics);
            Layout       = CreateLayoutEngine(metrics);
            ScoreBuilder = CreateScoreBuilder();
        }
Ejemplo n.º 2
0
        ScoreLayoutAlgorithm CreateLayoutEngine(StavesMetrics metrics)
        {
            var staffLinesGeometryBuilder = new StaffLinesLayoutAlgorithm();
            var ledgerLinesComputation    = new LedgerLinesComputation();
            var beatGroupLayoutAlgorithm  = new BeatGroupLayoutAlgorithm();
            var beatGroupSpanComputation  = new BeatGroupSpanComputation(metrics);
            var horizontalLayout          = new HorizontalLayoutAlgorithm(metrics);
            var verticalLayout            = new VerticalLayoutAlgorithm(metrics);
            var stemLayout = new StemsLayoutAlgorithm(metrics, verticalLayout);

            return(new ScoreLayoutAlgorithm(
                       metrics,
                       staffLinesGeometryBuilder,
                       ledgerLinesComputation,
                       beatGroupLayoutAlgorithm,
                       beatGroupSpanComputation,
                       horizontalLayout,
                       verticalLayout,
                       stemLayout));
        }
Ejemplo n.º 3
0
 TestLayout CreateTestLayout(StavesMetrics metrics)
 {
     return(new TestLayout(metrics));
 }