コード例 #1
0
ファイル: Texture.cs プロジェクト: mrGyzzz/Certus
        /// <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
0
ファイル: Renderer.cs プロジェクト: mrGyzzz/Certus
        /// <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);
        }