File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
tests/ImageSharp.Tests/Processing Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -252,23 +252,24 @@ public void Transform_With_Custom_Dimensions<TPixel>(TestImageProvider<TPixel> p
252
252
[ Fact ]
253
253
public void TransformRotationDoesNotOffset ( )
254
254
{
255
- Rgba32 marker = Color . Aqua ;
255
+ Rgba32 background = Color . DimGray . ToPixel < Rgba32 > ( ) ;
256
+ Rgba32 marker = Color . Aqua . ToPixel < Rgba32 > ( ) ;
256
257
257
- using Image < Rgba32 > img = new ( 100 , 100 , Color . DimGray ) ;
258
+ using Image < Rgba32 > img = new ( 100 , 100 , background ) ;
258
259
img [ 0 , 0 ] = marker ;
259
260
260
261
img . Mutate ( c => c . Rotate ( 180 ) ) ;
261
262
262
263
Assert . Equal ( marker , img [ 99 , 99 ] ) ;
263
264
264
- using Image < Rgba32 > img2 = new ( 100 , 100 , Color . DimGray ) ;
265
+ using Image < Rgba32 > img2 = new ( 100 , 100 , background ) ;
265
266
img2 [ 0 , 0 ] = marker ;
266
267
267
268
img2 . Mutate (
268
269
c =>
269
270
c . Transform ( new AffineTransformBuilder ( ) . AppendRotationDegrees ( 180 ) , KnownResamplers . NearestNeighbor ) ) ;
270
271
271
- using Image < Rgba32 > img3 = new ( 100 , 100 , Color . DimGray ) ;
272
+ using Image < Rgba32 > img3 = new ( 100 , 100 , background ) ;
272
273
img3 [ 0 , 0 ] = marker ;
273
274
274
275
img3 . Mutate ( c => c . Transform ( new AffineTransformBuilder ( ) . AppendRotationDegrees ( 180 ) ) ) ;
Original file line number Diff line number Diff line change @@ -188,23 +188,24 @@ public void Transform_With_Custom_Dimensions<TPixel>(TestImageProvider<TPixel> p
188
188
[ Fact ]
189
189
public void TransformRotationDoesNotOffset ( )
190
190
{
191
- Rgba32 marker = Color . Aqua ;
191
+ Rgba32 background = Color . DimGray . ToPixel < Rgba32 > ( ) ;
192
+ Rgba32 marker = Color . Aqua . ToPixel < Rgba32 > ( ) ;
192
193
193
- using Image < Rgba32 > img = new ( 100 , 100 , Color . DimGray ) ;
194
+ using Image < Rgba32 > img = new ( 100 , 100 , background ) ;
194
195
img [ 0 , 0 ] = marker ;
195
196
196
197
img . Mutate ( c => c . Rotate ( 180 ) ) ;
197
198
198
199
Assert . Equal ( marker , img [ 99 , 99 ] ) ;
199
200
200
- using Image < Rgba32 > img2 = new ( 100 , 100 , Color . DimGray ) ;
201
+ using Image < Rgba32 > img2 = new ( 100 , 100 , background ) ;
201
202
img2 [ 0 , 0 ] = marker ;
202
203
203
204
img2 . Mutate (
204
205
c =>
205
206
c . Transform ( new ProjectiveTransformBuilder ( ) . AppendRotationDegrees ( 180 ) , KnownResamplers . NearestNeighbor ) ) ;
206
207
207
- using Image < Rgba32 > img3 = new ( 100 , 100 , Color . DimGray ) ;
208
+ using Image < Rgba32 > img3 = new ( 100 , 100 , background ) ;
208
209
img3 [ 0 , 0 ] = marker ;
209
210
210
211
img3 . Mutate ( c => c . Transform ( new AffineTransformBuilder ( ) . AppendRotationDegrees ( 180 ) ) ) ;
You can’t perform that action at this time.
0 commit comments