dco_decode_ldd_command method

  1. @protected
LddCommand dco_decode_ldd_command(
  1. dynamic raw
)
override

Implementation

@protected
LddCommand dco_decode_ldd_command(dynamic raw) {
  // Codec=Dco (DartCObject based), see doc to use other codecs
  switch (raw[0]) {
    case 0:
      return LddCommand_Cut();
    case 1:
      return LddCommand_Reset();
    case 2:
      return LddCommand_PrintModeDefault();
    case 3:
      return LddCommand_SelectCharset(
        charset: dco_decode_ldd_charset(raw[1]),
      );
    case 4:
      return LddCommand_SelectCodeTable(
        codeTable: dco_decode_ldd_code_table(raw[1]),
      );
    case 5:
      return LddCommand_SelectFont(
        font: dco_decode_ldd_font(raw[1]),
      );
    case 6:
      return LddCommand_UnderlineOff();
    case 7:
      return LddCommand_Underline1Dot();
    case 8:
      return LddCommand_Underline2Dot();
    case 9:
      return LddCommand_BoldOn();
    case 10:
      return LddCommand_BoldOff();
    case 11:
      return LddCommand_Bitmap();
    case 12:
      return LddCommand_NoLine();
    case 13:
      return LddCommand_ResetLine();
    default:
      throw Exception("unreachable");
  }
}