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