diff --git a/dotnet/QrCodeGenerator/docfx/api/index.md b/dotnet/QrCodeGenerator/docfx/api/index.md index 8e23e78..ad8c076 100644 --- a/dotnet/QrCodeGenerator/docfx/api/index.md +++ b/dotnet/QrCodeGenerator/docfx/api/index.md @@ -1,35 +1,38 @@ -# Swiss QR Bill for .NET Reference Documentation +# QR Code generator library for .NET -## Reference Documentation +Generates QR codes from text strings and byte arrays. -**[Codecrete.SwissQRBill.Generator.QRBill](xref:Codecrete.SwissQRBill.Generator.QRBill)**: Generates Swiss QR bill (receipt and payment part). Also validates the bill data and encode and decode the text embedded in the QR code. +This project aims to be the best, clearest QR code generator library. The primary goals are flexible options +and absolute correctness. Secondary goals are compact implementation size and good documentation comments. -**[Codecrete.SwissQRBill.Generator.QRBill](xref:Codecrete.SwissQRBill.Generator.Bill)**: QR bill data as input for generation or output from decoding +This .NET version is built for .NET Standard 2.0 and therefore runs on most modern .NET platforms (.NET Core, .NET Framework, Mono etc.). -**[Codecrete.SwissQRBill.Generator.Payments](xref:Codecrete.SwissQRBill.Generator.Payments)**: Utility for generating and validation payment related data such as IBAN and reference numbers. +Home page with live JavaScript demo, extensive descriptions, and competitor comparisons: +[https://www.nayuki.io/page/qr-code-generator-library](https://www.nayuki.io/page/qr-code-generator-library) -[All types and classes](xref:Codecrete.SwissQRBill.Generator) +## .NET API Documention -Generates QR Codes from text strings and byte arrays. +* [QrCode](xref:IO.Nayuki.QrCodeGen.QrCode): Creates and represents QR codes -This project aims to be the best, clearest QR Code generator library. The primary goals are flexible options -and absolute correctness. Secondary goals are compact implementation size and good documentation comments. +* [QrSegment](xref:IO.Nayuki.QrCodeGen.QrSegment): Represents a segment of character/binary/control data in a QR code symbol + +* [QrSegmentAdvanced](xref:IO.Nayuki.QrCodeGen.QrSegmentAdvanced): Advanced methods for encoding QR codes using Kanji mode or using multiple segments with different encodings. + +* [All types and classes](xref:IO.Nayuki.QrCodeGen) -Home page with live JavaScript demo, extensive descriptions, and competitor comparisons: -[https://www.nayuki.io/page/qr-code-generator-library](https://www.nayuki.io/page/qr-code-generator-library) ## Features Core features: - * Available in 7 programming languages, all with nearly equal functionality: Java, JavaScript, TypeScript, Python, C++, C, Rust + * Available in 8 programming languages, all with nearly equal functionality: C#, Java, JavaScript, TypeScript, Python, C++, C, Rust * Significantly shorter code but more documentation comments compared to competing libraries * Supports encoding all 40 versions (sizes) and all 4 error correction levels, as per the QR Code Model 2 standard - * Output formats: Raw modules/pixels of the QR symbol, SVG XML string, {@code BufferedImage} raster bitmap + * Output formats: Raw modules/pixels of the QR symbol, SVG XML string, raster bitmap * Encodes numeric and special-alphanumeric text in less space than general text @@ -53,40 +56,59 @@ Optional advanced features: * Computes optimal segment mode switching for text with mixed numeric/alphanumeric/general/kanji parts + ## Examples Simple operation: -```csharp -namespace QrCode { - +```cslang +using IO.Nayuki.QrCodeGen; + +namespace Examples +{ + class SimpleOperation + { + static void Main(string[] args) + { + var qr = QrCode.EncodeText("Hello, world!", QrCode.Ecc.Medium); + using (var bitmap = qr.ToBitmap(4, 10)) + { + bitmap.Save("qr-code.png", ImageFormat.Png); + } + } + } } - *
import java.awt.image.BufferedImage; - *import java.io.File; - *import javax.imageio.ImageIO; - *import io.nayuki.qrcodegen.*; - * - *QrCode qr = QrCode.encodeText("Hello, world!", QrCode.Ecc.MEDIUM); - *BufferedImage img = qr.toImage(4, 10); - *ImageIO.write(img, "png", new File("qr-code.png"));- *
Manual operation:
- *import java.util.List; - *import io.nayuki.qrcodegen.*; - * - *List<QrSegment> segs = QrSegment.makeSegments("3141592653589793238462643383"); - *QrCode qr = QrCode.encodeSegments(segs, QrCode.Ecc.HIGH, 5, 5, 2, false); - *for (int y = 0; y < qr.size; y++) { - * for (int x = 0; x < qr.size; x++) { - * (... paint qr.getModule(x, y) ...) - * } - *}- ``` - +``` + +Manual operation: + +```cslang +using IO.Nayuki.QrCodeGen; + +namespace Examples +{ + class ManualOperation + { + static void Main(string[] args) + { + var segments = QrCode.MakeSegments("3141592653589793238462643383"); + var qr = QrCode.EncodeSegments(segments, QrCode.Ecc.High, 5, 5, 2, false); + for (int y = 0; y < qr.Size; y++) + { + for (int x = 0; x < qr.Size; x++) + { + ... paint qr.GetModule(x,y) ... + } + } + } + } +} +``` ## Requirements -Swiss QR Bill for .NET requires .NET Standard 2.0 or higher, i.e. any of: +QR code generator library for .NET requires .NET Standard 2.0 or higher, i.e. any of: - .NET Core 2.0 or higher - .NET Framework 4.6.1 or higher diff --git a/dotnet/QrCodeGenerator/docfx/index.md b/dotnet/QrCodeGenerator/docfx/index.md index 830ec1a..e709ee4 100644 --- a/dotnet/QrCodeGenerator/docfx/index.md +++ b/dotnet/QrCodeGenerator/docfx/index.md @@ -1,5 +1,3 @@ # QR Code generator library for .NET -## .NET API Documention - -[Swiss QR Bill .NET Reference Documentation](api/index.md) +[.NET Reference Documentation](api/index.md)