forked from lrsjng/kjua
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
737316b
commit ea0c088
Showing
18 changed files
with
1,317 additions
and
1,171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
declare function kjua(options: KjuaOptions); | ||
|
||
export interface KjuaOptions { | ||
/** | ||
* Render the image as either SVG, canvas or PNG-image | ||
*/ | ||
render?: 'image' | 'svg' | 'canvas'; | ||
|
||
/** | ||
* render pixel-perfect lines | ||
*/ | ||
crisp?: boolean; | ||
|
||
/** | ||
* minimum version: 1..40 | ||
*/ | ||
minVersion?: number; | ||
|
||
/** | ||
* error correction level: 'L', 'M', 'Q' or 'H' | ||
*/ | ||
ecLevel?: 'L' | 'M' | 'Q' | 'H'; | ||
|
||
/** | ||
* size in pixel | ||
*/ | ||
size?: number; | ||
|
||
/** | ||
* pixel-ratio, null for devicePixelRatio | ||
*/ | ||
ratio?: number | null; | ||
|
||
/** | ||
* code color | ||
*/ | ||
fill?: string; | ||
|
||
/** | ||
* background color | ||
*/ | ||
back?: string; | ||
|
||
/** | ||
* content | ||
*/ | ||
text?: string; | ||
|
||
/** | ||
* roundend corners in pc: 0..100 | ||
*/ | ||
rounded?: number; | ||
|
||
/** | ||
* quiet zone in modules | ||
*/ | ||
quiet?: number; | ||
|
||
/** | ||
* modes: 'plain', 'label' or 'image' | ||
*/ | ||
mode?: 'plain' | 'label' | 'image'; | ||
|
||
/** | ||
* label/image size and pos in pc: 0..100 | ||
*/ | ||
mSize?: number; | ||
mPosX?: number; | ||
mPosY?: number; | ||
|
||
/** | ||
* label | ||
*/ | ||
label?: string; | ||
fontname?: string; | ||
fontcolor?: string; | ||
fontoutline?: boolean; | ||
|
||
/** | ||
* image element | ||
*/ | ||
image?: null | HTMLImageElement | string; | ||
|
||
/** | ||
* draw the image as part of the code | ||
*/ | ||
imageAsCode?: boolean; | ||
} |
Oops, something went wrong.