private void PrivateDrawDiceImage(SKCanvas thisCanvas, int value, SKRect thisRect) { StandardDiceGraphicsCP thisDice = new StandardDiceGraphicsCP(); thisDice.NeedsToClear = false; // for this for sure thisDice.Location = thisRect.Location; thisDice.UseSmallerBorders(); thisDice.ActualWidthHeight = thisRect.Height; thisDice.Value = value; thisDice.DrawDice(thisCanvas); }
private void DrawNoDice(SKCanvas canvas) { var textRect = MainGraphics !.GetActualRectangle(0, 10, 107, 44); var thisPaint = MiscHelpers.GetTextPaint(SKColors.Aqua, MainGraphics.GetFontSize(27)); canvas.DrawBorderText("No Dice", TextExtensions.EnumLayoutOptions.Center, TextExtensions.EnumLayoutOptions.Start, thisPaint, _borderTextPaint !, textRect); var lastRect = MainGraphics.GetActualRectangle(23, 59, 60, 60); var thisPen = MiscHelpers.GetStrokePaint(SKColors.Red, 7); // i think 7 no matter what (?) canvas.DrawOval(lastRect, thisPen); StandardDiceGraphicsCP thisDice = new StandardDiceGraphicsCP(); thisDice.Location = new SKPoint(lastRect.Left + (lastRect.Size.Width / 4), lastRect.Top + (lastRect.Size.Height / 4)); thisDice.NeedsToClear = false; // its this instead. var thisSize = MainGraphics.GetActualSize(new SKSize(34, 34)); thisDice.ActualWidthHeight = thisSize.Height; thisDice.UseSmallerBorders(); thisDice.Value = 6; thisDice.DrawDice(canvas); canvas.DrawLine(lastRect.Left + 10, lastRect.Top + 10, lastRect.Right - 10, lastRect.Bottom - 10, thisPen); }