Show / Hide Table of Contents

Class AbstractBrush

Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.

Inheritance
object
AbstractBindable
AbstractDecoratable<IBrushDecorator>
AbstractBrush
SolidColorBrush
TextureBrush
Implements
IBindable
IBrush
IDecoratable<IBrushDecorator>
IDecoratable
INotifyPropertyChanged
Inherited Members
AbstractDecoratable<IBrushDecorator>.Decorators
AbstractDecoratable<IBrushDecorator>.AddDecorator(IBrushDecorator)
AbstractDecoratable<IBrushDecorator>.RemoveDecorator(IBrushDecorator)
AbstractDecoratable<IBrushDecorator>.RemoveAllDecorators()
AbstractBindable.PropertyChanged
AbstractBindable.RequiresUpdate<T>(ref T, T)
AbstractBindable.SetProperty<T>(ref T, T, string)
AbstractBindable.OnPropertyChanged(string)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: RGB.NET.Core
Assembly: RGB.NET.Core.dll
Syntax
public abstract class AbstractBrush : AbstractDecoratable<IBrushDecorator>, IBindable, IBrush, IDecoratable<IBrushDecorator>, IDecoratable, INotifyPropertyChanged

Constructors

| Edit this page View Source

AbstractBrush(float, float)

Initializes a new instance of the AbstractBrush class.

Declaration
protected AbstractBrush(float brightness = 1, float opacity = 1)
Parameters
Type Name Description
float brightness

The overall percentage brightness of the brush. (default: 1.0)

float opacity

The overall percentage opacity of the brush. (default: 1.0)

Properties

| Edit this page View Source

Brightness

Gets or sets the overall percentage brightness of the IBrush.

Declaration
public float Brightness { get; set; }
Property Value
Type Description
float
| Edit this page View Source

CalculationMode

Gets or sets the calculation mode used for the rectangle/points used for color-selection in brushes.

Declaration
public RenderMode CalculationMode { get; set; }
Property Value
Type Description
RenderMode
| Edit this page View Source

IsEnabled

Gets or sets if the IBrush is enabled and will be drawn on an update.

Declaration
public bool IsEnabled { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

Opacity

Gets or sets the overall percentage opacity of the IBrush.

Declaration
public float Opacity { get; set; }
Property Value
Type Description
float

Methods

| Edit this page View Source

ApplyDecorators(in Rectangle, in RenderTarget, ref Color)

Applies all attached and enabled decorators to the brush.

Declaration
protected virtual void ApplyDecorators(in Rectangle rectangle, in RenderTarget renderTarget, ref Color color)
Parameters
Type Name Description
Rectangle rectangle

The rectangle in which the brush should be drawn.

RenderTarget renderTarget

The target (key/point) from which the color should be taken.

Color color

The Color to be modified.

| Edit this page View Source

FinalizeColor(ref Color)

Finalizes the color by appliing the overall brightness and opacity.

Declaration
protected virtual void FinalizeColor(ref Color color)
Parameters
Type Name Description
Color color

The color to finalize.

| Edit this page View Source

GetColorAtPoint(in Rectangle, in RenderTarget)

Gets the color at an specific point assuming the brush is drawn into the specified rectangle.

Declaration
protected abstract Color GetColorAtPoint(in Rectangle rectangle, in RenderTarget renderTarget)
Parameters
Type Name Description
Rectangle rectangle

The rectangle in which the brush should be drawn.

RenderTarget renderTarget

The target (key/point) from which the color should be taken.

Returns
Type Description
Color

The color at the specified point.

| Edit this page View Source

Render(Rectangle, IEnumerable<RenderTarget>)

Renders the brush to the specified list of RenderTarget.

Declaration
public virtual IEnumerable<(RenderTarget renderTarget, Color color)> Render(Rectangle rectangle, IEnumerable<RenderTarget> renderTargets)
Parameters
Type Name Description
Rectangle rectangle

The bounding box the brush is rendered in.

IEnumerable<RenderTarget> renderTargets

The targets to render to.

Returns
Type Description
IEnumerable<(RenderTarget renderTarget, Color color)>

A enumerable containing the rendered Color for each RenderTarget.

Implements

IBindable
IBrush
IDecoratable<T>
IDecoratable
INotifyPropertyChanged
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX