News for hackers. Stuff that matters.
Re:Asynchronous Programming in C# by alkonaut on Tuesday April 30, 2024 @07:17AM (#40209723)
What dependencies/limitations are that?
Re:Asynchronous Programming in C# by keltex on Tuesday April 30, 2024 @08:06AM (#40210102)
The biggest one I've run into is GDI support (Graphics Device Interface). This covers things like two-dimensional vector graphics, imaging, and typography. So simple things like transforming or drawing images are no longer supported.

There are decent third party open-source libaries like SixLabors/ImageSharp that have stared to fill the gap.

Re:Asynchronous Programming in C# by alkonaut on Tuesday April 30, 2024 @10:24AM (#40211249)
System.Drawing was always just a wrapper for GDI(+), and you CAN use it on Linux via using System.Drawing.Common which is a wrapper for GDI+ (Windows) or something else like libgdi+ on non-windows. It works - but it feels more like a compat hack than anything else. System.Drawing wouldn't look the way it does if it wasn't designed to be a Windows only API around GDI+. ImageSharp was always a good lib but now the license was murdered. Hopefully a true OSS fork will come along. SkiaSharp is also a good alternative, especially if you also need the drawing bits.

Missing a Graphics Library in .NET (5-8) is just half the story. It's of course missing an entire UI library too. But Microsoft, perhaps wisely, chose not to also implement a whole xplat UI library. Avalonia/Uno/etc are already there.