Fixed some code issues

This commit is contained in:
DarthAffe committed 2017-09-05 14:02:12 +02:00
1 parent 2086b3729d
commit 8e212190ae
76 files changed
+375 -241

No files matched your search

+16 -10
View File
@@ -10,6 +10,7 @@ using RGB.NET.Core;
namespace RGB.NET.Brushes
{
/// <inheritdoc />
/// <summary>
/// Represents a brush drawing a conical gradient.
/// </summary>
@@ -27,6 +28,7 @@ namespace RGB.NET.Brushes
/// </summary>
public Point Center { get; set; } = new Point(0.5, 0.5);
/// <inheritdoc />
/// <summary>
/// Gets or sets the gradient drawn by the brush. If null it will default to full transparent.
/// </summary>
@@ -36,38 +38,42 @@ namespace RGB.NET.Brushes
#region Constructors
/// <inheritdoc />
/// <summary>
/// Initializes a new instance of the <see cref="ConicalGradientBrush"/> class.
/// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.ConicalGradientBrush" /> class.
/// </summary>
public ConicalGradientBrush()
{ }
/// <inheritdoc />
/// <summary>
/// Initializes a new instance of the <see cref="ConicalGradientBrush"/> class.
/// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.ConicalGradientBrush" /> class.
/// </summary>
/// <param name="gradient">The <see cref="IGradient"/> drawn by this <see cref="ConicalGradientBrush"/>.</param>
/// <param name="gradient">The <see cref="T:RGB.NET.Brushes.Gradients.IGradient" /> drawn by this <see cref="T:RGB.NET.Brushes.ConicalGradientBrush" />.</param>
public ConicalGradientBrush(IGradient gradient)
{
this.Gradient = gradient;
}
/// <inheritdoc />
/// <summary>
/// Initializes a new instance of the <see cref="ConicalGradientBrush"/> class.
/// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.ConicalGradientBrush" /> class.
/// </summary>
/// <param name="center">The center <see cref="Point"/> (as percentage in the range [0..1]).</param>
/// <param name="gradient">The <see cref="IGradient"/> drawn by this <see cref="ConicalGradientBrush"/>.</param>
/// <param name="center">The center <see cref="T:RGB.NET.Core.Point" /> (as percentage in the range [0..1]).</param>
/// <param name="gradient">The <see cref="T:RGB.NET.Brushes.Gradients.IGradient" /> drawn by this <see cref="T:RGB.NET.Brushes.ConicalGradientBrush" />.</param>
public ConicalGradientBrush(Point center, IGradient gradient)
{
this.Center = center;
this.Gradient = gradient;
}
/// <inheritdoc />
/// <summary>
/// Initializes a new instance of the <see cref="ConicalGradientBrush"/> class.
/// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.ConicalGradientBrush" /> class.
/// </summary>
/// <param name="center">The center <see cref="Point"/> (as percentage in the range [0..1]).</param>
/// <param name="origin">The origin (radian-angle) the <see cref="IBrush"/> is drawn to.</param>
/// <param name="gradient">The <see cref="IGradient"/> drawn by this <see cref="ConicalGradientBrush"/>.</param>
/// <param name="center">The center <see cref="T:RGB.NET.Core.Point" /> (as percentage in the range [0..1]).</param>
/// <param name="origin">The origin (radian-angle) the <see cref="T:RGB.NET.Core.IBrush" /> is drawn to.</param>
/// <param name="gradient">The <see cref="T:RGB.NET.Brushes.Gradients.IGradient" /> drawn by this <see cref="T:RGB.NET.Brushes.ConicalGradientBrush" />.</param>
public ConicalGradientBrush(Point center, float origin, IGradient gradient)
{
this.Center = center;
@@ -3,6 +3,7 @@ using RGB.NET.Core;
namespace RGB.NET.Brushes
{
/// <inheritdoc />
/// <summary>
/// Represents a basic gradient-brush.
/// </summary>
+12 -7
View File
@@ -11,6 +11,7 @@ using RGB.NET.Core;
namespace RGB.NET.Brushes
{
/// <inheritdoc />
/// <summary>
/// Represents a brush drawing a linear gradient.
/// </summary>
@@ -35,26 +36,29 @@ namespace RGB.NET.Brushes
#region Constructor
/// <inheritdoc />
/// <summary>
/// Initializes a new instance of the <see cref="LinearGradientBrush"/> class.
/// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.LinearGradientBrush" /> class.
/// </summary>
public LinearGradientBrush()
{ }
/// <inheritdoc />
/// <summary>
/// Initializes a new instance of the <see cref="LinearGradientBrush"/> class.
/// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.LinearGradientBrush" /> class.
/// </summary>
/// <param name="gradient">The <see cref="IGradient"/> drawn by this <see cref="LinearGradientBrush"/>.</param>
/// <param name="gradient">The <see cref="T:RGB.NET.Brushes.Gradients.IGradient" /> drawn by this <see cref="T:RGB.NET.Brushes.LinearGradientBrush" />.</param>
public LinearGradientBrush(IGradient gradient)
{
this.Gradient = gradient;
}
/// <inheritdoc />
/// <summary>
/// Initializes a new instance of the <see cref="LinearGradientBrush"/> class.
/// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.LinearGradientBrush" /> class.
/// </summary>
/// <param name="startPoint">The start <see cref="Point"/> (as percentage in the range [0..1]).</param>
/// <param name="endPoint">The end <see cref="Point"/> (as percentage in the range [0..1]).</param>
/// <param name="gradient">The <see cref="IGradient"/> drawn by this <see cref="LinearGradientBrush"/>.</param>
/// <param name="startPoint">The start <see cref="T:RGB.NET.Core.Point" /> (as percentage in the range [0..1]).</param>
/// <param name="endPoint">The end <see cref="T:RGB.NET.Core.Point" /> (as percentage in the range [0..1]).</param>
/// <param name="gradient">The <see cref="T:RGB.NET.Brushes.Gradients.IGradient" /> drawn by this <see cref="T:RGB.NET.Brushes.LinearGradientBrush" />.</param>
public LinearGradientBrush(Point startPoint, Point endPoint, IGradient gradient)
{
this.StartPoint = startPoint;
@@ -66,6 +70,7 @@ namespace RGB.NET.Brushes
#region Methods
/// <inheritdoc />
/// <summary>
/// Gets the color at an specific point assuming the brush is drawn into the given rectangle.
/// </summary>
@@ -9,6 +9,7 @@ using RGB.NET.Core;
namespace RGB.NET.Brushes
{
/// <inheritdoc />
/// <summary>
/// Represents a brush drawing a radial gradient around a center point.
/// </summary>
@@ -28,14 +29,16 @@ namespace RGB.NET.Brushes
#region Constructors
/// <inheritdoc />
/// <summary>
/// Initializes a new instance of the <see cref="RadialGradientBrush"/> class.
/// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.RadialGradientBrush" /> class.
/// </summary>
public RadialGradientBrush()
{ }
/// <inheritdoc />
/// <summary>
/// Initializes a new instance of the <see cref="RadialGradientBrush"/> class.
/// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.RadialGradientBrush" /> class.
/// </summary>
/// <param name="gradient">The gradient drawn by the brush.</param>
public RadialGradientBrush(IGradient gradient)
@@ -43,8 +46,9 @@ namespace RGB.NET.Brushes
this.Gradient = gradient;
}
/// <inheritdoc />
/// <summary>
/// Initializes a new instance of the <see cref="RadialGradientBrush"/> class.
/// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.RadialGradientBrush" /> class.
/// </summary>
/// <param name="center">The center point (as percentage in the range [0..1]).</param>
/// <param name="gradient">The gradient drawn by the brush.</param>
+4 -2
View File
@@ -5,6 +5,7 @@ using RGB.NET.Core;
namespace RGB.NET.Brushes
{
/// <inheritdoc />
/// <summary>
/// Represents a brush drawing only a single color.
/// </summary>
@@ -21,10 +22,11 @@ namespace RGB.NET.Brushes
#region Constructors
/// <inheritdoc />
/// <summary>
/// Initializes a new instance of the <see cref="SolidColorBrush"/> class.
/// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.SolidColorBrush" /> class.
/// </summary>
/// <param name="color">The <see cref="Color"/> drawn by this <see cref="SolidColorBrush"/>.</param>
/// <param name="color">The <see cref="P:RGB.NET.Brushes.SolidColorBrush.Color" /> drawn by this <see cref="T:RGB.NET.Brushes.SolidColorBrush" />.</param>
public SolidColorBrush(Color color)
{
this.Color = color;
@@ -1,10 +1,10 @@
using RGB.NET.Brushes.Gradients;
using RGB.NET.Core;
using RGB.NET.Core;
namespace RGB.NET.Brushes
{
/// <inheritdoc />
/// <summary>
/// Represents a basic decorator decorating a <see cref="IGradient"/>.
/// Represents a basic decorator decorating a <see cref="T:RGB.NET.Brushes.Gradients.IGradient" />.
/// </summary>
public interface IGradientDecorator : IDecorator
{ }
@@ -8,6 +8,7 @@ using RGB.NET.Core;
namespace RGB.NET.Brushes.Gradients
{
/// <inheritdoc />
/// <summary>
/// Represents a basic gradient.
/// </summary>
+1
View File
@@ -2,6 +2,7 @@
namespace RGB.NET.Brushes.Gradients
{
/// <inheritdoc />
/// <summary>
/// Represents a basic gradient.
/// </summary>
+11 -6
View File
@@ -6,6 +6,7 @@ using RGB.NET.Core;
namespace RGB.NET.Brushes.Gradients
{
/// <inheritdoc />
/// <summary>
/// Represents a linear interpolated gradient with n stops.
/// </summary>
@@ -13,24 +14,27 @@ namespace RGB.NET.Brushes.Gradients
{
#region Constructors
/// <inheritdoc />
/// <summary>
/// Initializes a new instance of the <see cref="LinearGradient"/> class.
/// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.Gradients.LinearGradient" /> class.
/// </summary>
public LinearGradient()
{ }
/// <inheritdoc />
/// <summary>
/// Initializes a new instance of the <see cref="LinearGradient"/> class.
/// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.Gradients.LinearGradient" /> class.
/// </summary>
/// <param name="gradientStops">The stops with which the gradient should be initialized.</param>
public LinearGradient(params GradientStop[] gradientStops)
: base(gradientStops)
{ }
/// <inheritdoc />
/// <summary>
/// Initializes a new instance of the <see cref="AbstractGradient"/> class.
/// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.Gradients.AbstractGradient" /> class.
/// </summary>
/// <param name="wrapGradient">Specifies whether the gradient should wrapp or not (see <see cref="AbstractGradient.WrapGradient"/> for an example of what this means).</param>
/// <param name="wrapGradient">Specifies whether the gradient should wrapp or not (see <see cref="P:RGB.NET.Brushes.Gradients.AbstractGradient.WrapGradient" /> for an example of what this means).</param>
/// <param name="gradientStops">The stops with which the gradient should be initialized.</param>
public LinearGradient(bool wrapGradient, params GradientStop[] gradientStops)
: base(wrapGradient, gradientStops)
@@ -40,11 +44,12 @@ namespace RGB.NET.Brushes.Gradients
#region Methods
/// <inheritdoc />
/// <summary>
/// Gets the linear interpolated <see cref="Color"/> at the given offset.
/// Gets the linear interpolated <see cref="T:RGB.NET.Core.Color" /> at the given offset.
/// </summary>
/// <param name="offset">The percentage offset to take the color from.</param>
/// <returns>The <see cref="Color"/> at the specific offset.</returns>
/// <returns>The <see cref="T:RGB.NET.Core.Color" /> at the specific offset.</returns>
public override Color GetColor(double offset)
{
if (GradientStops.Count == 0) return Color.Transparent;
@@ -5,6 +5,7 @@ using RGB.NET.Core;
namespace RGB.NET.Brushes.Gradients
{
/// <inheritdoc />
/// <summary>
/// Represents a rainbow gradient which circles through all colors of the HUE-color-space.<br />
/// See <see href="http://upload.wikimedia.org/wikipedia/commons/a/ad/HueScale.svg" /> as reference.
@@ -42,6 +43,7 @@ namespace RGB.NET.Brushes.Gradients
#region Methods
/// <inheritdoc />
/// <summary>
/// Gets the color on the rainbow at the given offset.
/// </summary>