Commit 2f4e2787 authored by Andrey's avatar Andrey

Added Turn 90° clockwise rotation mode on/off

parent ace22e5c
......@@ -81,8 +81,8 @@ printer.printRow([
* Print images
* Print barcodes
* Print QR codes
* Turn 90° clockwise rotation mode on/off
* ~~Turn 90° clockwise rotation mode on/off~~
* Flutter example: print a demo receipt
* Flutter example: discover active Wi-Fi printers
* ~~Flutter example: discover active Wi-Fi printers~~
* USB, Bluetooth printers support
* *Add encoding commands*
\ No newline at end of file
......@@ -29,6 +29,9 @@ const cBoldOn = '${esc}E1'; // Turn emphasized mode on
const cBoldOff = '${esc}E0'; // Turn emphasized mode off
const cFontA = '${esc}M0'; // Font A
const cFontB = '${esc}M1'; // Font B
const cTurn90On = '${esc}V1'; // Turn 90° clockwise rotation mode on
const cTurn90Off = '${esc}V0'; // Turn 90° clockwise rotation mode off
const cCodeTable = '${esc}t'; // Select character code table [N]
// Print Position
const cAlignLeft = '${esc}a0'; // Left justification
......@@ -39,6 +42,3 @@ const cPos = '$esc\$'; // Set absolute print position [nL] [nH]
// Print
const cFeedN = '${esc}d'; // Print and feed n lines [N]
const cReverseFeedN = '${esc}e'; // Print and reverse feed n lines [N]
// Code table
const cCodeTable = '${esc}t'; // Select character code table [N]
\ No newline at end of file
......@@ -14,6 +14,7 @@ class PosStyles {
this.bold = false,
this.reverse = false,
this.underline = false,
this.turn90 = false,
this.align = PosTextAlign.left,
this.height = PosTextSize.size1,
this.width = PosTextSize.size1,
......@@ -23,6 +24,7 @@ class PosStyles {
final bool bold;
final bool reverse;
final bool underline;
final bool turn90;
final PosTextAlign align;
final PosTextSize height;
final PosTextSize width;
......
......@@ -66,6 +66,7 @@ class Printer {
// print('dec: $pos \t hex: $hexStr \t pair $hexPair');
_socket.write(styles.bold ? cBoldOn : cBoldOff);
_socket.write(styles.turn90 ? cTurn90On : cTurn90Off);
_socket.write(styles.reverse ? cReverseOn : cReverseOff);
_socket.write(styles.underline ? cUnderline1dot : cUnderlineOff);
_socket.write(styles.align == PosTextAlign.left
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment