diff --git a/DotNETCore/Sample_Source/Images/DrawToBitmap/DrawToBitmap.cs b/DotNETCore/Sample_Source/Images/DrawToBitmap/DrawToBitmap.cs index c48c0757..3c5fb353 100644 --- a/DotNETCore/Sample_Source/Images/DrawToBitmap/DrawToBitmap.cs +++ b/DotNETCore/Sample_Source/Images/DrawToBitmap/DrawToBitmap.cs @@ -89,9 +89,6 @@ private static DrawParams ConstructDrawParams(Matrix matrix, Rect updateRect, bo parms.EnableBlackPointCompensation = blackPointCompensation; - parms.CancelProc = new SampleCancelProc(); - parms.ProgressProc = new SampleRenderProgressProc(); - return parms; } @@ -226,6 +223,8 @@ static void DrawToBitmapWithDrawParams(Page pg, DrawParams parms) using (Bitmap bitmap = new Bitmap(width, height)) { + parms.CancelProc = new SampleCancelProc(); + parms.ProgressProc = new SampleRenderProgressProc(); pg.DrawContents(bitmap, parms); SaveBitmap(bitmap, "Bitmap"); } @@ -269,6 +268,8 @@ static void DrawToGraphicsWithDrawParams(Page pg, DrawParams parms) using (Bitmap bitmap = new Bitmap(width, height)) { + parms.CancelProc = new SampleCancelProc(); + parms.ProgressProc = new SampleRenderProgressProc(); pg.DrawContents(bitmap, parms); SaveBitmap(bitmap, "Graphics"); }