140 references to CurrentState
Microsoft.Maui.Graphics.Skia (62)
SkiaCanvas.cs (62)
47 set => CurrentState.AntiAlias = value; 52 set => CurrentState.PlatformStrokeSize = value; 57 set => CurrentState.MiterLimit = value; 62 set => CurrentState.Alpha = value; 67 set => CurrentState.StrokeLineCap = value; 72 set => CurrentState.StrokeLineJoin = value; 77 set => CurrentState.StrokeColor = value ?? Colors.Black; 82 set => CurrentState.FontColor = value ?? Colors.Black; 87 set => CurrentState.Font = value; 92 set => CurrentState.FontSize = value; 101 CurrentState.SetFillPaintShader(null); 106 CurrentState.FillColor = value ?? Colors.White; 221 CurrentState.SetStrokeDashPattern(strokePattern, strokeDashOffset, strokeSize); 231 CurrentState.SetFillPaintShader(null); 255 colors[i] = vStops[i].Color.ToColor(CurrentState.Alpha); 261 CurrentState.FillColor = Colors.White; 268 CurrentState.SetFillPaintShader(_shader); 285 colors[i] = vStops[i].Color.ToColor(CurrentState.Alpha); 298 CurrentState.FillColor = Colors.White; 305 CurrentState.SetFillPaintShader(_shader); 321 CurrentState.FillColor = Colors.White; 322 CurrentState.SetFillPaintFilterBitmap(true); 330 CurrentState.SetFillPaintShader(_shader); 354 CurrentState.FillColor = Colors.White; 355 CurrentState.SetFillPaintFilterBitmap(true); 362 CurrentState.SetFillPaintShader(_shader); 392 _canvas.DrawLine(x1, y1, x2, y2, CurrentState.StrokePaintWithAlpha); 429 _canvas.DrawPath(platformPath, CurrentState.StrokePaintWithAlpha); 437 _canvas.DrawPath(platformPath, CurrentState.StrokePaintWithAlpha); 470 _canvas.DrawPath(platformPath, CurrentState.FillPaintWithAlpha); 485 var strokeSize = CurrentState.ScaledStrokeSize; 494 _canvas.DrawRect(rectX, rectY, rectWidth, rectHeight, CurrentState.StrokePaintWithAlpha); 508 _canvas.DrawRect(rectX, rectY, rectWidth, rectHeight, CurrentState.FillPaintWithAlpha); 519 var strokeSize = CurrentState.ScaledStrokeSize; 527 _canvas.DrawRoundRect(rectX, rectY, rectWidth, rectHeight, radius, radius, CurrentState.StrokePaintWithAlpha); 544 _canvas.DrawRoundRect(rect, radius, radius, CurrentState.FillPaintWithAlpha); 554 var strokeSize = CurrentState.ScaledStrokeSize; 562 _canvas.DrawOval(rect, CurrentState.StrokePaintWithAlpha); 578 _canvas.DrawOval(rect, CurrentState.FillPaintWithAlpha); 595 _canvas.DrawPath(platformPath, CurrentState.StrokePaintWithAlpha); 612 _canvas.DrawPath(platformPath, CurrentState.FillPaintWithAlpha); 627 _canvas.DrawText(value, x, y, CurrentState.FontPaint); 631 var paint = CurrentState.FontPaint; 634 _canvas.DrawText(value, x, y, CurrentState.FontPaint); 638 var paint = CurrentState.FontPaint; 641 _canvas.DrawText(value, x, y, CurrentState.FontPaint); 663 FontSize = CurrentState.FontPaint.TextSize, 664 Font = CurrentState.Font, 677 _canvas.DrawText(text, point.X, point.Y, CurrentState.FontPaint); 680 using (var textLayout = new SkiaTextLayout(value, rect, attributes, callback, textFlow, CurrentState.FontPaint)) 702 _stateService.Reset(CurrentState); 733 var actualColor = Colors.Black.AsSKColorMultiplyAlpha(CurrentState.Alpha); 734 CurrentState.SetShadow(blur, sx, sy, actualColor); 738 var actualColor = color.AsSKColorMultiplyAlpha(CurrentState.Alpha); 739 CurrentState.SetShadow(blur, sx, sy, actualColor); 764 CurrentState.SetScale(Math.Abs(xFactor), Math.Abs(yFactor)); 773 _canvas.Translate(tx * CurrentState.ScaleX, ty * CurrentState.ScaleY); 797 CurrentState.SetBlur(radius); 811 var scaleX = CurrentState.ScaleX < 0 ? -1 : 1; 812 var scaleY = CurrentState.ScaleY < 0 ? -1 : 1; 829 var paint = CurrentState.GetImagePaint(1, 1);
Microsoft.Maui.Graphics.Win2D.WinUI.Desktop (78)
src\Graphics\src\Graphics\Platforms\Windows\PlatformCanvas.cs (78)
85 set => CurrentState.MiterLimit = value; 90 set => CurrentState.StrokeColor = value; 95 set => CurrentState.StrokeLineCap = value; 100 set => CurrentState.StrokeLineJoin = value; 105 CurrentState.SetStrokeDashPattern(strokePattern, strokeDashOffset, strokeSize); 110 set => CurrentState.FillColor = value; 115 set => CurrentState.FontColor = value; 120 set => CurrentState.Font = value; 125 set => CurrentState.FontSize = value; 130 set => CurrentState.Alpha = value; 146 Draw(s => s.FillGeometry(geometry, CurrentState.PlatformFillBrush)); 152 CurrentState.SubtractFromClip(x, y, width, height); 157 CurrentState.ClipPath(path, windingMode); 162 CurrentState.ClipRectangle(x, y, width, height); 180 float strokeWidth = CurrentState.StrokeSize; 208 Draw(ctx => ctx.FillGeometry(geometry, CurrentState.PlatformFillBrush)); 213 Draw(s => s.FillRectangle(x, y, width, height, CurrentState.PlatformFillBrush)); 218 Draw(s => s.FillRoundedRectangle(x, y, width, height, cornerRadius, cornerRadius, CurrentState.PlatformFillBrush)); 248 Draw(s => s.FillEllipse(_point1, radiusX, radiusY, CurrentState.PlatformFillBrush)); 258 var textFormat = (CurrentState.Font ?? Graphics.Font.Default).ToCanvasTextFormat(CurrentState.FontSize); 280 _rect.Y = y - CurrentState.FontSize; 281 _rect.Height = CurrentState.FontSize * 2; 293 Draw(ctx => ctx.DrawTextLayout(textLayout, _point1, CurrentState.PlatformFontBrush)); 316 var textFormat = (CurrentState.Font ?? Graphics.Font.Default).ToCanvasTextFormat(CurrentState.FontSize); 364 Draw(ctx => ctx.DrawTextLayout(textLayout, _point1, CurrentState.PlatformFontBrush)); 374 CurrentState.SetShadow(offset, blur, color); 381 CurrentState.FillColor = Colors.White; 387 CurrentState.FillColor = solidPaint.Color; 400 CurrentState.SetBitmapBrush(bitmapBrush); 404 CurrentState.FillColor = Colors.White; 414 CurrentState.FillColor = Colors.White; 428 CurrentState.SetBitmapBrush(bitmapBrush); 432 CurrentState.FillColor = Colors.White; 457 CurrentState.SetBitmapBrush(imageBrush); 461 CurrentState.FillColor = Colors.White; 480 CurrentState.SetLinearGradient(paint, _linearGradientStartPoint, _linearGradientEndPoint); 492 CurrentState.SetRadialGradient(paint, _radialGradientCenter, _radialGradientRadius); 539 Draw(s => s.DrawImage(platformImage.PlatformRepresentation, _rect, WRect.Empty, CurrentState.Alpha, CanvasImageInterpolation.Linear)); 550 Draw(s => s.DrawLine(x1, y1, x2, y2, CurrentState.PlatformStrokeBrush, CurrentState.StrokeSize, CurrentState.PlatformStrokeStyle)); 568 float strokeWidth = CurrentState.StrokeSize; 596 Draw(ctx => ctx.DrawGeometry(geometry, CurrentState.PlatformStrokeBrush, strokeWidth, CurrentState.PlatformStrokeStyle)); 601 float strokeWidth = CurrentState.StrokeSize; 604 Draw(s => s.DrawRectangle(_rect, CurrentState.PlatformStrokeBrush, CurrentState.StrokeSize, CurrentState.PlatformStrokeStyle)); 609 float strokeWidth = CurrentState.StrokeSize; 622 Draw(s => s.DrawRoundedRectangle(_rect, cornerRadius, cornerRadius, CurrentState.PlatformStrokeBrush, CurrentState.StrokeSize, CurrentState.PlatformStrokeStyle)); 631 float strokeWidth = CurrentState.StrokeSize; 655 Draw(s => s.DrawEllipse(px, py, radiusX, radiusY, CurrentState.PlatformStrokeBrush, CurrentState.StrokeSize, CurrentState.PlatformStrokeStyle)); 681 float strokeWidth = CurrentState.StrokeSize; 682 s.DrawGeometry(geometry, CurrentState.PlatformStrokeBrush, strokeWidth, CurrentState.PlatformStrokeStyle); 688 _session.Transform = CurrentState.AppendRotate(degrees, x, y); 693 _session.Transform = CurrentState.AppendRotate(degrees); 698 _session.Transform = CurrentState.AppendScale(sx, sy); 703 _session.Transform = CurrentState.AppendTranslate(tx, ty); 708 _session.Transform = CurrentState.AppendConcatenateTransform(transform); 713 CurrentState.SetBlur(blurRadius); 718 CurrentState.SaveRenderTargetState(); 732 if (CurrentState.IsShadowed) 737 if (CurrentState.IsBlurred) 809 imageSession.Transform = CurrentState.Matrix.Translate(CurrentState.ShadowOffset.X, CurrentState.ShadowOffset.Y); 817 _shadowEffect.BlurAmount = CurrentState.ActualShadowBlur / 3; 818 _shadowEffect.ShadowColor = CurrentState.ShadowColor; 822 _session.Transform = CurrentState.Matrix; 834 imageSession.Transform = CurrentState.Matrix; 847 _session.Transform = CurrentState.Matrix;