private static void DrawCradCore(CanvasDrawingSession drawingSession, ICanvasImage previousImage, CanvasTransformer canvasTransformer, Windows.UI.Color shadowColor, float shadowBlurAmount, float shadowOffset) { float width = canvasTransformer.Width * canvasTransformer.Scale; float height = canvasTransformer.Height * canvasTransformer.Scale; Rect rect = new Rect(-width / 2, -height / 2, width, height); Matrix3x2 matrix = canvasTransformer.GetMatrix(MatrixTransformerMode.VirtualToControl); CanvasDrawingSessionExtensions.DrawCradCore(drawingSession, previousImage, rect, matrix, shadowColor, shadowBlurAmount, shadowOffset); }
/// <summary> /// Draw a card. /// </summary> /// <param name="drawingSession"> The drawing-session. </param> /// <param name="previousImage"> The previous image. </param> /// <param name="cropRect"> The image crop rectangle. </param> /// <param name="matrix"> The matrix. </param> /// <param name="shadowColor"> The shadow color. </param> /// <param name="shadowBlurAmount"> The shaodw blur amount. </param> /// <param name="shadowOffset"> The shadow offset. </param> public static void DrawCrad(this CanvasDrawingSession drawingSession, ICanvasImage previousImage, Rect cropRect, Matrix3x2 matrix, Windows.UI.Color shadowColor, float shadowBlurAmount = 4.0f, float shadowOffset = 5.0f) => CanvasDrawingSessionExtensions.DrawCradCore(drawingSession, previousImage, cropRect, matrix, shadowColor, shadowBlurAmount, shadowOffset);
/// <summary> /// Draw a card. /// </summary> /// <param name="drawingSession"> The drawing-session. </param> /// <param name="previousImage"> previous image. </param> /// <param name="canvasTransformer"> The canvas-transformer. </param> /// <param name="shadowColor"> shadow color. </param> /// <param name="shadowBlurAmount"> shaodw blur amount. </param> /// <param name="shadowOffset"> shadow offset. </param> public static void DrawCard(this CanvasDrawingSession drawingSession, ICanvasImage previousImage, CanvasTransformer canvasTransformer, Windows.UI.Color shadowColor, float shadowBlurAmount = 4.0f, float shadowOffset = 5.0f) => CanvasDrawingSessionExtensions.DrawCradCore(drawingSession, previousImage, canvasTransformer, shadowColor, shadowBlurAmount, shadowOffset);