Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
c3f1897e
Commit
c3f1897e
authored
Sep 04, 2013
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Plc editor print pdf, distance between multitext lines adjustement (refs #151)
parent
8517ac9f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
2 deletions
+21
-2
xtt/lib/flow/src/flow_annot.cpp
xtt/lib/flow/src/flow_annot.cpp
+12
-2
xtt/lib/flow/src/flow_pdf.h
xtt/lib/flow/src/flow_pdf.h
+1
-0
xtt/lib/flow/src/flow_print.h
xtt/lib/flow/src/flow_print.h
+7
-0
xtt/lib/flow/src/flow_pscript.h
xtt/lib/flow/src/flow_pscript.h
+1
-0
No files found.
xtt/lib/flow/src/flow_annot.cpp
View file @
c3f1897e
...
...
@@ -105,8 +105,18 @@ void FlowAnnot::print( void *pos, void *node, int highlight)
int
line_cnt
=
0
;
char
*
line
=
((
FlowNode
*
)
node
)
->
annotv
[
number
];
char
*
s
;
ctx
->
fdraw
->
get_text_extent
(
ctx
,
"Ag"
,
2
,
draw_type
,
text_size
,
&
z_width
,
&
z_height
,
ctx
->
print_zoom_factor
/
ctx
->
base_zoom_factor
*
(
12
+
2
*
text_size
));
switch
(
ctx
->
current_print
->
type
())
{
case
print_eType_Pdf
:
{
ctx
->
fdraw
->
get_text_extent
(
ctx
,
"Ag"
,
2
,
draw_type
,
text_size
,
&
z_width
,
&
z_height
,
ctx
->
print_zoom_factor
/
ctx
->
base_zoom_factor
*
(
12
+
2
*
text_size
));
float
k
=
-
2.5
*
ctx
->
print_zoom_factor
/
ctx
->
base_zoom_factor
+
2.62
;
z_height
*=
k
;
break
;
}
default:
ctx
->
fdraw
->
get_text_extent
(
ctx
,
"Ag"
,
2
,
draw_type
,
text_size
,
&
z_width
,
&
z_height
,
ctx
->
print_zoom_factor
/
ctx
->
base_zoom_factor
*
(
12
+
2
*
text_size
));
}
z_h
=
ctx
->
print_zoom_factor
/
ctx
->
base_zoom_factor
*
z_height
;
for
(
s
=
((
FlowNode
*
)
node
)
->
annotv
[
number
];
*
s
;
s
++
)
{
...
...
xtt/lib/flow/src/flow_pdf.h
View file @
c3f1897e
...
...
@@ -47,6 +47,7 @@ class FlowPdf : public FlowPrint {
public:
FlowPdf
(
char
*
filename
,
void
*
flow_ctx
,
int
page_border
,
int
*
sts
);
~
FlowPdf
();
int
type
()
{
return
print_eType_Pdf
;}
int
print_page
(
double
ll_x
,
double
ll_y
,
double
ur_x
,
double
ur_y
);
int
rect
(
double
x
,
double
y
,
double
width
,
double
height
,
flow_eDrawType
type
,
double
idx
,
int
highlight
);
int
filled_rect
(
double
x
,
double
y
,
double
width
,
double
height
,
flow_eDrawType
type
,
double
idx
);
...
...
xtt/lib/flow/src/flow_print.h
View file @
c3f1897e
...
...
@@ -40,11 +40,18 @@
#include <stdio.h>
#include "flow.h"
typedef
enum
{
print_eType__
,
print_eType_Postscript
,
print_eType_Pdf
}
print_eType
;
class
FlowPrint
{
public:
FlowPrint
()
{};
FlowPrint
(
char
*
filename
,
void
*
flow_ctx
,
int
page_border
,
int
*
sts
)
{}
virtual
~
FlowPrint
()
{}
virtual
int
type
()
{
return
0
;}
virtual
int
print_page
(
double
ll_x
,
double
ll_y
,
double
ur_x
,
double
ur_y
)
{
return
1
;}
virtual
int
rect
(
double
x
,
double
y
,
double
width
,
double
height
,
flow_eDrawType
type
,
double
idx
,
int
highlight
)
{
return
1
;}
virtual
int
filled_rect
(
double
x
,
double
y
,
double
width
,
double
height
,
flow_eDrawType
type
,
double
idx
)
{
return
1
;}
...
...
xtt/lib/flow/src/flow_pscript.h
View file @
c3f1897e
...
...
@@ -45,6 +45,7 @@ class FlowPscript : public FlowPrint {
public:
FlowPscript
(
char
*
filename
,
void
*
flow_ctx
,
int
page_border
,
int
*
sts
);
~
FlowPscript
();
int
type
()
{
return
print_eType_Postscript
;}
int
print_page
(
double
ll_x
,
double
ll_y
,
double
ur_x
,
double
ur_y
);
int
rect
(
double
x
,
double
y
,
double
width
,
double
height
,
flow_eDrawType
type
,
double
idx
,
int
highlight
);
int
filled_rect
(
double
x
,
double
y
,
double
width
,
double
height
,
flow_eDrawType
type
,
double
idx
);
...
...
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