appendBitmapByte method

dynamic appendBitmapByte({
  1. required Uint8List byteData,
  2. bool diffusion = true,
  3. int width = 576,
  4. bool bothScale = true,
  5. int? absolutePosition,
  6. StarAlignmentPosition? alignment,
  7. StarBitmapConverterRotation? rotation,
})

Prints an image with a raw data byteData. Set bothScale to scale the image by the width of receipt. Sets absolutePosition image absolute position. StarAlignmentPosition sets image alignment. StarBitmapConverterRotation set image rotation.

Implementation

appendBitmapByte({
  required Uint8List byteData,
  bool diffusion = true,
  int width = 576,
  bool bothScale = true,
  int? absolutePosition,
  StarAlignmentPosition? alignment,
  StarBitmapConverterRotation? rotation,
}) {
  Map<String, dynamic> command = {
    "appendBitmapByteArray": byteData,
  };
  command['bothScale'] = bothScale;
  command['diffusion'] = diffusion;
  command['width'] = width;
  if (absolutePosition != null)
    command['absolutePosition'] = absolutePosition;
  if (alignment != null) command['alignment'] = alignment.text;
  if (rotation != null) command['rotation'] = rotation.text;

  this._commands.add(command);
}