Exemplo n.º 1
0
 public FormedChild(RelativeViewport parent, double rateOfPos, double rateOfLength, bool isHorizontal, bool isStatic) : base(isHorizontal)
 {
     this.parent  = parent ?? throw new ArgumentNullException();
     RateOfPos    = rateOfPos;
     RateOfLength = rateOfLength;
     IsStatic     = isStatic;
 }
Exemplo n.º 2
0
 public FreeChild(RelativeViewport parent, double rateOfX, double rateOfY, double rateOfWidth, double rateOfHeight)
 {
     this.parent  = parent;
     RateOfX      = rateOfX;
     RateOfY      = rateOfY;
     RateOfWidth  = rateOfWidth;
     RateOfHeight = rateOfHeight;
 }
Exemplo n.º 3
0
 public Game1()
 {
     graphics = new GraphicsDeviceManager(this);
     graphics.PreferredBackBufferWidth  = 1920;
     graphics.PreferredBackBufferHeight = 1080;
     Content.RootDirectory = "Content";
     root = new RelativeViewport.Root(
         graphics.PreferredBackBufferWidth,
         graphics.PreferredBackBufferHeight,
         false);
     musicScore = new MusicScore(this, root);
     Components.Add(musicScore);
 }
Exemplo n.º 4
0
 public MusicScore(Game game, RelativeViewport viewport) : base(game, viewport)
 {
     measuresG             = new List <List <MeasurableElement> >();
     measuresF             = new List <List <MeasurableElement> >();
     viewport.IsHorizontal = false;
     staffNotationG        = new StaffNotation[4];
     staffNotationF        = new StaffNotation[4];
     for (int i = 0; i < 4; i++)
     {
         RelativeViewport vG = viewport.AddFormedChild(0.25, true, false);
         RelativeViewport vF = viewport.AddFormedChild(0.25, true, false);
         staffNotationG[i] = new StaffNotation(Clef.ClefType.G, game, vG);
         staffNotationF[i] = new StaffNotation(Clef.ClefType.F, game, vF);
         game.Components.Add(staffNotationG[i]);
         game.Components.Add(staffNotationF[i]);
     }
 }
Exemplo n.º 5
0
 public SeparatedComponent(Game game, RelativeViewport viewport) : base(game)
 {
     this.Viewport = viewport;
 }