Class LinearGradientBrush
Represents a linear gradient brush used with a Graphics surface.
Inherited Members
Namespace: GameOverlay.Drawing
Assembly: GameOverlay.dll
Syntax
public class LinearGradientBrush : IDisposable, IBrush
Constructors
| Improve this Doc View SourceLinearGradientBrush(Graphics, Color[])
Initializes a new LinearGradientBrush using the target device and an Color[].
Declaration
public LinearGradientBrush(Graphics device, params Color[] colors)
Parameters
Type | Name | Description |
---|---|---|
Graphics | device | The Graphics device. |
Color[] | colors | The colors |
LinearGradientBrush(RenderTarget, Color[])
Initializes a new LinearGradientBrush using the target device and an Color[].
Declaration
public LinearGradientBrush(RenderTarget device, params Color[] colors)
Parameters
Type | Name | Description |
---|---|---|
SharpDX.Direct2D1.RenderTarget | device | The Graphics device. |
Color[] | colors | The colors |
Properties
| Improve this Doc View SourceBrush
Gets or sets the underlying Brush.
Declaration
public Brush Brush { get; set; }
Property Value
Type | Description |
---|---|
SharpDX.Direct2D1.Brush |
End
Gets or sets the end point of this LineatGradientBrush.
Declaration
public Point End { get; set; }
Property Value
Type | Description |
---|---|
Point |
Start
Gets or sets the start point of this LineatGradientBrush.
Declaration
public Point Start { get; set; }
Property Value
Type | Description |
---|---|
Point |
Methods
| Improve this Doc View SourceDispose()
Releases all resources used by this LinearGradientBrush.
Declaration
public void Dispose()
Dispose(Boolean)
Releases all resources used by this LinearGradientBrush.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
Boolean | disposing | A Boolean value indicating whether this is called from the destructor. |
Equals(LinearGradientBrush)
Returns a value indicating whether two specified instances of LinearGradientBrush represent the same value.
Declaration
public bool Equals(LinearGradientBrush value)
Parameters
Type | Name | Description |
---|---|---|
LinearGradientBrush | value | An object to compare to this instance. |
Returns
Type | Description |
---|---|
Boolean | true if |
Equals(LinearGradientBrush, LinearGradientBrush)
Returns a value indicating whether two specified instances of LinearGradientBrush represent the same value.
Declaration
public static bool Equals(LinearGradientBrush left, LinearGradientBrush right)
Parameters
Type | Name | Description |
---|---|---|
LinearGradientBrush | left | The first object to compare. |
LinearGradientBrush | right | The second object to compare. |
Returns
Type | Description |
---|---|
Boolean | true if |
Equals(Object)
Returns a value indicating whether this instance and a specified Object represent the same type and value.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The object to compare with this instance. |
Returns
Type | Description |
---|---|
Boolean | true if |
Overrides
| Improve this Doc View SourceFinalize()
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
Declaration
protected void Finalize()
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A 32-bit signed integer hash code. |
Overrides
| Improve this Doc View SourceSetRange(Point, Point)
Sets the range where the gradient gets applied.
Declaration
public void SetRange(Point start, Point end)
Parameters
Type | Name | Description |
---|---|---|
Point | start | A Point structure inclduing the coordinates for the start point of this LinearGradientBrush. |
Point | end | A Point structure inclduing the coordinates for the end point of this LinearGradientBrush. |
SetRange(Single, Single, Single, Single)
Sets the range where the gradient gets applied.
Declaration
public void SetRange(float startX, float startY, float endX, float endY)
Parameters
Type | Name | Description |
---|---|---|
Single | startX | The x-coordinate of the start point of this LinearGradientBrush. |
Single | startY | The y-coordinate of the start point of this LinearGradientBrush. |
Single | endX | The x-coordinate of the end point of this LinearGradientBrush. |
Single | endY | The y-coordinate of the end point of this LinearGradientBrush. |
ToString()
Converts this LinearGradientBrush instance to a human-readable string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A string representation of this LinearGradientBrush. |