33 instantiations of PanelPath
Aspire.Tray.Tests (33)
src\Aspire.Tray\Common\TrayPanelGeometry.cs (4)
131=> new PanelPath().Arc(centerX, centerY, radius, 0, 360).Close(); 134=> new PanelPath().MoveTo(rect.X, rect.Y).LineTo(rect.Right, rect.Y).LineTo(rect.Right, rect.Bottom) 148var path = new PanelPath().MoveTo(rect.X + topLeft, rect.Y).LineTo(rect.Right - topRight, rect.Y); 174var result = new PanelPath();
src\Aspire.Tray\Common\TrayPanelGlyphs.cs (27)
60Stroke(new PanelPath().MoveTo(6.4, 10.3).LineTo(8.9, 12.7).LineTo(13.6, 7.6), palette.SuccessMark, 1.8); 64Stroke(new PanelPath().MoveTo(10, 5.6).LineTo(10, 10.8), palette.WarningMark, 2); 69Stroke(new PanelPath().MoveTo(7.1, 7.1).LineTo(12.9, 12.9).MoveTo(12.9, 7.1).LineTo(7.1, 12.9), palette.DangerMark, 1.8); 73Stroke(new PanelPath().MoveTo(7.7, 7.9) 87Stroke(new PanelPath().Arc(10, 10, 7, -90, 270), palette.Accent, 2); 104Stroke(new PanelPath().MoveTo(7, 3.25).LineTo(4.75, 3.25) 108Stroke(new PanelPath().MoveTo(9.5, 3.25).LineTo(12.75, 3.25).LineTo(12.75, 6.5) 116var play = new PanelPath().MoveTo(5.25, 3.75).LineTo(12.25, 8).LineTo(5.25, 12.25).Close(); 132Stroke(new PanelPath().Arc(8, 8.5, 5.5, -60, 300), 1.5); 133Stroke(new PanelPath().MoveTo(8, 2).LineTo(8, 7.5), 1.5); 136Stroke(new PanelPath().MoveTo(4.5, 6.25).LineTo(8, 9.75).LineTo(11.5, 6.25), 1.5); 139Stroke(new PanelPath().MoveTo(6.25, 4.5).LineTo(9.75, 8).LineTo(6.25, 11.5), 1.5); 142Stroke(new PanelPath().MoveTo(9.75, 4.5).LineTo(6.25, 8).LineTo(9.75, 11.5), 1.5); 145Stroke(new PanelPath().MoveTo(8, 2.5).LineTo(14.25, 13.25).LineTo(1.75, 13.25).Close(), 1.4); 146Stroke(new PanelPath().MoveTo(8, 6.6).LineTo(8, 9.4), 1.5); 150Stroke(new PanelPath().MoveTo(16, 5).LineTo(28, 11).LineTo(16, 17).LineTo(4, 11).Close(), 1.75); 151Stroke(new PanelPath().MoveTo(4, 16).LineTo(16, 22).LineTo(28, 16), 1.75); 152Stroke(new PanelPath().MoveTo(4, 21).LineTo(16, 27).LineTo(28, 21), 1.75); 157Stroke(new PanelPath().MoveTo(2.25, 6).LineTo(13.75, 6), 1.4); 160Stroke(new PanelPath().MoveTo(2.25, 4.75) 168Stroke(new PanelPath().MoveTo(10.25, 3.25).LineTo(4.75, 3.25) 174Stroke(new PanelPath().MoveTo(5.25, 2.75).LineTo(10.75, 2.75) 179Stroke(new PanelPath().MoveTo(2.75, 2.75).LineTo(13.25, 13.25), 1.4); 185Stroke(new PanelPath().MoveTo(8, 2.25).CubicTo(5.1, 4.2, 5.1, 11.8, 8, 13.75) 187Stroke(new PanelPath().MoveTo(2.25, 8).LineTo(13.75, 8), 1.3); 190Stroke(new PanelPath().MoveTo(4.5, 4.5).LineTo(11.5, 11.5).MoveTo(11.5, 4.5).LineTo(4.5, 11.5), 1.5); 234var path = new PanelPath();
TrayPanelTests.cs (2)
922var path = new PanelPath().Arc(10, 20, 5, start, sweep); 941var cubic = new PanelPath().Arc(0, 0, 1, 0, 90).Segments[1];
69 references to PanelPath
Aspire.Tray.Tests (69)
Helpers\TrayPanelSvgRenderer.cs (1)
103public static string ToPathData(PanelPath path)
src\Aspire.Tray\Common\TrayPanel.cs (25)
815commands.Add(new FillPathCommand(PanelPath.RoundedRect(panel, CornerRadius), palette.Background)); 816commands.Add(new FillPathCommand(PanelPath.RoundedRect(footer, 0, 0, CornerRadius, CornerRadius), palette.Gutter)); 817commands.Add(new FillPathCommand(PanelPath.Rectangle(new(0, footer.Y, Width, 1)), palette.Separator)); 820commands.Add(new FillPathCommand(PanelPath.RoundedRect(new(0, 0, Width, HeaderHeight), CornerRadius, CornerRadius, 0, 0), palette.Gutter)); 821commands.Add(new FillPathCommand(PanelPath.Rectangle(new(0, HeaderHeight - 1, Width, 1)), palette.Separator)); 839commands.Add(new FillPathCommand(PanelPath.Rectangle(new(0, _viewport.Y, Width, 1)), palette.Separator)); 892commands.Add(new FillPathCommand(PanelPath.RoundedRect(new(Width - 7, thumbY, 4, thumb), 2), palette.TextTertiary.WithAlpha(0.4))); 896commands.Add(new StrokePathCommand(PanelPath.RoundedRect(panel.Inset(0.5, 0.5), CornerRadius - 0.5), palette.Border, 1)); 912commands.Add(new StrokePathCommand(PanelPath.RoundedRect(focused.Bounds.Inset(-1, -1), 7), palette.Focus, 2)); 935commands.Add(new FillPathCommand(PanelPath.Circle(title.Right + 4, middle, 4), dot)); 946commands.Add(new FillPathCommand(PanelPath.RoundedRect(banner, 6), palette.Banner)); 949commands.Add(new StrokePathCommand(PanelPath.RoundedRect(banner.Inset(0.5, 0.5), 5.5), palette.Border, 1)); 1034commands.Add(new FillPathCommand(PanelPath.RoundedRect(row, 6), palette.Hover)); 1073commands.Add(new FillPathCommand(PanelPath.RoundedRect(bounds, 6), palette.Pressed)); 1144commands.Add(new FillPathCommand(PanelPath.RoundedRect(card, 8), palette.Gutter)); 1145commands.Add(new StrokePathCommand(PanelPath.RoundedRect(card.Inset(0.5, 0.5), 7.5), palette.Border, 1)); 1216commands.Add(new FillPathCommand(PanelPath.RoundedRect(card, 8), palette.Gutter)); 1217commands.Add(new StrokePathCommand(PanelPath.RoundedRect(card.Inset(0.5, 0.5), 7.5), palette.Border, 1)); 1245commands.Add(new FillPathCommand(PanelPath.RoundedRect(cancelBounds, 6), palette.Background)); 1247commands.Add(new StrokePathCommand(PanelPath.RoundedRect(cancelBounds.Inset(0.5, 0.5), 5.5), palette.Border, 1)); 1251commands.Add(new FillPathCommand(PanelPath.RoundedRect(acceptBounds, 6), palette.DangerFill)); 1255commands.Add(new FillPathCommand(PanelPath.RoundedRect(acceptBounds, 6), 1260commands.Add(new StrokePathCommand(PanelPath.RoundedRect(acceptBounds.Inset(0.5, 0.5), 5.5), palette.Border, 1)); 1344commands.Add(new FillPathCommand(PanelPath.RoundedRect(bounds, 6), palette.Pressed)); 1359commands.Add(new FillPathCommand(PanelPath.RoundedRect(bounds, 6), fill));
src\Aspire.Tray\Common\TrayPanelGeometry.cs (12)
68public PanelPath MoveTo(double x, double y) 74public PanelPath LineTo(double x, double y) 80public PanelPath CubicTo(double x1, double y1, double x2, double y2, double x, double y) 86public PanelPath Close() 97public PanelPath Arc(double centerX, double centerY, double radius, double startDegrees, double sweepDegrees, bool connect = false) 130public static PanelPath Circle(double centerX, double centerY, double radius) 133public static PanelPath Rectangle(PanelRect rect) 137public static PanelPath RoundedRect(PanelRect rect, double radius) 141public static PanelPath RoundedRect(PanelRect rect, double topLeft, double topRight, double bottomRight, double bottomLeft) 148var path = new PanelPath().MoveTo(rect.X + topLeft, rect.Y).LineTo(rect.Right - topRight, rect.Y); 172public PanelPath Transform(double scale, double offsetX, double offsetY) 174var result = new PanelPath();
src\Aspire.Tray\Common\TrayPanelGlyphs.cs (24)
65Fill(PanelPath.Circle(10, 14.1, 1.15), palette.WarningMark); 77Fill(PanelPath.Circle(10, 14.1, 1.05), palette.NeutralMark); 80Stroke(PanelPath.Circle(10, 10, 7.25), palette.Neutral, 1.5); 81Fill(PanelPath.RoundedRect(new(7, 7, 6, 6), 1.4), palette.Neutral); 86Stroke(PanelPath.Circle(10, 10, 7), palette.Neutral.WithAlpha(0.3), 2); 91void Disc(PanelColor color) => Fill(PanelPath.Circle(10, 10, 8), color); 92void Fill(PanelPath path, PanelColor color) => commands.Add(new FillPathCommand(path.Transform(scale, bounds.X, bounds.Y), color)); 93void Stroke(PanelPath path, PanelColor color, double width) 112Fill(PanelPath.RoundedRect(new(4.25, 4.25, 7.5, 7.5), 1.5)); 116var play = new PanelPath().MoveTo(5.25, 3.75).LineTo(12.25, 8).LineTo(5.25, 12.25).Close(); 123Fill(PanelPath.Circle(x, 8, 1.3)); 128Stroke(PanelPath.Circle(8, 8, 2.1), 1.4); 147Fill(PanelPath.Circle(8, 11.4, 0.85)); 156Stroke(PanelPath.RoundedRect(new(2.25, 3, 11.5, 10), 1.75), 1.4); 167Stroke(PanelPath.RoundedRect(new(5.75, 5.75, 7.5, 7.5), 1.5), 1.4); 184Stroke(PanelPath.Circle(8, 8, 5.75), 1.3); 194void Fill(PanelPath path) => commands.Add(new FillPathCommand(path.Transform(scale, bounds.X, bounds.Y), color)); 195void Stroke(PanelPath path, double width) 210commands.Add(new FillPathCommand(PanelPath.RoundedRect(track, 9).Transform(scale, bounds.X, bounds.Y), 215commands.Add(new StrokePathCommand(PanelPath.RoundedRect(track.Inset(0.5, 0.5), 8.5).Transform(scale, bounds.X, bounds.Y), 218commands.Add(new FillPathCommand(PanelPath.Circle(on ? 23 : 9, 9, 6.5).Transform(scale, bounds.X, bounds.Y), 222commands.Add(new StrokePathCommand(PanelPath.Circle(9, 9, 6.5).Transform(scale, bounds.X, bounds.Y), 231private static PanelPath CreateGear() 234var path = new PanelPath();
src\Aspire.Tray\Common\TrayPanelScene.cs (2)
53internal sealed record FillPathCommand(PanelPath Path, PanelColor Color) : PanelCommand; 56internal sealed record StrokePathCommand(PanelPath Path, PanelColor Color, double Width) : PanelCommand;
TrayPanelTests.cs (5)
922var path = new PanelPath().Arc(10, 20, 5, start, sweep); 943Assert.Equal(PanelPath.QuarterArcKappa, cubic.Y1, 6); 944Assert.Equal(PanelPath.QuarterArcKappa, cubic.X2, 6); 951var path = PanelPath.RoundedRect(rect, 6);