diff --git a/src/index.ts b/src/index.ts index f4c8ea9..323d059 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1 +1,27 @@ export * from "./command"; + +import { + FONTMUL, + FONTTYPE, + LabelCommand, + ROTATION, + EEC, +} from "@/command/Label"; + +function main() { + let label = new LabelCommand(50, 30, 0); + label.addText( + 0, + 0, + FONTTYPE.FONT_1, + ROTATION.ROTATION_0, + FONTMUL.MUL_1, + FONTMUL.MUL_1, + "Hello World" + ); + label.addQRCode(0, 0, EEC.LEVEL_L, 5, ROTATION.ROTATION_0, "taoya.art"); + var command = label.getCommand(); + console.log(command); // 获取字节码 + console.log(label.getCommandStr(command)); +} +main();