@@ -19,7 +19,7 @@ public static class DrawingOptionsDefaultsExtensions
1919 /// <param name="context">The image processing context to retrieve defaults from.</param>
2020 /// <returns>The globally configured default options.</returns>
2121 public static DrawingOptions GetDrawingOptions ( this IImageProcessingContext context )
22- => new DrawingOptions ( context . GetGraphicsOptions ( ) , context . GetShapeOptions ( ) , context . GetTextOptions ( ) , context . GetDrawingTransform ( ) ) ;
22+ => new ( context . GetGraphicsOptions ( ) , context . GetShapeOptions ( ) , context . GetDrawingTransform ( ) ) ;
2323
2424 /// <summary>
2525 /// Sets the 2D transformation matrix to be used during rasterization when drawing shapes or text.
@@ -39,9 +39,7 @@ public static IImageProcessingContext SetDrawingTransform(this IImageProcessingC
3939 /// <param name="configuration">The configuration to store default against.</param>
4040 /// <param name="matrix">The default matrix to use.</param>
4141 public static void SetDrawingTransform ( this Configuration configuration , Matrix3x2 matrix )
42- {
43- configuration . Properties [ DrawingTransformMatrixKey ] = matrix ;
44- }
42+ => configuration . Properties [ DrawingTransformMatrixKey ] = matrix ;
4543
4644 /// <summary>
4745 /// Gets the default 2D transformation matrix to be used during rasterization when drawing shapes or text.
@@ -50,16 +48,14 @@ public static void SetDrawingTransform(this Configuration configuration, Matrix3
5048 /// <returns>The matrix.</returns>
5149 public static Matrix3x2 GetDrawingTransform ( this IImageProcessingContext context )
5250 {
53- if ( context . Properties . TryGetValue ( DrawingTransformMatrixKey , out var options ) && options is Matrix3x2 go )
51+ if ( context . Properties . TryGetValue ( DrawingTransformMatrixKey , out object options ) && options is Matrix3x2 go )
5452 {
5553 return go ;
5654 }
5755
58- Matrix3x2 matrix = context . Configuration . GetDrawingTransform ( ) ;
59-
6056 // do not cache the fall back to config into the processing context
6157 // in case someone want to change the value on the config and expects it re-flow thru.
62- return matrix ;
58+ return context . Configuration . GetDrawingTransform ( ) ;
6359 }
6460
6561 /// <summary>
@@ -69,7 +65,7 @@ public static Matrix3x2 GetDrawingTransform(this IImageProcessingContext context
6965 /// <returns>The globally configured default matrix.</returns>
7066 public static Matrix3x2 GetDrawingTransform ( this Configuration configuration )
7167 {
72- if ( configuration . Properties . TryGetValue ( DrawingTransformMatrixKey , out var options ) && options is Matrix3x2 go )
68+ if ( configuration . Properties . TryGetValue ( DrawingTransformMatrixKey , out object options ) && options is Matrix3x2 go )
7369 {
7470 return go ;
7571 }
0 commit comments