private Task GenerateAndComparePngBill(Bill bill, SeparatorType separatorType) { bill.Format.SeparatorType = separatorType; using PNGCanvas canvas = new PNGCanvas(QRBill.A4PortraitWidth, QRBill.A4PortraitHeight, 288, "Arial,Helvetica"); QRBill.Draw(bill, canvas); return(VerifyImages.VerifyPng(canvas.ToByteArray())); }
private Task GenerateAndCompareBill(Bill bill, OutputSize outputSize, GraphicsFormat graphicsFormat) { bill.Format.OutputSize = outputSize; bill.Format.GraphicsFormat = graphicsFormat; bill.Format.FontFamily = "Arial,\"Liberation Sans\""; byte[] imageData = QRBill.Generate(bill); return(VerifyImages.VerifyPng(imageData)); }
public Task PngBillQrBill() { Bill bill = SampleData.CreateExample1(); byte[] png; using (PNGCanvas canvas = new PNGCanvas(QRBill.QrBillWidth, QRBill.QrBillHeight, 300, "\"Liberation Sans\",Arial, Helvetica")) { bill.Format.OutputSize = OutputSize.QrBillOnly; QRBill.Draw(bill, canvas); png = canvas.ToByteArray(); } return(VerifyImages.VerifyPng(png)); }
public Task PngBillA4() { Bill bill = SampleData.CreateExample3(); byte[] png; using (PNGCanvas canvas = new PNGCanvas(QRBill.A4PortraitWidth, QRBill.A4PortraitHeight, 144, "Arial,\"Liberation Sans\",Helvetica")) { bill.Format.OutputSize = OutputSize.A4PortraitSheet; QRBill.Draw(bill, canvas); png = canvas.ToByteArray(); } return(VerifyImages.VerifyPng(png)); }