From ca047b58afa1a5f048f6384971d7f58ef9816f3b Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Wed, 2 Nov 2016 15:21:09 +1100 Subject: [PATCH] Rename ColorPixelAccessor to PixelAccessor Keeps it consistant with the Image Image classes --- README.md | 6 +++--- src/ImageSharp/Image.cs | 2 +- .../{Colors/ColorPixelAccessor.cs => PixelAccessor.cs} | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) rename src/ImageSharp/{Colors/ColorPixelAccessor.cs => PixelAccessor.cs} (91%) diff --git a/README.md b/README.md index 88a85b9c13..5c0ca82987 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# ImageSharp +# ImageSharp **ImageSharp** is a new cross-platform 2D graphics API designed to allow the processing of images without the use of `System.Drawing`. @@ -168,13 +168,13 @@ Setting individual pixel values is perfomed as follows: ```csharp Image image = new Image(400, 400); -using (PixelAccessor pixels = image.Lock()) +using (PixelAccessor pixels = image.Lock()) { pixels[200, 200] = Color.White; } ``` -For advanced usage the `Image` class is available allowing developers to implement their own color models in the same manner as Microsoft XNA Game Studio and MonoGame. +For advanced usage the `Image` and `PixelAccessor` classes are available allowing developers to implement their own color models in the same manner as Microsoft XNA Game Studio and MonoGame. All in all this should allow image processing to be much more accessible to developers which has always been my goal from the start. diff --git a/src/ImageSharp/Image.cs b/src/ImageSharp/Image.cs index 28eb3ff99c..83a4b9dff0 100644 --- a/src/ImageSharp/Image.cs +++ b/src/ImageSharp/Image.cs @@ -60,7 +60,7 @@ namespace ImageSharp /// public override PixelAccessor Lock() { - return new ColorPixelAccessor(this); + return new PixelAccessor(this); } } } diff --git a/src/ImageSharp/Colors/ColorPixelAccessor.cs b/src/ImageSharp/PixelAccessor.cs similarity index 91% rename from src/ImageSharp/Colors/ColorPixelAccessor.cs rename to src/ImageSharp/PixelAccessor.cs index 7b8ae2ee2b..f6e34b5984 100644 --- a/src/ImageSharp/Colors/ColorPixelAccessor.cs +++ b/src/ImageSharp/PixelAccessor.cs @@ -1,4 +1,4 @@ -// +// // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // @@ -11,13 +11,13 @@ namespace ImageSharp /// /// An optimized pixel accessor for the class. /// - public sealed unsafe class ColorPixelAccessor : PixelAccessor + public sealed unsafe class PixelAccessor : PixelAccessor { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The image to provide pixel access for. - public ColorPixelAccessor(ImageBase image) + public PixelAccessor(ImageBase image) : base(image) { } @@ -106,4 +106,4 @@ namespace ImageSharp } } } -} +} \ No newline at end of file