/// <summary> /// Renders the specified user interface. /// </summary> /// <param name="userInterface">The user interface to render.</param> public void Render(UserInterface userInterface) { if (userInterface == null) throw new ArgumentNullException("userInterface"); int y = 0; foreach (Element element in userInterface.Container) { IElementVisual visual = new DefaultVisual(); Vector2 size = visual.Measure(this, element); visual.Render(this, element, 0, y, (int)size.X, (int)size.Y); y += (int)size.Y; } Flush(); }
/// <summary> /// Renders the specified user interface. /// </summary> /// <param name="userInterface">The user interface to render.</param> public void Render(UserInterface userInterface) { if (userInterface == null) { throw new ArgumentNullException("userInterface"); } int y = 0; foreach (Element element in userInterface.Container) { IElementVisual visual = new DefaultVisual(); Vector2 size = visual.Measure(this, element); visual.Render(this, element, 0, y, (int)size.X, (int)size.Y); y += (int)size.Y; } Flush(); }