当前位置: 首页>>代码示例>>C#>>正文


C# IRenderable.RenderOn方法代码示例

本文整理汇总了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);
        }
开发者ID:mrGyzzz,项目名称:Certus,代码行数:21,代码来源:Texture.cs

示例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);
        }
开发者ID:mrGyzzz,项目名称:Certus,代码行数:16,代码来源:Renderer.cs


注:本文中的IRenderable.RenderOn方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。