Inheritance: ShapeTextureProvider
Example #1
0
        public void DrawShapeGradientFill(Shape shape, Rectangle?destinationRectangle, Color colorFrom, Color colorTo, bool vertical, float rotation = 0f, Vector2?origin = null, SpriteEffects effects = SpriteEffects.None)
        {
            if (_gradientTextureProvider == null)
            {
                _gradientTextureProvider = new GradientShapeTextureProvider(this);
            }

            DrawShape(new ShapeFillData(shape, _gradientTextureProvider, new object[] { colorFrom, colorTo, vertical }), destinationRectangle, Color.White, rotation, origin, effects);
        }
Example #2
0
        public void DrawShapeGradientFill(Shape shape, Rectangle? destinationRectangle, Color colorFrom, Color colorTo, bool vertical, float rotation = 0f, Vector2? origin = null, SpriteEffects effects = SpriteEffects.None)
        {
            if (_gradientTextureProvider == null)
                _gradientTextureProvider = new GradientShapeTextureProvider(this);

            DrawShape(new ShapeFillData(shape, _gradientTextureProvider, new object[] { colorFrom, colorTo, vertical }), destinationRectangle, Color.White, rotation, origin, effects);
        }