This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String portChars = "\nCapital Vowels\n" + | |
| "À ALT0192 À\n" + | |
| "Á ALT0193 Á\n" + | |
| "Â ALT0194 Â\n" + | |
| "Ã ALT0195 Ã\n" + | |
| "É ALT0201 É\n" + | |
| "Ê ALT0202 Ê\n" + | |
| "Í ALT0205 Í\n" + | |
| "Ó ALT0211 Ó\n" + | |
| "Ô ALT0212 Ô\n" + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| UIImage *signatureImage = [UIImage imageNamed:@"testSignature.png"]; | |
| //Start an image context (the second param here “YES” says that the context won’t have any alpha channels) | |
| UIGraphicsBeginImageContextWithOptions(signatureImage.size, YES, 0); | |
| CGContextRef context = UIGraphicsGetCurrentContext(); | |
| // Fill with white: | |
| CGContextSetFillColorWithColor(context, [[UIColor whiteColor] CGColor]); | |
| CGContextFillRect(context, (CGRect){ {0,0}, signatureImage.size} ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (IBAction)printText:(id)sender | |
| { | |
| for (int i=0; i < 11; i++) { | |
| for (int j =9; j < 13; j++) { | |
| [self.powaPOS.printer resetPrinter]; | |
| [self.powaPOS.printer printText:[NSString stringWithFormat:@"Font: %d, MagNum %d\n", i, j]]; | |
| [self.powaPOS.printer setFont:i]; | |
| [self.powaPOS.printer setFormat:j]; | |
| NSMutableString *text = [NSMutableString stringWithString:@"\n"]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // For input image where information is only stored in alpha channel over black RGB. | |
| // Make all pixels with transparency black, and remove alpha channel. | |
| private Bitmap AlphaToBlack(Bitmap image) { | |
| Bitmap rgbImage = image.copy(Bitmap.Config.ARGB_8888, true); | |
| for (int y = 0; y < rgbImage.getHeight(); y++) { | |
| for (int x = 0; x < rgbImage.getWidth(); x++) { | |
| int aPixel = rgbImage.getPixel(x, y); | |
| if (rgbImage.getPixel(x, y) < 0xFF000000) |