31 instantiations of PanelPath
aspire-tray (31)
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
();
67 references to PanelPath
aspire-tray (67)
src\Aspire.Tray\Common\TrayPanel.cs (25)
943
commands.Add(new FillPathCommand(
PanelPath
.RoundedRect(panel, CornerRadius), palette.Background));
944
commands.Add(new FillPathCommand(
PanelPath
.RoundedRect(footer, 0, 0, CornerRadius, CornerRadius), palette.Gutter));
945
commands.Add(new FillPathCommand(
PanelPath
.Rectangle(new(0, footer.Y, Width, 1)), palette.Separator));
948
commands.Add(new FillPathCommand(
PanelPath
.RoundedRect(new(0, 0, Width, HeaderHeight), CornerRadius, CornerRadius, 0, 0), palette.Gutter));
949
commands.Add(new FillPathCommand(
PanelPath
.Rectangle(new(0, HeaderHeight - 1, Width, 1)), palette.Separator));
968
commands.Add(new FillPathCommand(
PanelPath
.Rectangle(new(0, _viewport.Y, Width, 1)), palette.Separator));
1018
commands.Add(new FillPathCommand(
PanelPath
.RoundedRect(thumb, 2), palette.TextTertiary.WithAlpha(0.4)));
1022
commands.Add(new StrokePathCommand(
PanelPath
.RoundedRect(panel.Inset(0.5, 0.5), CornerRadius - 0.5), palette.Border, 1));
1038
commands.Add(new StrokePathCommand(
PanelPath
.RoundedRect(focused.Bounds.Inset(-1, -1), 7), palette.Focus, 2));
1185
commands.Add(new FillPathCommand(
PanelPath
.Circle(title.Right + 4, statusMiddle, 4), dot));
1202
commands.Add(new FillPathCommand(
PanelPath
.RoundedRect(banner, 6), palette.Banner));
1205
commands.Add(new StrokePathCommand(
PanelPath
.RoundedRect(banner.Inset(0.5, 0.5), 5.5), palette.Border, 1));
1294
commands.Add(new FillPathCommand(
PanelPath
.RoundedRect(row, 6), palette.Hover));
1334
commands.Add(new FillPathCommand(
PanelPath
.RoundedRect(bounds, 6), palette.Pressed));
1405
commands.Add(new FillPathCommand(
PanelPath
.RoundedRect(card, 8), palette.Gutter));
1406
commands.Add(new StrokePathCommand(
PanelPath
.RoundedRect(card.Inset(0.5, 0.5), 7.5), palette.Border, 1));
1477
commands.Add(new FillPathCommand(
PanelPath
.RoundedRect(card, 8), palette.Gutter));
1478
commands.Add(new StrokePathCommand(
PanelPath
.RoundedRect(card.Inset(0.5, 0.5), 7.5), palette.Border, 1));
1506
commands.Add(new FillPathCommand(
PanelPath
.RoundedRect(cancelBounds, 6), palette.Background));
1508
commands.Add(new StrokePathCommand(
PanelPath
.RoundedRect(cancelBounds.Inset(0.5, 0.5), 5.5), palette.Border, 1));
1512
commands.Add(new FillPathCommand(
PanelPath
.RoundedRect(acceptBounds, 6), palette.DangerFill));
1516
commands.Add(new FillPathCommand(
PanelPath
.RoundedRect(acceptBounds, 6),
1521
commands.Add(new StrokePathCommand(
PanelPath
.RoundedRect(acceptBounds.Inset(0.5, 0.5), 5.5), palette.Border, 1));
1603
commands.Add(new FillPathCommand(
PanelPath
.RoundedRect(bounds, 6), palette.Pressed));
1618
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)
59
internal sealed record FillPathCommand(
PanelPath
Path, PanelColor Color) : PanelCommand;
62
internal sealed record StrokePathCommand(
PanelPath
Path, PanelColor Color, double Width) : PanelCommand;
TrayApplication.Panel.cs (4)
497
FillPanelPath(graphics,
PanelPath
.Rectangle(new(0, 0, width / scale + 1, height / scale + 1)), palette.Background);
580
private static void FillPanelPath(nint graphics,
PanelPath
source, PanelColor color)
601
private static void StrokePanelPath(nint graphics,
PanelPath
source, PanelColor color, double width)
631
private static nint CreateGdiplusPath(
PanelPath
source)