-
Notifications
You must be signed in to change notification settings - Fork 1
/
IGThermalSupport.h
executable file
·35 lines (30 loc) · 1.62 KB
/
IGThermalSupport.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
// IGThermalSupport.h
//
// This class is released in the MIT license.
// Created by Chris Chan in 12 Aug 2012.
// Copyright (c) 2012 IGPSD Ltd.
//
// https://github.com/moming2k/ThermalPrinterKit.git
//
// Version 1.0.3
#import <Foundation/Foundation.h>
typedef enum {
ALPHA = 0,
BLUE = 1,
GREEN = 2,
RED = 3
} PIXELS;
@interface IGThermalSupport : NSObject
+ (NSData *) imageToThermalData:(UIImage*)image;
+ (CGContextRef) newBitmapRGBA8ContextFromImage:(CGImageRef) image;
+ (NSData *)cutLine;
+ (NSData *)feedLines:(int)lines;
+ (UIImage*)mergeImage:(UIImage*)first withShopLogo:(UIImage*)shopLogo withColorType:(NSString*)colorType withNumber:(int)number;
+ (UIImage*)mergeImageQrcode:(UIImage*)first withShopLogo:(UIImage*)shopLogo withImageInfo:(UIImage*)imageInfo withQRCode:(NSString*)qrcode withColorType:(NSString*)colorType withNumber:(int)number withShopName:(NSString*)shopName withShopInfo:(NSString*)shopInfo withTicketTime:(NSString*)ticketTime withTicketDetail:(NSString*)ticketDetail;
+ (UIImage*)mergeImageStore:(UIImage*)first withImageInfo:(UIImage*)imageInfo withQRCode:(NSString*)qrcode withNumber:(int)number withShopName:(NSString*)shopName withShopInfo:(NSString*)shopInfo withTicketTime:(NSString*)ticketTime withTicketDetail:(NSString*)ticketDetail;
+ (UIImage*)drawText:(NSString*)text inImage:(UIImage*)image atPoint:(CGPoint)point withFont:(UIFont *)font;
+ (UIImage*)mergeImage2:(UIImage*)first withQRCode:(NSString*)qrcode withNumber:(int)number;
+ (UIImage *) receiptImage:(UIImage*)image withNumber:(int)number;
+ (CGFloat)widthOfString:(NSString *)string withFont:(UIFont *)font;
@end