9 #import <Foundation/Foundation.h>
10 #import "CustomPrinter.h"
12 #import "CustomError.h"
17 @interface BitmapData : NSObject
29 -(id)initWithImage:(UIImage*)image;
30 - (NSInteger) GetPixel:(NSInteger)x :(NSInteger)y;
36 @interface BitmapIntData : NSObject
41 int* bitmapLastByteWrote;
51 -(id)initWithSize:(NSInteger)iWidth :(NSInteger)iHeight;
53 - (void) SetColor:(NSInteger)x :(NSInteger)y :(Byte)color;
54 - (Byte) GetColor:(NSInteger)x :(NSInteger)y;
55 - (NSInteger) GetLastByteWrote:(NSInteger)y;
61 @interface Graphics : NSObject
78 + (void) ImageToBuffer:(CommPort*)comPort :(enum Compression)cmpType :(UIImage*)image :(NSInteger)prnResolution :(NSInteger)leftMargin :(enum ImageScale)widthOption :(NSInteger)imgWidth :(NSInteger)paperWidth :(Boolean)bAddPageWidth :(NSInteger)topmargin :(NSError**)error;
80 + (void) BarcodeToBuffer:(CommPort*)comPort :(enum Compression)cmpType :(NSData*)brcData :(NSInteger)prnResolution :(NSInteger)leftMargin :(NSInteger)brcHeight :(NSInteger)paperWidth :(Boolean)bAddPageWidth :(NSInteger)topmargin :(NSError**)error;
82 + (BitmapIntData*) ditherImageFloydSteinberg:(UIImage*)image :(NSInteger)destwidth :(NSInteger)destheight :(NSInteger)maximgwidth;
83 + (Byte) CalcGreyColor:(BitmapData*)bmpData :(NSInteger)srcX :(NSInteger)srcY;
84 + (BitmapIntData*) ditherBarcode:(NSData*)brcData :(NSInteger)destheight;
86 + (void) CompressBitmap_NONE:(CommPort*)comPort :(BitmapIntData*)imageBWcolors :(NSInteger)prnResolution :(NSInteger)leftMargin :(NSInteger)destheight :(NSInteger)paperWidth :(Boolean)bAddPageWidth :(NSInteger)topmargin :(NSError**)error;
87 + (NSMutableData*) GetGraphicLine_NONE:(BitmapIntData*)BuffImgBW :(NSInteger)iY :(NSInteger)iDotlineWidth :(NSInteger)leftMargin;
89 + (void) CompressBitmap_FERLE:(CommPort*)comPort :(BitmapIntData*)imageBWcolors :(NSInteger)prnResolution :(NSInteger)leftMargin :(NSInteger)destheight :(NSInteger)paperWidth :(Boolean)bAddPageWidth :(NSInteger)topmargin :(NSError**)error;
90 + (NSMutableData*) GetGraphicLine_FERLE:(BitmapIntData*)BuffImgBW :(NSInteger)iY :(NSInteger)iDotlineWidth :(NSInteger)leftMargin;