protected override void DrawSelf(SpriteBatch spriteBatch) { if (ScaleToFit) { spriteBatch.Draw(ImageTexture, GetDimensions().ToRectangle(), OverlayColor * Opacity); return; } Vector2 size = ImageTexture.Size(); Vector2 topLeft = GetDimensions().Position() + size * (1f - Scale) / 2f; spriteBatch.Draw(ImageTexture, topLeft, null, OverlayColor * Opacity, ImageRotation, Vector2.Zero, Scale, SpriteEffects.None, 0f); }