Skip to content

Commit

Permalink
Merge pull request #187 from Saibamen/patch-1
Browse files Browse the repository at this point in the history
Update README.md - fix usage
  • Loading branch information
barnhill authored Feb 3, 2024
2 parents dfea4a4 + 8f69b9b commit 262776e
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# barcodelib ![Barcode CI](https://github.com/barnhill/barcodelib/workflows/Barcode%20CI/badge.svg) [![NuGet](https://img.shields.io/nuget/v/BarcodeLib.svg)](https://www.nuget.org/packages/BarcodeLib)

### Overview ###
## Overview

This library was designed to give an easy class for developers to use when they need to generate barcode images from a string of data.

| Supported | Symbology | List |
Expand All @@ -14,29 +14,32 @@ This library was designed to give an easy class for developers to use when they
| ITF-14 | Telepen | UPC Supplemental 2 |
| JAN-13 | EAN-13 | UPC Supplemental 5 |

### Usage ###
## Usage

The library contains a class called BarcodeLib with three constructors:

```csharp
Barcode();
Barcode(string);
Barcode(string, BarcodeLib.TYPE);
Barcode(string, Type);
```

If you decide to create an instance with parameters, the parameters are as follows: the string is the data to be encoded into the barcode, and BarcodeLib.TYPE is the symbology to encode the data with. If you do not choose to specify the data and type at the time the instance is created, you may specify them through the appropriate property later on (but before you encode).

### Example ###
## Example

```csharp
var b = new Barcode();
b.IncludeLabel = true;
Image img = b.Encode(BarcodeLib.TYPE.UPCA, "038000356216", Color.Black, Color.White, 290, 120);
var img = b.Encode(Type.UpcA, "038000356216", SKColors.Black, SKColors.White, 290, 120);
```

![Alt text](BarcodeStandard/examples/upca.jpg?raw=true "UPC-A")

### Support ###
## Support

If you find this or any of my software useful and decide its worth supporting. You can do so here: [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QKT9PSYTDNSXS)

### Copyright and license ###
## Copyright and license

Copyright 2007-2023 Brad Barnhill. Code released under the [Apache License, Version 2.0](https://github.com/bbarnhill/barcodelib/blob/master/LICENSE).

0 comments on commit 262776e

Please sign in to comment.