Skip to content

Commit

Permalink
docs: migrate docs(related to standard writer) into writer
Browse files Browse the repository at this point in the history
  • Loading branch information
yeqown committed Nov 16, 2021
1 parent 504a1a7 commit d2f7026
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
Binary file removed docs/qrcode_structure.png
Binary file not shown.
7 changes: 6 additions & 1 deletion writer/standard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,9 @@ func WithCustomImageEncoder(encoder ImageEncoder) ImageOption
// WithBorderWidth(a, b) mean top/bottom equal to `a`, left/right equal to `b`.
// WithBorderWidth(a, b, c, d) mean top, right, bottom, left.
func WithBorderWidth(widths ...int) ImageOption
```
```

### extension

- [How to customize QR Code shape](./how-to-use-custom-shape.md)
- [How to customize ImageEncoder](./how-to-use-image-encoder.md)
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
## How to use custom shape

[Source Code](../example/with-custom-shape/main.go)
[Source Code](../../example/with-custom-shape/main.go)

first step, you must define your own shape to QRCode, which consists of two part:
* normal cell (of course, there are many types, separator, timing, alignment patter, data, format and version etc)
* finder cell (to help recognizer to locate the matrix's position)

<img src="./qrcode_structure.png" align="center" width="50%" />
<img src="../../assets/qrcode_structure.png" align="center" width="50%" />

```go
type IShape interface {
Expand Down
1 change: 1 addition & 0 deletions writer/standard/how-to-use-image-encoder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Customize image encoder

0 comments on commit d2f7026

Please sign in to comment.