From b0b9b02d1eaed2d60b0c7540fde903be7ae5c1de Mon Sep 17 00:00:00 2001 From: Scott Williams Date: Fri, 17 Mar 2017 17:19:12 +0000 Subject: [PATCH] fix comments --- src/ImageSharp/Common/Memory/BufferPointer{T}.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ImageSharp/Common/Memory/BufferPointer{T}.cs b/src/ImageSharp/Common/Memory/BufferPointer{T}.cs index 167731e369..0673efae06 100644 --- a/src/ImageSharp/Common/Memory/BufferPointer{T}.cs +++ b/src/ImageSharp/Common/Memory/BufferPointer{T}.cs @@ -73,16 +73,16 @@ namespace ImageSharp /// public IntPtr PointerAtOffset { get; private set; } - /// - /// Gets or sets the pixel at the specified position. + /// + /// Gets the element at the specified position. /// - /// The x-coordinate of the pixel. Must be greater than or equal to zero and less than the width of the image. - /// The at the specified position. - public T this[int x] + /// The index from the start of this Pointer to the required element. + /// The at the specified position. + public T this[int index] { get { - void* ptr = ((byte*)this.PointerAtOffset) + (x * Unsafe.SizeOf()); + byte* ptr = ((byte*)this.PointerAtOffset) + BufferPointer.SizeOf(index); return Unsafe.Read(ptr); } }