We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3368bf9 commit 5796097Copy full SHA for 5796097
1 file changed
src/ImageSharp.Drawing/Processing/PathGradientBrush.cs
@@ -280,7 +280,9 @@ public PathGradientBrushApplicator(
280
Vector4 pointColor = ((1 - u - v) * this.edges[0].StartColor) + (u * this.edges[0].EndColor) +
281
(v * this.edges[2].StartColor);
282
283
- return new Color(pointColor).ToPixel<TPixel>();
+ TPixel px = default;
284
+ px.FromVector4(pointColor);
285
+ return px;
286
}
287
288
var direction = Vector2.Normalize(point - this.center);
@@ -301,7 +303,9 @@ public PathGradientBrushApplicator(
301
303
302
304
var color = Vector4.Lerp(edgeColor, this.centerColor, ratio);
305
- return new Color(color).ToPixel<TPixel>();
306
+ TPixel pixel = default;
307
+ pixel.FromVector4(color);
308
+ return pixel;
309
310
311
0 commit comments