示例#1
0
        private void GenerateAvaliableLinePositions()
        {
            int    lowestPositionIndex  = -30;
            int    highestPositionIndex = 40;
            double halfLineSpacing      = StaffSpace.MMToWPFUnit() / 2;

            // length to point in center between staff lines
            for (int i = lowestPositionIndex; i <= highestPositionIndex; i++)
            {
                avaliableIndexLinePositions.Add(i, i * halfLineSpacing);
            }
        }
示例#2
0
        private void GenerateStaffLine()
        {
            double line         = staffHeight.MMToWPFUnit();
            double spaceBetween = StaffSpace.MMToWPFUnit();

            staffLineCoords = new Dictionary <int, double>();
            staffLineCoords.Add(0, 0);
            for (int i = 1; i < 5; i++)
            {
                staffLineCoords.Add(i, line);
                line -= spaceBetween;
            }
            staffLineCoords.Add(5, 0);
        }