Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PostscriptQRCode so it runs on Linux #493

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

Shane32
Copy link
Contributor

@Shane32 Shane32 commented Apr 2, 2024

Summary

  • Updates PostscriptQRCode so it runs on all platforms except .NET Standard 1.3
  • Adds tests for PostscriptQRCode

Notes

  • Although I added tests to validate existing functionality, I did not attempt printing any of the postscript output to verify it myself.
  • No functionality changes were made to PostscriptQRCode.

@Shane32 Shane32 force-pushed the postscript_linux branch from c287050 to 08b2ef9 Compare April 2, 2024 22:34
@codebude
Copy link
Owner

codebude commented Apr 3, 2024

I'm confused. How does this work? The PostscriptQRCode uses System.Drawing multiple times (Color, Size, ...), but per my knoweldge System.Drawing isn't available on non-Windows platforms any longer: https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/6.0/system-drawing-common-windows-only

Thus I thought that PostscriptQRCode can't work on non-Windows platforms.
See also: #484

@Shane32
Copy link
Contributor Author

Shane32 commented Apr 3, 2024

Color and Size are located in the System.Drawing.Primitives assembly which is still supported - not System.Drawing.Common. They are basically just structs and constants.

See documentation here:

https://learn.microsoft.com/en-us/dotnet/api/system.drawing?view=net-8.0

Some types in the System.Drawing namespace rely on GDI+, which is not supported in Windows services and ASP.NET Core and ASP.NET apps. These types are in the System.Drawing.Common NuGet package and include System.Drawing.Bitmap and System.Drawing.Font. However, primitive types in the namespace, such as System.Drawing.Color, System.Drawing.Size, System.Drawing.Point, and System.Drawing.Rectangle, can be used in any application.

@codebude codebude merged commit c90e1ef into codebude:master Apr 3, 2024
3 checks passed
@Shane32 Shane32 deleted the postscript_linux branch April 3, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants