Ejemplo n.º 1
0
        /// <summary>
        ///     Draws a texture fitting it within the given color and bounds with the method specified by aspect
        /// </summary>
        /// <param name="textureRef"></param>
        /// <param name="bounds">Where to draw the texture</param>
        /// <param name="aspect">How to fit a texture in the bounds if the size differs</param>
        /// <param name="color">Color to use</param>
        public static void DrawTexture(CTextureRef textureRef, SRectF bounds, EAspect aspect, SColorF color)
        {
            if (textureRef == null)
            {
                return;
            }

            SRectF rect = CHelper.FitInBounds(bounds, textureRef.OrigAspect, aspect);

            DrawTexture(textureRef, rect, color, bounds);
        }