Show / Hide Table of Contents

Class LinearGradientBrush

Implement linear gradient brush

Inheritance
System.Object
DependencyObject
Freezable
Brush
LinearGradientBrush
Inherited Members
Brush.OpacityProperty
Brush.Opacity
Brush.OnOpacityChanged(DependencyPropertyChangedEventArgs)
Freezable.IsFrozen
Freezable.Parent
Freezable.Changed
Freezable.Freeze()
Freezable.OnPropertyChanged(DependencyProperty)
DependencyObject.DependencyObjectType
DependencyObject.IsSealed
DependencyObject.Equals(Object)
DependencyObject.GetHashCode()
DependencyObject.ClearValue(DependencyProperty)
DependencyObject.GetValue(DependencyProperty)
DependencyObject.ReadLocalValue(DependencyProperty)
DependencyObject.GetLocalValueEnumerator()
DependencyObject.SetValue(DependencyProperty, Object)
DependencyObject.CoerceValue(DependencyProperty)
DependencyObject.SetBinding(DependencyProperty, Binding)
DependencyObject.SetResourceReference(DependencyProperty, Object)
Namespace: EmptyKeys.UserInterface.Media
Assembly: EmptyKeys.UserInterface.dll
Syntax
public class LinearGradientBrush : Brush

Constructors

LinearGradientBrush()

Initializes a new instance of the LinearGradientBrush class.

Declaration
public LinearGradientBrush()

LinearGradientBrush(ColorW, ColorW, PointF, PointF)

Initializes a new instance of the LinearGradientBrush class.

Declaration
public LinearGradientBrush(ColorW startColor, ColorW endColor, PointF startPoint, PointF endPoint)
Parameters
Type Name Description
EmptyKeys.UserInterface.Media.ColorW startColor

The start color.

EmptyKeys.UserInterface.Media.ColorW endColor

The end color.

EmptyKeys.UserInterface.PointF startPoint

The start point.

EmptyKeys.UserInterface.PointF endPoint

The end point.

Fields

EndPointProperty

The end point property

Declaration
public static readonly DependencyProperty EndPointProperty
Field Value
Type Description
DependencyProperty

GradientStopsProperty

The gradient stops property

Declaration
public static readonly DependencyProperty GradientStopsProperty
Field Value
Type Description
DependencyProperty

SpreadMethodProperty

The spread method property

Declaration
public static readonly DependencyProperty SpreadMethodProperty
Field Value
Type Description
DependencyProperty

StartPointProperty

The start point property

Declaration
public static readonly DependencyProperty StartPointProperty
Field Value
Type Description
DependencyProperty

Properties

EndPoint

Gets or sets the end point.

Declaration
public PointF EndPoint { get; set; }
Property Value
Type Description
EmptyKeys.UserInterface.PointF

The end point.

GradientStops

Gets the gradient stops.

Declaration
public ObservableCollection<GradientStop> GradientStops { get; }
Property Value
Type Description
System.Collections.ObjectModel.ObservableCollection<EmptyKeys.UserInterface.Media.GradientStop>

The gradient stops.

SpreadMethod

Gets or sets the spread method.

Declaration
public GradientSpreadMethod SpreadMethod { get; set; }
Property Value
Type Description
EmptyKeys.UserInterface.Media.GradientSpreadMethod

The spread method.

StartPoint

Gets or sets the start point.

Declaration
public PointF StartPoint { get; set; }
Property Value
Type Description
EmptyKeys.UserInterface.PointF

The start point.

Methods

Draw(TextureBase, Renderer, Double, PointF, Size, Single)

Draws the specified texture.

Declaration
public override void Draw(TextureBase texture, Renderer renderer, double elapsedGameTime, PointF position, Size renderSize, float opacity)
Parameters
Type Name Description
EmptyKeys.UserInterface.Media.TextureBase texture

The texture.

EmptyKeys.UserInterface.Renderers.Renderer renderer

The renderer.

System.Double elapsedGameTime

The elapsed game time.

EmptyKeys.UserInterface.PointF position

The position.

EmptyKeys.UserInterface.Size renderSize

Size of the render.

System.Single opacity

The opacity.

Overrides
Brush.Draw(TextureBase, Renderer, Double, PointF, Size, Single)

DrawGeometry(GeometryBuffer, TextureBase, Renderer, Double, PointF, Single)

Draws the geometry - used with shapes and geometry

Declaration
public override void DrawGeometry(GeometryBuffer buffer, TextureBase texture, Renderer renderer, double elapsedGameTime, PointF position, float opacity)
Parameters
Type Name Description
EmptyKeys.UserInterface.Media.GeometryBuffer buffer

The buffer.

EmptyKeys.UserInterface.Media.TextureBase texture

The texture.

EmptyKeys.UserInterface.Renderers.Renderer renderer

The renderer.

System.Double elapsedGameTime

The elapsed game time.

EmptyKeys.UserInterface.PointF position

The position.

System.Single opacity

The opacity.

Overrides
Brush.DrawGeometry(GeometryBuffer, TextureBase, Renderer, Double, PointF, Single)
Back to top Generated by DocFX