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; }
public FreeChild(RelativeViewport parent, double rateOfX, double rateOfY, double rateOfWidth, double rateOfHeight) { this.parent = parent; RateOfX = rateOfX; RateOfY = rateOfY; RateOfWidth = rateOfWidth; RateOfHeight = rateOfHeight; }
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); }
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]); } }
public SeparatedComponent(Game game, RelativeViewport viewport) : base(game) { this.Viewport = viewport; }