QRCoder icon indicating copy to clipboard operation
QRCoder copied to clipboard

[WIP/QRCoder2] Use of System.Drawing.Primitives

Open codebude opened this issue 1 year ago • 1 comments

Note: This issue is part of the planning of version 2 of the QRCoder. The meta-issue can be found here. These comments have been copied into this issue here, with the comments marked as such. If comments on the topic of this issue already exist in the meta thread, they have been copied here, naming the authors.

Topic

How do we handle renderers that use primitives like Size, Point, etc. from System.Drawing.Primitives but nothing from System.Drawing.Common? Do we also rebuild them to get rid of System.Drawing completely or do we leave them because System.Drawing.Primitives is still available on all platforms. If replace: With what? Primitives from another library or define our own classes/structures?

codebude avatar May 26 '24 14:05 codebude

I would use System.Drawing.Primitives if/as desired, as it creates no dependencies except when targeting .NET Standard 1.3.

Originally posted by @Shane32 here.

codebude avatar May 26 '24 14:05 codebude

System.Drawing.Primitives doesn't include System.Drawing.Color, so it does not seem to have any benefit. Base64QRCode requires Color to use for .NET Standard 1.3 without changes to the API, and so this doesn't help. Further, System.Drawing.Color is embedded into .NET Standard 2.0, so it will be unnecessary for QRCoder v2 which will use .NET Standard 2.0 as a baseline.

Shane32 avatar Oct 02 '25 01:10 Shane32