Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PrtLib
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李定达
PrtLib
Commits
a2112b28
Commit
a2112b28
authored
May 23, 2019
by
xiaoqing.gu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、新增导出函数(适配书亦杯贴打印) 2、字体加粗 3、字体打印浓度加到10
parent
b26dab7f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
2 deletions
+52
-2
PrtLib/PrtLib.suo
+0
-0
PrtLib/PrtLib/prtlib.cpp
+51
-2
PrtLib/PrtLib/prtlib.h
+1
-0
No files found.
PrtLib/PrtLib.suo
View file @
a2112b28
No preview for this file type
PrtLib/PrtLib/prtlib.cpp
View file @
a2112b28
...
@@ -1322,6 +1322,55 @@ int LabPrtLine(int x, int y, int line, const char *data)
...
@@ -1322,6 +1322,55 @@ int LabPrtLine(int x, int y, int line, const char *data)
return
1
;
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
()
int
TscPrintClose
()
{
{
if
(
g_info
.
dvname
.
empty
())
if
(
g_info
.
dvname
.
empty
())
...
@@ -1350,7 +1399,7 @@ int TscPrintClose()
...
@@ -1350,7 +1399,7 @@ int TscPrintClose()
itoa
(
g_info
.
wigth
,
tmp0
,
10
);
itoa
(
g_info
.
wigth
,
tmp0
,
10
);
itoa
(
g_info
.
high
,
tmp1
,
10
);
itoa
(
g_info
.
high
,
tmp1
,
10
);
strcpy
(
tmp2
,
"3"
);
strcpy
(
tmp2
,
"3"
);
strcpy
(
tmp3
,
"1"
);
strcpy
(
tmp3
,
"1
0
"
);
if
(
TSC_setup
(
tmp0
,
tmp1
,
tmp2
,
tmp3
,
"0"
,
"2"
,
"0"
)
==
0
)
if
(
TSC_setup
(
tmp0
,
tmp1
,
tmp2
,
tmp3
,
"0"
,
"2"
,
"0"
)
==
0
)
LOG
()
<<
"标签打印机设置打印区域失败"
;
LOG
()
<<
"标签打印机设置打印区域失败"
;
...
@@ -1370,7 +1419,7 @@ int TscPrintClose()
...
@@ -1370,7 +1419,7 @@ int TscPrintClose()
LOG
()
<<
tmpdata
;
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
;
++
i
;
}
}
...
...
PrtLib/PrtLib/prtlib.h
View file @
a2112b28
...
@@ -18,6 +18,7 @@ extern "C" int __declspec(dllexport)LabPrtOpen(char data[]);
...
@@ -18,6 +18,7 @@ extern "C" int __declspec(dllexport)LabPrtOpen(char data[]);
//data 打印数据;
//data 打印数据;
//---------------------------------------------------------
//---------------------------------------------------------
extern
"C"
int
__declspec
(
dllexport
)
LabPrtLine
(
int
x
,
int
y
,
int
line
,
const
char
*
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
();
extern
"C"
int
__declspec
(
dllexport
)
LabPrtClose
();
/****************************************************小票**********************************************/
/****************************************************小票**********************************************/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment