Пример #1
0
        //---------------------------------------------------------------
        #endregion
        //---------------------------------------------------------------

        //---------------------------------------------------------------
        #region Methods
        //---------------------------------------------------------------
        /// <summary>
        /// Initializes the image with a given texture.
        /// </summary>
        /// <param name="texture">Texture to initialize image with.</param>
        protected void Init(ITexture2d texture)
        {
            if (texture == null)
            {
                throw new ArgumentNullException("texture");
            }
            quad         = (IExtendedQuad)QuadFactory.Instance.CreateQuad();
            quad.Texture = texture;
            quad.Size    = quad.TextureSize;
        }
Пример #2
0
 /// <summary>
 /// Creates a new instance of an <see cref="Image"/>.
 /// </summary>
 /// <param name="quad">Quad to visualize in image.</param>
 public Image(IExtendedQuad quad)
 {
     this.quad = quad;
 }