Commit a2112b28 by xiaoqing.gu

1、新增导出函数(适配书亦杯贴打印) 2、字体加粗 3、字体打印浓度加到10

parent b26dab7f
No preview for this file type
......@@ -1322,6 +1322,55 @@ int LabPrtLine(int x, int y, int line, const char *data)
return 1;
}
int LabPrtLineWithSizeAndRatio(int x, int y, int size, double ratio, int line, const char *data)
{
if(line == 0)
{
if(g_heigth > y + 1)
y = g_heigth + 0;
if(y > g_info.high*10 - 80)
y = g_info.high*10 - 80;
Function_Argv argv = {0};
INIT_FUN_ARGV(x, y, data);
g_label_print_lines.push_back(argv);
getheigth(y, size, 0);
return 1;
}
int index = 0;
char tmp[512] = {0};
int tmpi = 0;
while(GetFout(x, &index, size, ratio, data, tmp, g_info))
{
if(g_heigth > y + 1)
y = g_heigth;
if(tmpi == 0)
{
y += 0;
tmpi = 1;
}
if(y > g_info.high * 10 - 80)
y = g_info.high * 10 - 80;
Function_Argv argv = {0};
INIT_FUN_ARGV(x, y, tmp);
g_label_print_lines.push_back(argv);
getheigth(y, size, 0);
memset(tmp, 0, 512);
}
return 1;
}
int TscPrintClose()
{
if(g_info.dvname.empty())
......@@ -1350,7 +1399,7 @@ int TscPrintClose()
itoa(g_info.wigth, tmp0, 10);
itoa(g_info.high, tmp1, 10);
strcpy(tmp2, "3");
strcpy(tmp3, "1");
strcpy(tmp3, "10");
if(TSC_setup(tmp0, tmp1, tmp2, tmp3, "0", "2", "0") == 0)
LOG() << "标签打印机设置打印区域失败";
......@@ -1370,7 +1419,7 @@ int TscPrintClose()
LOG() << tmpdata;
TSC_windowsfont(argv.x, argv.y, LABEL_FOUT_SIZE, 0, 0, 0, tmpfont_name, tmpdata);
TSC_windowsfont(argv.x, argv.y, LABEL_FOUT_SIZE, 0, 2, 0, tmpfont_name, tmpdata);
++ i;
}
......
......@@ -18,6 +18,7 @@ extern "C" int __declspec(dllexport)LabPrtOpen(char data[]);
//data 打印数据;
//---------------------------------------------------------
extern "C" int __declspec(dllexport)LabPrtLine(int x, int y, int line, const char *data);
extern "C" int __declspec(dllexport)LabPrtLineWithSizeAndRatio(int x, int y, int size, double ratio, int line, const char *data);
//杯贴打印完结;
extern "C" int __declspec(dllexport)LabPrtClose();
/****************************************************小票**********************************************/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment