SkiaSharp is a cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.
MIT License
4.17k
stars
522
forks
source link
[FEATURE] Implicit conversions between ValueTuples and SKPoint #2862
Is your feature request related to a problem?
I would like to be able to specify points in an easier way.
Describe the solution you would like
Therefore, I suggest adding an implicit conversion between a ValueTuple and a
SKPoint
as well as a deconstructor:This would allow us to define a point as
SKPoint point = (x, y);
instead ofSKPoint point = new SKPoint(x, y);
.The inverse would also be possible:
var (x, y) = point;
.Describe alternatives you have considered
It is currently (C#12) not possible to declare operators as extension methods.
Additional context
No response
Code of Conduct