@@ -9,16 +9,16 @@ namespace SixLabors.ImageSharp.Memory
99 /// Represents a rectangular region inside a 2D memory buffer (<see cref="Buffer2D{T}"/>).
1010 /// </summary>
1111 /// <typeparam name="T">The element type.</typeparam>
12- public readonly struct BufferRegion < T >
12+ public readonly struct Buffer2DRegion < T >
1313 where T : unmanaged
1414 {
1515 /// <summary>
16- /// Initializes a new instance of the <see cref="BufferRegion {T}"/> struct.
16+ /// Initializes a new instance of the <see cref="Buffer2DRegion {T}"/> struct.
1717 /// </summary>
1818 /// <param name="buffer">The <see cref="Buffer2D{T}"/>.</param>
1919 /// <param name="rectangle">The <see cref="Rectangle"/> defining a rectangular area within the buffer.</param>
2020 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
21- public BufferRegion ( Buffer2D < T > buffer , Rectangle rectangle )
21+ public Buffer2DRegion ( Buffer2D < T > buffer , Rectangle rectangle )
2222 {
2323 DebugGuard . MustBeGreaterThanOrEqualTo ( rectangle . X , 0 , nameof ( rectangle ) ) ;
2424 DebugGuard . MustBeGreaterThanOrEqualTo ( rectangle . Y , 0 , nameof ( rectangle ) ) ;
@@ -30,11 +30,11 @@ public BufferRegion(Buffer2D<T> buffer, Rectangle rectangle)
3030 }
3131
3232 /// <summary>
33- /// Initializes a new instance of the <see cref="BufferRegion {T}"/> struct.
33+ /// Initializes a new instance of the <see cref="Buffer2DRegion {T}"/> struct.
3434 /// </summary>
3535 /// <param name="buffer">The <see cref="Buffer2D{T}"/>.</param>
3636 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
37- public BufferRegion ( Buffer2D < T > buffer )
37+ public Buffer2DRegion ( Buffer2D < T > buffer )
3838 : this ( buffer , buffer . FullRectangle ( ) )
3939 {
4040 }
@@ -98,35 +98,35 @@ public Span<T> GetRowSpan(int y)
9898 }
9999
100100 /// <summary>
101- /// Returns a sub-area as <see cref="BufferRegion {T}"/>. (Similar to <see cref="Span{T}.Slice(int, int)"/>.)
101+ /// Returns a subregion as <see cref="Buffer2DRegion {T}"/>. (Similar to <see cref="Span{T}.Slice(int, int)"/>.)
102102 /// </summary>
103- /// <param name="x">The x index at the subarea origin.</param>
104- /// <param name="y">The y index at the subarea origin.</param>
105- /// <param name="width">The desired width of the subarea .</param>
106- /// <param name="height">The desired height of the subarea .</param>
107- /// <returns>The subarea </returns>
103+ /// <param name="x">The x index at the subregion origin.</param>
104+ /// <param name="y">The y index at the subregion origin.</param>
105+ /// <param name="width">The desired width of the subregion .</param>
106+ /// <param name="height">The desired height of the subregion .</param>
107+ /// <returns>The subregion </returns>
108108 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
109- public BufferRegion < T > GetSubArea ( int x , int y , int width , int height )
109+ public Buffer2DRegion < T > GetSubRegion ( int x , int y , int width , int height )
110110 {
111111 var rectangle = new Rectangle ( x , y , width , height ) ;
112- return this . GetSubArea ( rectangle ) ;
112+ return this . GetSubRegion ( rectangle ) ;
113113 }
114114
115115 /// <summary>
116- /// Returns a sub-area as <see cref="BufferRegion {T}"/>. (Similar to <see cref="Span{T}.Slice(int, int)"/>.)
116+ /// Returns a subregion as <see cref="Buffer2DRegion {T}"/>. (Similar to <see cref="Span{T}.Slice(int, int)"/>.)
117117 /// </summary>
118- /// <param name="rectangle">The <see cref="Rectangle"/> specifying the boundaries of the subarea </param>
119- /// <returns>The subarea </returns>
118+ /// <param name="rectangle">The <see cref="Rectangle"/> specifying the boundaries of the subregion </param>
119+ /// <returns>The subregion </returns>
120120 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
121- public BufferRegion < T > GetSubArea ( Rectangle rectangle )
121+ public Buffer2DRegion < T > GetSubRegion ( Rectangle rectangle )
122122 {
123123 DebugGuard . MustBeLessThanOrEqualTo ( rectangle . Width , this . Rectangle . Width , nameof ( rectangle ) ) ;
124124 DebugGuard . MustBeLessThanOrEqualTo ( rectangle . Height , this . Rectangle . Height , nameof ( rectangle ) ) ;
125125
126126 int x = this . Rectangle . X + rectangle . X ;
127127 int y = this . Rectangle . Y + rectangle . Y ;
128128 rectangle = new Rectangle ( x , y , rectangle . Width , rectangle . Height ) ;
129- return new BufferRegion < T > ( this . Buffer , rectangle ) ;
129+ return new Buffer2DRegion < T > ( this . Buffer , rectangle ) ;
130130 }
131131
132132 /// <summary>
0 commit comments