Select your printer model

Parameters are refined by the selected printer.

addBackgroundColor


Adds the specification of the background color to the command buffer.

The background color from the beginning till the end of the row specified in the text area can be changed.

Syntax

 
- (int) addBackgroundColor:(int)row r:(long)r g:(long)g b:(long)b;

Parameter

row

Specifies the row to which the background color is applied.

Value

Description

Integer from 1 to 19

Changes the background color of the specified row.

EPOS2_EVEN_ROWS

Changes the background color of all even rows.

EPOS2_ODD_ROWS

Changes the background color of all odd rows.

EPOS2_ALL_ROWS

Changes the background color of all rows.

r

Specifies the red color value of the background color.

Value

Description

Integer from 0 to 255

Red color value

g

Specifies the green color value of the background color.

Value

Description

Integer from 0 to 255

Green color value

b

Specifies the blue color value of the background color.

Value

Description

Integer from 0 to 255

Blue color value

Return value

Error status

Description

EPOS2_SUCCESS

The function was executed successfully.

EPOS2_ERR_PARAM

An invalid parameter was passed.

EPOS2_ERR_MEMORY

Sufficient memory required for processing could not be allocated.

EPOS2_ERR_FAILURE

An unknown error occurred.

Supplementary explanation

  • To individually specify the background color in a plurality of windows, define the window in addSetCurrentTextArea before executing this API.
    If the window is defined beforehand, the background color can be specified individually for each window.
    By dividing the window at the position where the background color is to be changed, the background color can be changed in the middle of the row.
  • The background color can be applied only to the text area.
  • Specify the r, g, b parameters in the RGB565 format.
  • Specify the setting value in all of the r, g, and b parameters.
  • To apply the background color to a plurality of rows, execute this API a plurality of times.
 

Quick Access

  • [Name]
  • [Format]
  • [Range]
  • [Description]
  • [Notes]

Epson ePOS SDK includes patented or patent pending functions. The contents must not be disclosed to third parties.


Epson ePOS SDK for iOS

Jump to the top