@@ -13,11 +13,12 @@ public class DrawImageExtensionsTests : BaseImageOperationsExtensionTest
13
13
[ Fact ]
14
14
public void DrawImage_OpacityOnly_VerifyGraphicOptionsTakenFromContext ( )
15
15
{
16
- // non-default values as we cant easly defect usage otherwise
16
+ // non-default values as we cant easily defect usage otherwise
17
17
this . options . AlphaCompositionMode = PixelAlphaCompositionMode . Xor ;
18
18
this . options . ColorBlendingMode = PixelColorBlendingMode . Screen ;
19
19
20
- this . operations . DrawImage ( null , 0.5f ) ;
20
+ using Image < Rgba32 > image = new ( Configuration . Default , 1 , 1 ) ;
21
+ this . operations . DrawImage ( image , 0.5f ) ;
21
22
DrawImageProcessor dip = this . Verify < DrawImageProcessor > ( ) ;
22
23
23
24
Assert . Equal ( 0.5 , dip . Opacity ) ;
@@ -28,11 +29,12 @@ public void DrawImage_OpacityOnly_VerifyGraphicOptionsTakenFromContext()
28
29
[ Fact ]
29
30
public void DrawImage_OpacityAndBlending_VerifyGraphicOptionsTakenFromContext ( )
30
31
{
31
- // non-default values as we cant easly defect usage otherwise
32
+ // non-default values as we cant easily defect usage otherwise
32
33
this . options . AlphaCompositionMode = PixelAlphaCompositionMode . Xor ;
33
34
this . options . ColorBlendingMode = PixelColorBlendingMode . Screen ;
34
35
35
- this . operations . DrawImage ( null , PixelColorBlendingMode . Multiply , 0.5f ) ;
36
+ using Image < Rgba32 > image = new ( Configuration . Default , 1 , 1 ) ;
37
+ this . operations . DrawImage ( image , PixelColorBlendingMode . Multiply , 0.5f ) ;
36
38
DrawImageProcessor dip = this . Verify < DrawImageProcessor > ( ) ;
37
39
38
40
Assert . Equal ( 0.5 , dip . Opacity ) ;
@@ -43,11 +45,12 @@ public void DrawImage_OpacityAndBlending_VerifyGraphicOptionsTakenFromContext()
43
45
[ Fact ]
44
46
public void DrawImage_LocationAndOpacity_VerifyGraphicOptionsTakenFromContext ( )
45
47
{
46
- // non-default values as we cant easly defect usage otherwise
48
+ // non-default values as we cant easily defect usage otherwise
47
49
this . options . AlphaCompositionMode = PixelAlphaCompositionMode . Xor ;
48
50
this . options . ColorBlendingMode = PixelColorBlendingMode . Screen ;
49
51
50
- this . operations . DrawImage ( null , Point . Empty , 0.5f ) ;
52
+ using Image < Rgba32 > image = new ( Configuration . Default , 1 , 1 ) ;
53
+ this . operations . DrawImage ( image , Point . Empty , 0.5f ) ;
51
54
DrawImageProcessor dip = this . Verify < DrawImageProcessor > ( ) ;
52
55
53
56
Assert . Equal ( 0.5 , dip . Opacity ) ;
@@ -58,11 +61,12 @@ public void DrawImage_LocationAndOpacity_VerifyGraphicOptionsTakenFromContext()
58
61
[ Fact ]
59
62
public void DrawImage_LocationAndOpacityAndBlending_VerifyGraphicOptionsTakenFromContext ( )
60
63
{
61
- // non-default values as we cant easly defect usage otherwise
64
+ // non-default values as we cant easily defect usage otherwise
62
65
this . options . AlphaCompositionMode = PixelAlphaCompositionMode . Xor ;
63
66
this . options . ColorBlendingMode = PixelColorBlendingMode . Screen ;
64
67
65
- this . operations . DrawImage ( null , Point . Empty , PixelColorBlendingMode . Multiply , 0.5f ) ;
68
+ using Image < Rgba32 > image = new ( Configuration . Default , 1 , 1 ) ;
69
+ this . operations . DrawImage ( image , Point . Empty , PixelColorBlendingMode . Multiply , 0.5f ) ;
66
70
DrawImageProcessor dip = this . Verify < DrawImageProcessor > ( ) ;
67
71
68
72
Assert . Equal ( 0.5 , dip . Opacity ) ;
0 commit comments