ux: use CubicBezierTo instead of calling QuadraticBezierTo twice for curves in commit graph (#57)

This commit is contained in:
leo 2024-04-03 15:32:23 +08:00
parent 0252887442
commit 099e6a4f97

View file

@ -216,9 +216,7 @@ namespace SourceGit.Views
if (i < size - 1)
{
var midY = (last.Y + cur.Y) / 2;
var midX = (last.X + cur.X) / 2;
ctx.QuadraticBezierTo(new Point(last.X, midY), new Point(midX, midY));
ctx.QuadraticBezierTo(new Point(cur.X, midY), cur);
ctx.CubicBezierTo(new Point(last.X, midY + 2), new Point(cur.X, midY - 2), cur);
}
else
{