Epson TM-T70-i ePOS-Print API Users Manual For TM-i firmware 4.1 - Page 88
addImage method, addImage
View all Epson TM-T70-i manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 88 highlights
addImage method Adds raster image printing to the command buffer. Prints graphics rendered in HTML5 Canvas. Converts the specified range in a RGBA full-color image of HTML5 Canvas into raster image data according to the settings of the halftone and brightness properties. One pixel in an image equals to one printer dot. When an image contains any transparent color, the background color of the image is assumed to be white. If an HTML5 Canvas image contains images downloaded from different domains, you cannot print the image. In this case, a security error occurs due to violation of the same origin policy of JavaScript. • To print a raster image at high speed, specify ALIGN_LEFT for the addTextAlign method (p. 67), and specify a multiple of 8 not exceeding the printer's paper width for the width parameter of this API. • In page mode, a raster image is laid out in the current print position with the reference point being its bottom left dot. The print position will not move. • Multiple tone printing is not supported in Page Mode. Multiple tone graphic printing is supported in Standard Mode only. Syntax addImage(context, x, y, width, height, color, mode); Parameter context : x: y: width : height : color : ( Required parameter, Object type : Context) Specifies the 2D context of HTML5 Canvas. ( Required parameter, Object type : Number) Specifies the horizontal start position in the print area. Specifies an integer from 0 to 65535. ( Required parameter, Object type : Number) Specifies the vertical start position in the print area. Specifies an integer from 0 to 65535. ( Required parameter, Object type : Number) Specifies the width of the print area. Specifies an integer from 0 to 65535. ( Required parameter, Object type : Number) Specifies the height of the print area. Specifies an integer from 0 to 65535. ( Optional parameter, Object type : String) Specifies the color. Setting COLOR_NONE COLOR_1 (default) COLOR_2 COLOR_3 COLOR_4 undefined (When not specified) Description Characters are not printed. First color Second color Third color Fourth color First color 88