Browse Source

Remove protected.

pull/1010/head
James Jackson-South 6 years ago
parent
commit
44692b0c1b
  1. 16
      src/ImageSharp/Image.cs
  2. 8
      src/ImageSharp/Image{TPixel}.cs

16
src/ImageSharp/Image.cs

@ -129,14 +129,6 @@ namespace SixLabors.ImageSharp
public abstract Image<TPixel2> CloneAs<TPixel2>(Configuration configuration)
where TPixel2 : struct, IPixel<TPixel2>;
/// <summary>
/// Accepts a <see cref="IImageVisitor"/>.
/// Implemented by <see cref="Image{TPixel}"/> invoking <see cref="IImageVisitor.Visit{TPixel}"/>
/// with the pixel type of the image.
/// </summary>
/// <param name="visitor">The visitor.</param>
protected internal abstract void Accept(IImageVisitor visitor);
/// <summary>
/// Update the size of the image after mutation.
/// </summary>
@ -148,6 +140,14 @@ namespace SixLabors.ImageSharp
/// </summary>
protected abstract void DisposeImpl();
/// <summary>
/// Accepts a <see cref="IImageVisitor"/>.
/// Implemented by <see cref="Image{TPixel}"/> invoking <see cref="IImageVisitor.Visit{TPixel}"/>
/// with the pixel type of the image.
/// </summary>
/// <param name="visitor">The visitor.</param>
internal abstract void Accept(IImageVisitor visitor);
private class EncodeVisitor : IImageVisitor
{
private readonly IImageEncoder encoder;

8
src/ImageSharp/Image{TPixel}.cs

@ -187,17 +187,17 @@ namespace SixLabors.ImageSharp
/// <inheritdoc/>
protected override void DisposeImpl() => this.Frames.Dispose();
/// <inheritdoc/>
public override string ToString() => $"Image<{typeof(TPixel).Name}>: {this.Width}x{this.Height}";
/// <inheritdoc />
protected internal override void Accept(IImageVisitor visitor)
internal override void Accept(IImageVisitor visitor)
{
this.EnsureNotDisposed();
visitor.Visit(this);
}
/// <inheritdoc/>
public override string ToString() => $"Image<{typeof(TPixel).Name}>: {this.Width}x{this.Height}";
/// <summary>
/// Switches the buffers used by the image and the pixelSource meaning that the Image will "own" the buffer from the pixelSource and the pixelSource will now own the Images buffer.
/// </summary>

Loading…
Cancel
Save