public Render ( |
||
renderer | The renderer. | |
element | The element. | |
x | int | The X coordinate (in pixels) of the upper left corner of the region the element should be rendered to. |
y | int | The Y coordinate (in pixels) of the upper left corner of the region the element should be rendered to. |
width | int | The width (in pixels) of the region the element should be rendered to. |
height | int | The height (in pixels) of the region the element should be rendered to. |
Результат | void |
/// <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(); }