Esempio n. 1
0
        protected override void DrawWidget(IBatchedDrawingService drawingService)
        {
            var texture = Texture;

            if (texture == null)
            {
                return;
            }

            var targetRect = CalculateImageSize(ContentRect);

            drawingService.DrawImage(texture, targetRect, TextureColor);
        }
 public static void DrawImage(this IBatchedDrawingService ds, IUITexture image, Vector2 position, Color tint)
 {
     ds.DrawImage(image, new Rectangle((int)position.X, (int)position.Y, image.Width, image.Height), tint);
 }