Search Results for

    Show / Hide Table of Contents

    Class LinearGradientBrush

    Implementation of IBrush for linear color gradient (made of 2 color).

    Inheritance
    System.Object
    LinearGradientBrush
    Implements
    IBrush
    Namespace: FlaxEngine.GUI
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    public sealed class LinearGradientBrush : Object, IBrush

    Constructors

    LinearGradientBrush()

    Initializes a new instance of the LinearGradientBrush class.

    Declaration
    public LinearGradientBrush()

    LinearGradientBrush(Color, Color)

    Initializes a new instance of the LinearGradientBrush struct.

    Declaration
    public LinearGradientBrush(Color startColor, Color endColor)
    Parameters
    Color startColor

    The start color.

    Color endColor

    The end color.

    Fields

    EndColor

    The brush end color.

    Declaration
    [EditorOrder(1)]
    [Tooltip("The brush end color.")]
    public Color EndColor
    Field Value
    Color

    StartColor

    The brush start color.

    Declaration
    [EditorOrder(0)]
    [ExpandGroups]
    [Tooltip("The brush start color.")]
    public Color StartColor
    Field Value
    Color

    Properties

    Size

    Gets the size of the image brush in pixels (if relevant).

    Declaration
    public Float2 Size { get; }
    Property Value
    Float2

    Implements
    IBrush.Size

    Methods

    Draw(Rectangle, Color)

    Draws the specified image using Render2D graphics backend.

    Declaration
    public void Draw(Rectangle rect, Color color)
    Parameters
    Rectangle rect

    The draw area rectangle.

    Color color

    The color.

    Implements
    IBrush.Draw(Rectangle, Color)

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.DeepClone<T>(T)
    Extensions.RawClone<T>(T)

    See Also

    IBrush
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat