////
////  ZPLDemo.swift
////  iOSPrinterDemo
////
////  Created by mellow on 2017/4/19.
////  Copyright © 2017年 Mellow. All rights reserved.
////
//
//import Foundation
//
//public class ZPLDemo: NSObject {
//    
//    func labelStart() {
//        
//        let cmd = PTCommandZPL()
//        cmd.zplFormatStart()
//        cmd.zplFieldTypeset(withXAxis: 0, yAxis: 0, justification: <#T##Int#>)
//        cmd.zplSetFont("5", fieldOrientation: "N", characterHeight: <#T##Int#>, width: <#T##Int#>)
//        cmd.zplFieldData("Text")
//        cmd.zplFormatEnd()
//        PrinterPort.sendData(data: cmd.cmdData as Data)
//    }
//    
//    func fieldData() {
//        let cmd = PTCommandZPL()
//        cmd.zplFormatStart()
//        cmd.zplFieldOrigin(withXAxis: 0, yAxis: 0, justification: 0)
//        cmd.zplFieldData("Text (Field Data)")
//        cmd.zplFieldSeparator()
//        cmd.zplFormatEnd()
//        PrinterPort.sendData(data: cmd.cmdData as Data)
//    }
//    
//    func printWidth() {
//        let cmd = PTCommandZPL()
//        cmd.zplFormatStart()
//        cmd.zplPrintWidth(100)
//        cmd.zplFieldOrigin(withXAxis: 0, yAxis: 0, justification: 0)
//        cmd.zplFieldData("Text (Field Data)")
//        cmd.zplFieldSeparator()
//        cmd.zplFormatEnd()
//        PrinterPort.sendData(data: cmd.cmdData as Data)
//    }
//    
//    
//    /// 打印方向和对齐方式
//    func fieldOrientationAndJustification() {
//        let cmd = PTCommandZPL()
//        cmd.zplFormatStart()
//        cmd.zplFieldOrientation("N", justification: 0)
//        cmd.zplFieldOrigin(withXAxis: 0, yAxis: 0, justification: 0)
//        cmd.zplFieldData("Text (Field Data)")
//        cmd.zplFieldSeparator()
//        cmd.zplFormatEnd()
//        PrinterPort.sendData(data: cmd.cmdData as Data)
//    }
//    
//    
//    /// 打印直线
//    func printDiagonalLine() {
//        let cmd = PTCommandZPL()
//        cmd.zplFormatStart()
//        cmd.zplFieldOrientation("N", justification: 0)
//        cmd.zplFieldOrigin(withXAxis: 0, yAxis: 0, justification: 0)
//        cmd.zplGraphicDiagonalLine(withWidth: 100, height: 100, thickness: 2, lineColor: "B", orientation: "R")
//        cmd.zplFormatEnd()
//        PrinterPort.sendData(data: cmd.cmdData as Data)
//    }
//    
//    
//    /// 打印圆
//    func printCircle() {
//        let cmd = PTCommandZPL()
//        cmd.zplFormatStart()
//        cmd.zplFieldOrigin(withXAxis: 0, yAxis: 0, justification: 0)
//        cmd.zplGraphicCircle(withDiameter: 100, thickness: 2, lineColor: "B")
//        cmd.zplFormatEnd()
//        PrinterPort.sendData(data: cmd.cmdData as Data)
//    }
//    
//    
//    /// 整体向左偏移
//    func labelShift() {
//        let cmd = PTCommandZPL()
//        cmd.zplFormatStart()
//        cmd.zplLabelShift(20)
//        // print text
//        cmd.zplFormatEnd()
//        PrinterPort.sendData(data: cmd.cmdData as Data)
//    }
//    
//    func textBlock() {
//        let cmd = PTCommandZPL()
//        cmd.zplFormatStart()
//        cmd.zplTextBlock(withRotation: "N", width: 300, height: 300)
//        // print text
//        cmd.zplFormatEnd()
//        PrinterPort.sendData(data: cmd.cmdData as Data)
//    }
//    
//    func printQRCode() {
//        let cmd = PTCommandZPL()
//        cmd.zplFormatStart()
////        cmd.zplBarcodeQRcode(withOrientation: <#T##String!#>, model: <#T##Int#>, magnification: <#T##Int#>, reliabilityLevel: <#T##String!#>)
//        cmd.zplFormatEnd()
//        PrinterPort.sendData(data: cmd.cmdData as Data)
//    }
//    
//    func printBarcode() {
//        let cmd = PTCommandZPL()
//        cmd.zplFormatStart()
////        cmd.barcode
//        cmd.zplFormatEnd()
//        PrinterPort.sendData(data: cmd.cmdData as Data)
//    }
//    
//    func printImage() {
//        
//        let cmd = PTCommandZPL()
//        cmd.zplFormatStart()
////        cmd.image
//        cmd.zplFormatEnd()
//        PrinterPort.sendData(data: cmd.cmdData as Data)
//    }
//}
