Browse Source

Fix for 1118

pull/1173/head
Nikita Tsukanov 9 years ago
parent
commit
db63b74aaa
  1. 6
      src/Avalonia.Visuals/Media/GradientBrush.cs
  2. 2
      src/Avalonia.Visuals/Media/IGradientBrush.cs
  3. 4
      src/Avalonia.Visuals/Media/Immutable/ImmutableGradientBrush.cs
  4. 2
      src/Avalonia.Visuals/Media/Immutable/ImmutableLinearGradientBrush.cs
  5. 2
      src/Avalonia.Visuals/Media/Immutable/ImmutableRadialGradientBrush.cs

6
src/Avalonia.Visuals/Media/GradientBrush.cs

@ -21,8 +21,8 @@ namespace Avalonia.Media
/// <summary> /// <summary>
/// Defines the <see cref="GradientStops"/> property. /// Defines the <see cref="GradientStops"/> property.
/// </summary> /// </summary>
public static readonly StyledProperty<IReadOnlyList<GradientStop>> GradientStopsProperty = public static readonly StyledProperty<IList<GradientStop>> GradientStopsProperty =
AvaloniaProperty.Register<GradientBrush, IReadOnlyList<GradientStop>>(nameof(Opacity)); AvaloniaProperty.Register<GradientBrush, IList<GradientStop>>(nameof(Opacity));
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="GradientBrush"/> class. /// Initializes a new instance of the <see cref="GradientBrush"/> class.
@ -46,7 +46,7 @@ namespace Avalonia.Media
/// Gets or sets the brush's gradient stops. /// Gets or sets the brush's gradient stops.
/// </summary> /// </summary>
[Content] [Content]
public IReadOnlyList<GradientStop> GradientStops public IList<GradientStop> GradientStops
{ {
get { return GetValue(GradientStopsProperty); } get { return GetValue(GradientStopsProperty); }
set { SetValue(GradientStopsProperty, value); } set { SetValue(GradientStopsProperty, value); }

2
src/Avalonia.Visuals/Media/IGradientBrush.cs

@ -10,7 +10,7 @@ namespace Avalonia.Media
/// <summary> /// <summary>
/// Gets the brush's gradient stops. /// Gets the brush's gradient stops.
/// </summary> /// </summary>
IReadOnlyList<GradientStop> GradientStops { get; } IList<GradientStop> GradientStops { get; }
/// <summary> /// <summary>
/// Gets the brush's spread method that defines how to draw a gradient that doesn't fill /// Gets the brush's spread method that defines how to draw a gradient that doesn't fill

4
src/Avalonia.Visuals/Media/Immutable/ImmutableGradientBrush.cs

@ -16,7 +16,7 @@ namespace Avalonia.Media.Immutable
/// <param name="opacity">The opacity of the brush.</param> /// <param name="opacity">The opacity of the brush.</param>
/// <param name="spreadMethod">The spread method.</param> /// <param name="spreadMethod">The spread method.</param>
protected ImmutableGradientBrush( protected ImmutableGradientBrush(
IReadOnlyList<GradientStop> gradientStops, IList<GradientStop> gradientStops,
double opacity, double opacity,
GradientSpreadMethod spreadMethod) GradientSpreadMethod spreadMethod)
{ {
@ -36,7 +36,7 @@ namespace Avalonia.Media.Immutable
} }
/// <inheritdoc/> /// <inheritdoc/>
public IReadOnlyList<GradientStop> GradientStops { get; } public IList<GradientStop> GradientStops { get; }
/// <inheritdoc/> /// <inheritdoc/>
public double Opacity { get; } public double Opacity { get; }

2
src/Avalonia.Visuals/Media/Immutable/ImmutableLinearGradientBrush.cs

@ -20,7 +20,7 @@ namespace Avalonia.Media.Immutable
/// <param name="startPoint">The start point for the gradient.</param> /// <param name="startPoint">The start point for the gradient.</param>
/// <param name="endPoint">The end point for the gradient.</param> /// <param name="endPoint">The end point for the gradient.</param>
public ImmutableLinearGradientBrush( public ImmutableLinearGradientBrush(
IReadOnlyList<GradientStop> gradientStops, IList<GradientStop> gradientStops,
double opacity = 1, double opacity = 1,
GradientSpreadMethod spreadMethod = GradientSpreadMethod.Pad, GradientSpreadMethod spreadMethod = GradientSpreadMethod.Pad,
RelativePoint? startPoint = null, RelativePoint? startPoint = null,

2
src/Avalonia.Visuals/Media/Immutable/ImmutableRadialGradientBrush.cs

@ -22,7 +22,7 @@ namespace Avalonia.Media.Immutable
/// The horizontal and vertical radius of the outermost circle of the radial gradient. /// The horizontal and vertical radius of the outermost circle of the radial gradient.
/// </param> /// </param>
public ImmutableRadialGradientBrush( public ImmutableRadialGradientBrush(
IReadOnlyList<GradientStop> gradientStops, IList<GradientStop> gradientStops,
double opacity = 1, double opacity = 1,
GradientSpreadMethod spreadMethod = GradientSpreadMethod.Pad, GradientSpreadMethod spreadMethod = GradientSpreadMethod.Pad,
RelativePoint? center = null, RelativePoint? center = null,

Loading…
Cancel
Save