本文整理汇总了C#中IRenderable.RenderOn方法的典型用法代码示例。如果您正苦于以下问题:C# IRenderable.RenderOn方法的具体用法?C# IRenderable.RenderOn怎么用?C# IRenderable.RenderOn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IRenderable
的用法示例。
在下文中一共展示了IRenderable.RenderOn方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Render
/// <summary>
/// Renders the specified item onto the texture at the specified coordinates.
/// </summary>
/// <param name="item">The <see cref="Certus.Resource.Video.IRenderable"/> to render.</param>
/// <param name="x">The x-coordinate of the lower-left corner of the item to render, relative to the lower-left corner of the texture.</param>
/// <param name="y">The y-coordinate of the lower-left corner of the item to render, relative to the lower-left corner of the texture.</param>
/// <exception cref="System.ArgumentNullException">
/// Thrown when 'item' is null.
/// </exception>
/// <exception cref="System.InvalidOperationException">
/// Thrown when the texture does not support editing.
/// </exception>
public void Render(IRenderable item, int x, int y)
{
if (!this.IsEditable)
throw new InvalidOperationException("The texture does not support editing.");
if (item == null)
throw new ArgumentNullException(nameof(item));
item.RenderOn(this.m_Graphics, x, y);
}
示例2: Render
/// <summary>
/// Renders the specified item onto the canvas at the specified coordinates.
/// </summary>
/// <param name="item">The <see cref="Certus.Resource.Video.IRenderable"/> to render.</param>
/// <param name="x">The x-coordinate of the lower-left corner of the item to render, relative to the lower-left corner of the window.</param>
/// <param name="y">The y-coordinate of the lower-left corner of the item to render, relative to the lower-left corner of the window.</param>
/// <exception cref="System.ArgumentNullException">
/// Thrown when 'item' is null.
/// </exception>
public void Render(IRenderable item, int x, int y)
{
if (item == null)
throw new ArgumentNullException(nameof(item));
item.RenderOn(this.m_Graphics, x, y);
}