﻿using System.Drawing;

namespace Certus.Resource.Video
{

    /// <summary>
    /// Defines a renderable item.
    /// </summary>
    public interface IRenderable
    {

        /// <summary>
        /// Gets the width in pixels of the item.
        /// </summary>
        /// <value>The width in pixels of the item.</value>
        int Width
        {
            get;
        }
        /// <summary>
        /// Gets the height in pixels of the item.
        /// </summary>
        /// <value>The height in pixels of the item.</value>
        int Height
        {
            get;
        }

        /// <summary>
        /// Renders the item onto the specified graphics at the specified coordinates.
        /// </summary>
        /// <param name="graphics">The <see cref="System.Drawing.Graphics"/> to render on.</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 graphics.</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 graphics.</param>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown when 'graphics' is null.
        /// </exception>
        void RenderOn(Graphics graphics, int x, int y);

    }

}
