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
0450aeb9
Commit
0450aeb9
authored
Mar 03, 2005
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Postscript print of highlight added
parent
e8b14a2f
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
116 additions
and
59 deletions
+116
-59
xtt/lib/flow/src/flow_annot.cpp
xtt/lib/flow/src/flow_annot.cpp
+1
-1
xtt/lib/flow/src/flow_annot.h
xtt/lib/flow/src/flow_annot.h
+1
-1
xtt/lib/flow/src/flow_annotpixmap.cpp
xtt/lib/flow/src/flow_annotpixmap.cpp
+1
-1
xtt/lib/flow/src/flow_annotpixmap.h
xtt/lib/flow/src/flow_annotpixmap.h
+1
-1
xtt/lib/flow/src/flow_arc.cpp
xtt/lib/flow/src/flow_arc.cpp
+2
-2
xtt/lib/flow/src/flow_arc.h
xtt/lib/flow/src/flow_arc.h
+1
-1
xtt/lib/flow/src/flow_array.cpp
xtt/lib/flow/src/flow_array.cpp
+2
-2
xtt/lib/flow/src/flow_array.h
xtt/lib/flow/src/flow_array.h
+1
-1
xtt/lib/flow/src/flow_array_elem.h
xtt/lib/flow/src/flow_array_elem.h
+1
-1
xtt/lib/flow/src/flow_arrow.cpp
xtt/lib/flow/src/flow_arrow.cpp
+1
-1
xtt/lib/flow/src/flow_arrow.h
xtt/lib/flow/src/flow_arrow.h
+1
-1
xtt/lib/flow/src/flow_con.cpp
xtt/lib/flow/src/flow_con.cpp
+4
-4
xtt/lib/flow/src/flow_ctx.cpp
xtt/lib/flow/src/flow_ctx.cpp
+4
-1
xtt/lib/flow/src/flow_image.cpp
xtt/lib/flow/src/flow_image.cpp
+2
-2
xtt/lib/flow/src/flow_image.h
xtt/lib/flow/src/flow_image.h
+1
-1
xtt/lib/flow/src/flow_line.cpp
xtt/lib/flow/src/flow_line.cpp
+2
-2
xtt/lib/flow/src/flow_line.h
xtt/lib/flow/src/flow_line.h
+1
-1
xtt/lib/flow/src/flow_node.cpp
xtt/lib/flow/src/flow_node.cpp
+39
-6
xtt/lib/flow/src/flow_nodeclass.cpp
xtt/lib/flow/src/flow_nodeclass.cpp
+2
-2
xtt/lib/flow/src/flow_nodeclass.h
xtt/lib/flow/src/flow_nodeclass.h
+1
-1
xtt/lib/flow/src/flow_pixmap.cpp
xtt/lib/flow/src/flow_pixmap.cpp
+1
-1
xtt/lib/flow/src/flow_pixmap.h
xtt/lib/flow/src/flow_pixmap.h
+1
-1
xtt/lib/flow/src/flow_pscript.cpp
xtt/lib/flow/src/flow_pscript.cpp
+23
-5
xtt/lib/flow/src/flow_pscript.h
xtt/lib/flow/src/flow_pscript.h
+5
-3
xtt/lib/flow/src/flow_radiobutton.cpp
xtt/lib/flow/src/flow_radiobutton.cpp
+10
-10
xtt/lib/flow/src/flow_radiobutton.h
xtt/lib/flow/src/flow_radiobutton.h
+1
-1
xtt/lib/flow/src/flow_rect.cpp
xtt/lib/flow/src/flow_rect.cpp
+3
-2
xtt/lib/flow/src/flow_rect.h
xtt/lib/flow/src/flow_rect.h
+1
-1
xtt/lib/flow/src/flow_text.cpp
xtt/lib/flow/src/flow_text.cpp
+1
-1
xtt/lib/flow/src/flow_text.h
xtt/lib/flow/src/flow_text.h
+1
-1
No files found.
xtt/lib/flow/src/flow_annot.cpp
View file @
0450aeb9
...
...
@@ -30,7 +30,7 @@ void FlowAnnot::traverse( int x, int y)
p
.
traverse
(
x
,
y
);
}
void
FlowAnnot
::
print
(
void
*
pos
,
void
*
node
)
void
FlowAnnot
::
print
(
void
*
pos
,
void
*
node
,
int
highlight
)
{
if
(
!
(
display_level
&
ctx
->
display_level
))
return
;
...
...
xtt/lib/flow/src/flow_annot.h
View file @
0450aeb9
...
...
@@ -26,7 +26,7 @@ class FlowAnnot : public FlowArrayElem {
void
conpoint_select
(
void
*
pos
,
int
x
,
int
y
,
double
*
distance
,
void
**
cp
)
{};
int
event_handler
(
void
*
pos
,
flow_eEvent
event
,
int
x
,
int
y
,
void
*
node
);
void
print
(
void
*
pos
,
void
*
node
);
void
print
(
void
*
pos
,
void
*
node
,
int
highlight
);
void
save
(
ofstream
&
fp
,
flow_eSaveMode
mode
);
void
open
(
ifstream
&
fp
);
void
draw
(
void
*
pos
,
int
highlight
,
int
hot
,
void
*
node
);
...
...
xtt/lib/flow/src/flow_annotpixmap.cpp
View file @
0450aeb9
...
...
@@ -43,7 +43,7 @@ void FlowAnnotPixmap::traverse( int x, int y)
p
.
traverse
(
x
,
y
);
}
void
FlowAnnotPixmap
::
print
(
void
*
pos
,
void
*
node
)
void
FlowAnnotPixmap
::
print
(
void
*
pos
,
void
*
node
,
int
highlight
)
{
if
(
!
((
FlowNode
*
)
node
)
->
annotpixmapv
[
number
])
return
;
...
...
xtt/lib/flow/src/flow_annotpixmap.h
View file @
0450aeb9
...
...
@@ -23,7 +23,7 @@ class FlowAnnotPixmap : public FlowArrayElem {
int
event_handler
(
void
*
pos
,
flow_eEvent
event
,
int
x
,
int
y
,
void
*
node
);
void
conpoint_select
(
void
*
pos
,
int
x
,
int
y
,
double
*
distance
,
void
**
cp
)
{};
void
print
(
void
*
pos
,
void
*
node
);
void
print
(
void
*
pos
,
void
*
node
,
int
highlight
);
void
save
(
ofstream
&
fp
,
flow_eSaveMode
mode
);
void
open
(
ifstream
&
fp
);
void
draw
(
void
*
pos
,
int
highlight
,
int
hot
,
void
*
node
);
...
...
xtt/lib/flow/src/flow_arc.cpp
View file @
0450aeb9
...
...
@@ -29,7 +29,7 @@ void FlowArc::traverse( int x, int y)
ur
.
traverse
(
x
,
y
);
}
void
FlowArc
::
print
(
void
*
pos
,
void
*
node
)
void
FlowArc
::
print
(
void
*
pos
,
void
*
node
,
int
highlight
)
{
double
idx
=
ctx
->
print_zoom_factor
/
ctx
->
base_zoom_factor
*
line_width
;
...
...
@@ -38,7 +38,7 @@ void FlowArc::print( void *pos, void *node)
ctx
->
print_ps
->
arc
(
ll
.
print_z_x
+
((
FlowPoint
*
)
pos
)
->
print_z_x
,
ll
.
print_z_y
+
((
FlowPoint
*
)
pos
)
->
print_z_y
,
ur
.
print_z_x
-
ll
.
print_z_x
,
ur
.
print_z_y
-
ll
.
print_z_y
,
angel1
,
angel2
,
draw_type
,
idx
);
draw_type
,
idx
,
highlight
);
}
void
FlowArc
::
save
(
ofstream
&
fp
,
flow_eSaveMode
mode
)
...
...
xtt/lib/flow/src/flow_arc.h
View file @
0450aeb9
...
...
@@ -26,7 +26,7 @@ class FlowArc : public FlowArrayElem {
int
event_handler
(
void
*
pos
,
flow_eEvent
event
,
int
x
,
int
y
,
void
*
node
);
void
conpoint_select
(
void
*
pos
,
int
x
,
int
y
,
double
*
distance
,
void
**
cp
)
{};
void
print
(
void
*
pos
,
void
*
node
);
void
print
(
void
*
pos
,
void
*
node
,
int
highlight
);
void
save
(
ofstream
&
fp
,
flow_eSaveMode
mode
);
void
open
(
ifstream
&
fp
);
void
draw
(
void
*
pos
,
int
highlight
,
int
hot
,
void
*
node
);
...
...
xtt/lib/flow/src/flow_array.cpp
View file @
0450aeb9
...
...
@@ -571,13 +571,13 @@ void FlowArray::conpoint_select( void *pos, int x, int y, double *distance,
}
}
void
FlowArray
::
print
(
void
*
pos
,
void
*
node
)
void
FlowArray
::
print
(
void
*
pos
,
void
*
node
,
int
highlight
)
{
int
i
;
for
(
i
=
0
;
i
<
a_size
;
i
++
)
{
a
[
i
]
->
print
(
pos
,
node
);
a
[
i
]
->
print
(
pos
,
node
,
highlight
);
}
}
...
...
xtt/lib/flow/src/flow_array.h
View file @
0450aeb9
...
...
@@ -25,7 +25,7 @@ class FlowArray {
void
zoom
();
void
nav_zoom
();
void
print_zoom
();
void
print
(
void
*
pos
,
void
*
node
);
void
print
(
void
*
pos
,
void
*
node
,
int
highlight
);
void
save
(
ofstream
&
fp
,
flow_eSaveMode
mode
);
void
open
(
void
*
ctx
,
ifstream
&
fp
);
void
draw
(
void
*
pos
,
int
highlight
,
int
hot
,
void
*
node
);
...
...
xtt/lib/flow/src/flow_array_elem.h
View file @
0450aeb9
...
...
@@ -23,7 +23,7 @@ class FlowArrayElem {
virtual
void
print
(
double
ll_x
,
double
ll_y
,
double
ur_x
,
double
ur_y
)
{};
virtual
void
save
(
ofstream
&
fp
,
flow_eSaveMode
mode
)
{};
virtual
void
open
(
ifstream
&
fp
)
{};
virtual
void
print
(
void
*
pos
,
void
*
node
)
{};
virtual
void
print
(
void
*
pos
,
void
*
node
,
int
highlight
)
{};
virtual
void
draw
(
int
ll_x
,
int
ll_y
,
int
ur_x
,
int
ur_y
)
{};
virtual
void
draw
(
void
*
pos
,
int
highlight
,
int
hot
,
void
*
node
)
{};
virtual
void
erase
()
{};
...
...
xtt/lib/flow/src/flow_arrow.cpp
View file @
0450aeb9
...
...
@@ -90,7 +90,7 @@ void FlowArrow::traverse( int x, int y)
p2
.
traverse
(
x
,
y
);
}
void
FlowArrow
::
print
(
void
*
pos
,
void
*
node
)
void
FlowArrow
::
print
(
void
*
pos
,
void
*
node
,
int
highlight
)
{
double
idx
=
ctx
->
print_zoom_factor
/
ctx
->
base_zoom_factor
*
line_width
;
...
...
xtt/lib/flow/src/flow_arrow.h
View file @
0450aeb9
...
...
@@ -20,7 +20,7 @@ class FlowArrow : public FlowArrayElem {
int
event_handler
(
void
*
pos
,
flow_eEvent
event
,
int
x
,
int
y
,
void
*
node
);
void
conpoint_select
(
void
*
pos
,
int
x
,
int
y
,
double
*
distance
,
void
**
cp
)
{};
void
print
(
void
*
pos
,
void
*
node
);
void
print
(
void
*
pos
,
void
*
node
,
int
highlight
);
void
save
(
ofstream
&
fp
,
flow_eSaveMode
mode
);
void
open
(
ifstream
&
fp
);
void
draw
(
void
*
pos
,
int
hightlight
,
int
hot
,
void
*
node
);
...
...
xtt/lib/flow/src/flow_con.cpp
View file @
0450aeb9
...
...
@@ -778,14 +778,14 @@ void FlowCon::print( double ll_x, double ll_y, double ur_x, double ur_y)
y_low
<=
ur_y
)
{
if
(
temporary_ref
||
cc
->
con_type
==
flow_eConType_Reference
)
ref_a
.
print
(
&
cc
->
zero
,
NULL
);
ref_a
.
print
(
&
cc
->
zero
,
NULL
,
highlight
);
else
{
for
(
i
=
0
;
i
<
l_num
;
i
++
)
((
FlowLine
*
)
line_a
[
i
])
->
print
(
&
cc
->
zero
,
NULL
);
((
FlowLine
*
)
line_a
[
i
])
->
print
(
&
cc
->
zero
,
NULL
,
highlight
);
for
(
i
=
0
;
i
<
a_num
;
i
++
)
((
FlowArc
*
)
arc_a
[
i
])
->
print
(
&
cc
->
zero
,
NULL
);
arrow_a
.
print
(
&
cc
->
zero
,
NULL
);
((
FlowArc
*
)
arc_a
[
i
])
->
print
(
&
cc
->
zero
,
NULL
,
highlight
);
arrow_a
.
print
(
&
cc
->
zero
,
NULL
,
highlight
);
}
}
}
...
...
xtt/lib/flow/src/flow_ctx.cpp
View file @
0450aeb9
...
...
@@ -569,8 +569,11 @@ int FlowCtx::print_region( double ll_x, double ll_y, double ur_x,
int
sts
;
print_ps
=
new
FlowPscript
(
filename
,
this
,
0
,
&
sts
);
if
(
ODD
(
sts
))
if
(
ODD
(
sts
))
{
if
(
trace_started
)
print_ps
->
set_showred
(
1
);
print_ps
->
print_page
(
ll_x
,
ll_y
,
ur_x
,
ur_y
);
}
delete
print_ps
;
return
sts
;
...
...
xtt/lib/flow/src/flow_image.cpp
View file @
0450aeb9
...
...
@@ -108,7 +108,7 @@ void FlowImage::traverse( int x, int y)
ur
.
traverse
(
x
,
y
);
}
void
FlowImage
::
print
(
void
*
pos
,
void
*
node
)
void
FlowImage
::
print
(
void
*
pos
,
void
*
node
,
int
highlight
)
{
if
(
!
(
display_level
&
ctx
->
display_level
))
return
;
...
...
@@ -124,7 +124,7 @@ void FlowImage::print( void *pos, void *node)
ctx
->
print_ps
->
rect
(
ll
.
print_z_x
+
((
FlowPoint
*
)
pos
)
->
print_z_x
,
ll
.
print_z_y
+
((
FlowPoint
*
)
pos
)
->
print_z_y
,
ur
.
print_z_x
-
ll
.
print_z_x
,
ur
.
print_z_y
-
ll
.
print_z_y
,
draw_type
,
idx
);
draw_type
,
idx
,
0
);
else
ctx
->
print_ps
->
filled_rect
(
ll
.
print_z_x
+
((
FlowPoint
*
)
pos
)
->
print_z_x
,
ll
.
print_z_y
+
((
FlowPoint
*
)
pos
)
->
print_z_y
,
...
...
xtt/lib/flow/src/flow_image.h
View file @
0450aeb9
...
...
@@ -21,7 +21,7 @@ class FlowImage : public FlowArrayElem {
int
event_handler
(
void
*
pos
,
flow_eEvent
event
,
int
x
,
int
y
,
void
*
node
);
void
conpoint_select
(
void
*
pos
,
int
x
,
int
y
,
double
*
distance
,
void
**
cp
)
{};
void
print
(
void
*
pos
,
void
*
node
);
void
print
(
void
*
pos
,
void
*
node
,
int
highlight
);
void
save
(
ofstream
&
fp
,
flow_eSaveMode
mode
);
void
open
(
ifstream
&
fp
);
void
draw
(
void
*
pos
,
int
hightlight
,
int
hot
,
void
*
node
);
...
...
xtt/lib/flow/src/flow_line.cpp
View file @
0450aeb9
...
...
@@ -28,7 +28,7 @@ void FlowLine::traverse( int x, int y)
p2
.
traverse
(
x
,
y
);
}
void
FlowLine
::
print
(
void
*
pos
,
void
*
node
)
void
FlowLine
::
print
(
void
*
pos
,
void
*
node
,
int
highlight
)
{
if
(
p1
.
print_z_x
==
p2
.
print_z_x
&&
p1
.
print_z_y
==
p2
.
print_z_y
)
return
;
...
...
@@ -40,7 +40,7 @@ void FlowLine::print( void *pos, void *node)
p1
.
print_z_y
+
((
FlowPoint
*
)
pos
)
->
print_z_y
,
p2
.
print_z_x
+
((
FlowPoint
*
)
pos
)
->
print_z_x
,
p2
.
print_z_y
+
((
FlowPoint
*
)
pos
)
->
print_z_y
,
draw_type
,
idx
);
draw_type
,
idx
,
highlight
);
}
void
FlowLine
::
save
(
ofstream
&
fp
,
flow_eSaveMode
mode
)
...
...
xtt/lib/flow/src/flow_line.h
View file @
0450aeb9
...
...
@@ -25,7 +25,7 @@ class FlowLine : public FlowArrayElem {
int
event_handler
(
void
*
pos
,
flow_eEvent
event
,
int
x
,
int
y
,
void
*
node
);
void
conpoint_select
(
void
*
pos
,
int
x
,
int
y
,
double
*
distance
,
void
**
cp
)
{};
void
print
(
void
*
pos
,
void
*
node
);
void
print
(
void
*
pos
,
void
*
node
,
int
highlight
);
void
save
(
ofstream
&
fp
,
flow_eSaveMode
mode
);
void
open
(
ifstream
&
fp
);
void
draw
(
void
*
pos
,
int
highlight
,
int
hot
,
void
*
node
);
...
...
xtt/lib/flow/src/flow_node.cpp
View file @
0450aeb9
...
...
@@ -213,7 +213,7 @@ void FlowNode::print( double ll_x, double ll_y, double ur_x, double ur_y)
x_left
<=
ur_x
&&
y_high
>=
ll_y
&&
y_low
<=
ur_y
)
nc
->
print
(
&
pos
,
(
void
*
)
this
);
nc
->
print
(
&
pos
,
(
void
*
)
this
,
highlight
);
}
void
FlowNode
::
save
(
ofstream
&
fp
,
flow_eSaveMode
mode
)
...
...
@@ -395,13 +395,25 @@ void FlowNode::draw_inverse()
else
x_r
=
x_right
;
flow_draw_fill_rect
(
ctx
,
if
(
nc
->
group
==
flow_eNodeGroup_Document
)
{
flow_draw_fill_rect
(
ctx
,
int
(
obst_x_left
*
ctx
->
zoom_factor
-
ctx
->
offset_x
),
int
(
obst_y_low
*
ctx
->
zoom_factor
-
ctx
->
offset_y
),
int
(
obst_x_right
*
ctx
->
zoom_factor
-
obst_x_left
*
ctx
->
zoom_factor
),
int
(
obst_y_high
*
ctx
->
zoom_factor
-
obst_y_low
*
ctx
->
zoom_factor
),
flow_eDrawType_Line
);
nc
->
draw
(
&
pos
,
highlight
,
hot
,
(
void
*
)
this
);
}
else
{
flow_draw_fill_rect
(
ctx
,
int
(
x_left
*
ctx
->
zoom_factor
-
ctx
->
offset_x
),
int
(
y_low
*
ctx
->
zoom_factor
-
ctx
->
offset_y
),
int
(
x_r
*
ctx
->
zoom_factor
-
x_left
*
ctx
->
zoom_factor
),
int
(
y_high
*
ctx
->
zoom_factor
-
y_low
*
ctx
->
zoom_factor
),
flow_eDrawType_Line
);
nc
->
draw_inverse
(
&
pos
,
0
,
(
void
*
)
this
);
nc
->
draw_inverse
(
&
pos
,
0
,
(
void
*
)
this
);
}
}
void
FlowNode
::
erase
()
...
...
@@ -416,12 +428,22 @@ void FlowNode::erase()
else
x_r
=
x_right
;
flow_draw_fill_rect
(
ctx
,
if
(
nc
->
group
==
flow_eNodeGroup_Document
)
{
flow_draw_fill_rect
(
ctx
,
int
(
obst_x_left
*
ctx
->
zoom_factor
-
ctx
->
offset_x
),
int
(
obst_y_low
*
ctx
->
zoom_factor
-
ctx
->
offset_y
),
int
(
obst_x_right
*
ctx
->
zoom_factor
-
obst_x_left
*
ctx
->
zoom_factor
),
int
(
obst_y_high
*
ctx
->
zoom_factor
-
obst_y_low
*
ctx
->
zoom_factor
),
flow_eDrawType_LineErase
);
}
else
{
flow_draw_fill_rect
(
ctx
,
int
(
x_left
*
ctx
->
zoom_factor
-
ctx
->
offset_x
),
int
(
y_low
*
ctx
->
zoom_factor
-
ctx
->
offset_y
),
int
(
x_r
*
ctx
->
zoom_factor
-
x_left
*
ctx
->
zoom_factor
),
int
(
y_high
*
ctx
->
zoom_factor
-
y_low
*
ctx
->
zoom_factor
),
flow_eDrawType_LineErase
);
}
}
}
...
...
@@ -498,13 +520,24 @@ void FlowNode::set_inverse( int on)
else
x_r
=
x_right
;
flow_draw_fill_rect
(
ctx
,
if
(
nc
->
group
==
flow_eNodeGroup_Document
)
{
flow_draw_fill_rect
(
ctx
,
int
(
obst_x_left
*
ctx
->
zoom_factor
-
ctx
->
offset_x
),
int
(
obst_y_low
*
ctx
->
zoom_factor
-
ctx
->
offset_y
),
int
(
obst_x_right
*
ctx
->
zoom_factor
-
obst_x_left
*
ctx
->
zoom_factor
),
int
(
obst_y_high
*
ctx
->
zoom_factor
-
obst_y_low
*
ctx
->
zoom_factor
),
flow_eDrawType_LineErase
);
nc
->
draw
(
&
pos
,
highlight
,
hot
,
(
void
*
)
this
);
}
else
{
flow_draw_fill_rect
(
ctx
,
int
(
x_left
*
ctx
->
zoom_factor
-
ctx
->
offset_x
),
int
(
y_low
*
ctx
->
zoom_factor
-
ctx
->
offset_y
),
int
(
x_r
*
ctx
->
zoom_factor
-
x_left
*
ctx
->
zoom_factor
),
int
(
y_high
*
ctx
->
zoom_factor
-
y_low
*
ctx
->
zoom_factor
+
1
),
flow_eDrawType_LineErase
);
nc
->
draw
(
&
pos
,
highlight
,
hot
,
(
void
*
)
this
);
nc
->
draw
(
&
pos
,
highlight
,
hot
,
(
void
*
)
this
);
}
}
else
{
...
...
xtt/lib/flow/src/flow_nodeclass.cpp
View file @
0450aeb9
...
...
@@ -15,13 +15,13 @@ FlowNodeClass::FlowNodeClass( FlowCtx *flow_ctx, char *name,
strcpy
(
nc_name
,
name
);
}
void
FlowNodeClass
::
print
(
FlowPoint
*
pos
,
void
*
node
)
void
FlowNodeClass
::
print
(
FlowPoint
*
pos
,
void
*
node
,
int
highlight
)
{
int
i
;
for
(
i
=
0
;
i
<
a
.
a_size
;
i
++
)
{
a
.
a
[
i
]
->
print
(
pos
,
node
);
a
.
a
[
i
]
->
print
(
pos
,
node
,
highlight
);
}
}
...
...
xtt/lib/flow/src/flow_nodeclass.h
View file @
0450aeb9
...
...
@@ -24,7 +24,7 @@ class FlowNodeClass : public FlowArrayElem {
void
get_obstacle_borders
(
double
pos_x
,
double
pos_y
,
double
*
x_right
,
double
*
x_left
,
double
*
y_high
,
double
*
y_low
,
void
*
node
);
int
event_handler
(
void
*
pos
,
flow_eEvent
event
,
int
x
,
int
y
,
void
*
node
);
void
print
(
FlowPoint
*
pos
,
void
*
node
);
void
print
(
FlowPoint
*
pos
,
void
*
node
,
int
highlight
);
void
save
(
ofstream
&
fp
,
flow_eSaveMode
mode
);
void
open
(
ifstream
&
fp
);
void
draw
(
FlowPoint
*
pos
,
int
highlight
,
int
hot
,
void
*
node
);
...
...
xtt/lib/flow/src/flow_pixmap.cpp
View file @
0450aeb9
...
...
@@ -46,7 +46,7 @@ void FlowPixmap::traverse( int x, int y)
p
.
traverse
(
x
,
y
);
}
void
FlowPixmap
::
print
(
void
*
pos
,
void
*
node
)
void
FlowPixmap
::
print
(
void
*
pos
,
void
*
node
,
int
highlight
)
{
int
idx
=
int
(
ctx
->
print_zoom_factor
/
ctx
->
base_zoom_factor
*
(
pixmap_size
+
4
)
-
4
);
...
...
xtt/lib/flow/src/flow_pixmap.h
View file @
0450aeb9
...
...
@@ -23,7 +23,7 @@ class FlowPixmap : public FlowArrayElem {
int
event_handler
(
void
*
pos
,
flow_eEvent
event
,
int
x
,
int
y
,
void
*
node
);
void
conpoint_select
(
void
*
pos
,
int
x
,
int
y
,
double
*
distance
,
void
**
cp
)
{};
void
print
(
void
*
pos
,
void
*
node
);
void
print
(
void
*
pos
,
void
*
node
,
int
highlight
);
void
save
(
ofstream
&
fp
,
flow_eSaveMode
mode
);
void
open
(
ifstream
&
fp
);
void
draw
(
void
*
pos
,
int
highlight
,
int
hot
,
void
*
node
);
...
...
xtt/lib/flow/src/flow_pscript.cpp
View file @
0450aeb9
...
...
@@ -8,8 +8,8 @@
#include "flow_ctx.h"
FlowPscript
::
FlowPscript
(
char
*
filename
,
void
*
flow_ctx
,
int
page_border
,
int
*
sts
)
:
border
(
page_border
),
ctx
(
flow_ctx
)
int
*
sts
)
:
border
(
page_border
),
ctx
(
flow_ctx
),
show_red
(
1
)
{
strcpy
(
fname
,
filename
);
file
=
fopen
(
fname
,
"w"
);
...
...
@@ -100,7 +100,7 @@ int FlowPscript::print_page( double ll_x, double ll_y, double ur_x, double ur_y)
}
int
FlowPscript
::
rect
(
double
x
,
double
y
,
double
width
,
double
height
,
flow_eDrawType
type
,
double
idx
)
double
idx
,
int
highlight
)
{
if
(
type
==
flow_eDrawType_LineDashed
)
{
...
...
@@ -112,6 +112,10 @@ int FlowPscript::rect( double x, double y, double width, double height, flow_eDr
fprintf
(
file
,
"gsave
\n
"
);
fprintf
(
file
,
"0.5 setgray
\n
"
);
}
if
(
highlight
&&
show_red
)
{
fprintf
(
file
,
"gsave
\n
"
);
fprintf
(
file
,
"0 1 1 0 setcmykcolor
\n
"
);
}
setlinewidth
(
idx
);
fprintf
(
file
,
"newpath
\n
"
);
...
...
@@ -125,6 +129,8 @@ int FlowPscript::rect( double x, double y, double width, double height, flow_eDr
if
(
type
==
flow_eDrawType_LineDashed
||
type
==
flow_eDrawType_LineGray
)
fprintf
(
file
,
"grestore
\n
"
);
if
(
highlight
&&
show_red
)
fprintf
(
file
,
"grestore
\n
"
);
return
1
;
}
...
...
@@ -155,7 +161,7 @@ int FlowPscript::filled_rect( double x, double y, double width, double height, f
}
int
FlowPscript
::
arc
(
double
x
,
double
y
,
double
width
,
double
height
,
int
angel1
,
int
angel2
,
flow_eDrawType
type
,
double
idx
)
flow_eDrawType
type
,
double
idx
,
int
highlight
)
{
double
r
=
0.5
*
width
;
double
pi
=
3.14159
;
...
...
@@ -170,6 +176,10 @@ int FlowPscript::arc( double x, double y, double width, double height, int angel
fprintf
(
file
,
"gsave
\n
"
);
fprintf
(
file
,
"0.5 setgray
\n
"
);
}
if
(
highlight
&&
show_red
)
{
fprintf
(
file
,
"gsave
\n
"
);
fprintf
(
file
,
"0 1 1 0 setcmykcolor
\n
"
);
}
setlinewidth
(
idx
);
fprintf
(
file
,
"newpath
\n
"
);
...
...
@@ -192,11 +202,13 @@ int FlowPscript::arc( double x, double y, double width, double height, int angel
if
(
type
==
flow_eDrawType_LineDashed
||
type
==
flow_eDrawType_LineGray
)
fprintf
(
file
,
"grestore
\n
"
);
if
(
highlight
&&
show_red
)
fprintf
(
file
,
"grestore
\n
"
);
return
1
;
}
int
FlowPscript
::
line
(
double
x1
,
double
y1
,
double
x2
,
double
y2
,
flow_eDrawType
type
,
double
idx
)
double
idx
,
int
highlight
)
{
if
(
type
==
flow_eDrawType_LineDashed
)
{
...
...
@@ -208,6 +220,10 @@ int FlowPscript::line( double x1, double y1, double x2, double y2, flow_eDrawTyp
fprintf
(
file
,
"gsave
\n
"
);
fprintf
(
file
,
"0.5 setgray
\n
"
);
}
if
(
highlight
&&
show_red
)
{
fprintf
(
file
,
"gsave
\n
"
);
fprintf
(
file
,
"0 1 1 0 setcmykcolor
\n
"
);
}
setlinewidth
(
idx
);
fprintf
(
file
,
"newpath
\n
"
);
...
...
@@ -219,6 +235,8 @@ int FlowPscript::line( double x1, double y1, double x2, double y2, flow_eDrawTyp
if
(
type
==
flow_eDrawType_LineDashed
||
type
==
flow_eDrawType_LineGray
)
fprintf
(
file
,
"grestore
\n
"
);
if
(
highlight
&&
show_red
)
fprintf
(
file
,
"grestore
\n
"
);
return
1
;
}
...
...
xtt/lib/flow/src/flow_pscript.h
View file @
0450aeb9
...
...
@@ -9,11 +9,11 @@ class FlowPscript {
FlowPscript
(
char
*
filename
,
void
*
flow_ctx
,
int
page_border
,
int
*
sts
);
~
FlowPscript
();
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
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
);
int
arc
(
double
x
,
double
y
,
double
width
,
double
height
,
int
angel1
,
int
angel2
,
flow_eDrawType
type
,
double
idx
);
int
line
(
double
x1
,
double
y1
,
double
x2
,
double
y2
,
flow_eDrawType
type
,
double
idx
);
flow_eDrawType
type
,
double
idx
,
int
highlight
);
int
line
(
double
x1
,
double
y1
,
double
x2
,
double
y2
,
flow_eDrawType
type
,
double
idx
,
int
highlight
);
int
text
(
double
x
,
double
y
,
char
*
text
,
int
len
,
flow_eDrawType
type
,
int
size
);
int
pixmap
(
double
x
,
double
y
,
flow_sPixmapDataElem
*
data
,
flow_eDrawType
type
);
int
arrow
(
double
x1
,
double
y1
,
double
x2
,
double
y2
,
...
...
@@ -21,12 +21,14 @@ class FlowPscript {
void
move
(
double
x
,
double
y
);
void
setlinewidth
(
double
idx
);
void
rowbreak
();
void
set_showred
(
int
show
)
{
show_red
=
show
;}
double
offset_x
;
double
offset_y
;
FILE
*
file
;
char
fname
[
80
];
int
border
;
void
*
ctx
;
int
show_red
;
};
#endif
xtt/lib/flow/src/flow_radiobutton.cpp
View file @
0450aeb9
...
...
@@ -31,7 +31,7 @@ void FlowRadiobutton::traverse( int x, int y)
ur
.
traverse
(
x
,
y
);
}
void
FlowRadiobutton
::
print
(
void
*
pos
,
void
*
node
)
void
FlowRadiobutton
::
print
(
void
*
pos
,
void
*
node
,
int
highlight
)
{
int
ll_x
,
ll_y
,
ur_x
,
ur_y
;
int
idx
=
0
;
...
...
@@ -42,30 +42,30 @@ void FlowRadiobutton::print( void *pos, void *node)
ur_x
=
int
(
ll_x
+
ur
.
print_z_x
-
ll
.
print_z_x
);
ur_y
=
int
(
ll_y
+
ur
.
print_z_y
-
ll
.
print_z_y
);
ctx
->
print_ps
->
rect
(
ll_x
,
ll_y
,
ur_x
-
ll_x
,
ur_y
-
ll_y
,
draw_type
,
idx
);
draw_type
,
idx
,
0
);
if
(
((
FlowNode
*
)
node
)
->
rbuttonv
[
number
])
{
ctx
->
print_ps
->
line
(
ll_x
+
sc
*
1
,
ll_y
+
sc
*
1
,
ur_x
-
sc
*
1
,
ll_y
+
sc
*
1
,
flow_eDrawType_LineGray
,
idx
);
flow_eDrawType_LineGray
,
idx
,
0
);
ctx
->
print_ps
->
line
(
ll_x
+
sc
*
2
,
ll_y
+
sc
*
2
,
ur_x
-
sc
*
2
,
ll_y
+
sc
*
2
,
flow_eDrawType_LineGray
,
idx
);
flow_eDrawType_LineGray
,
idx
,
0
);
ctx
->
print_ps
->
line
(
ll_x
+
sc
*
1
,
ll_y
+
sc
*
1
,
ll_x
+
sc
*
1
,
ur_y
-
sc
*
1
,
flow_eDrawType_LineGray
,
idx
);
flow_eDrawType_LineGray
,
idx
,
0
);
ctx
->
print_ps
->
line
(
ll_x
+
sc
*
2
,
ll_y
+
sc
*
2
,
ll_x
+
sc
*
2
,
ur_y
-
sc
*
2
,
flow_eDrawType_LineGray
,
idx
);
flow_eDrawType_LineGray
,
idx
,
0
);
ctx
->
print_ps
->
filled_rect
(
ll_x
+
sc
*
3
,
ll_y
+
sc
*
3
,
ur_x
-
ll_x
-
sc
*
5
,
ur_y
-
ll_y
-
sc
*
5
,
flow_eDrawType_Line
,
idx
);
}
else
{
ctx
->
print_ps
->
line
(
ur_x
-
sc
*
1
,
ur_y
-
sc
*
1
,
ll_x
+
sc
*
1
,
ur_y
-
sc
*
1
,
flow_eDrawType_LineGray
,
idx
);
flow_eDrawType_LineGray
,
idx
,
0
);
ctx
->
print_ps
->
line
(
ur_x
-
sc
*
2
,
ur_y
-
sc
*
2
,
ll_x
+
sc
*
2
,
ur_y
-
sc
*
2
,
flow_eDrawType_LineGray
,
idx
);
flow_eDrawType_LineGray
,
idx
,
0
);
ctx
->
print_ps
->
line
(
ur_x
-
sc
*
1
,
ur_y
-
sc
*
1
,
ur_x
-
sc
*
1
,
ll_y
+
sc
*
1
,
flow_eDrawType_LineGray
,
idx
);
flow_eDrawType_LineGray
,
idx
,
0
);
ctx
->
print_ps
->
line
(
ur_x
-
sc
*
2
,
ur_y
-
sc
*
2
,
ur_x
-
sc
*
2
,
ll_y
+
sc
*
2
,
flow_eDrawType_LineGray
,
idx
);
flow_eDrawType_LineGray
,
idx
,
0
);
}
}
...
...
xtt/lib/flow/src/flow_radiobutton.h
View file @
0450aeb9
...
...
@@ -25,7 +25,7 @@ class FlowRadiobutton : public FlowArrayElem {
int
event_handler
(
void
*
pos
,
flow_eEvent
event
,
int
x
,
int
y
,
void
*
node
);
void
conpoint_select
(
void
*
pos
,
int
x
,
int
y
,
double
*
distance
,
void
**
cp
)
{};
void
print
(
void
*
pos
,
void
*
node
);
void
print
(
void
*
pos
,
void
*
node
,
int
highlight
);
void
save
(
ofstream
&
fp
,
flow_eSaveMode
mode
);
void
open
(
ifstream
&
fp
);
void
draw
(
void
*
pos
,
int
hightlight
,
int
hot
,
void
*
node
);
...
...
xtt/lib/flow/src/flow_rect.cpp
View file @
0450aeb9
...
...
@@ -29,7 +29,7 @@ void FlowRect::traverse( int x, int y)
ur
.
traverse
(
x
,
y
);
}
void
FlowRect
::
print
(
void
*
pos
,
void
*
node
)
void
FlowRect
::
print
(
void
*
pos
,
void
*
node
,
int
highlight
)
{
if
(
!
(
display_level
&
ctx
->
display_level
))
return
;
...
...
@@ -40,11 +40,12 @@ void FlowRect::print( void *pos, void *node)
double
idx
=
ctx
->
print_zoom_factor
/
ctx
->
base_zoom_factor
*
line_width
;
idx
=
MAX
(
0.5
,
idx
);
idx
=
MIN
(
idx
,
DRAW_TYPE_SIZE
-
1
);
if
(
!
fill
)
ctx
->
print_ps
->
rect
(
ll
.
print_z_x
+
((
FlowPoint
*
)
pos
)
->
print_z_x
,
ll
.
print_z_y
+
((
FlowPoint
*
)
pos
)
->
print_z_y
,
ur
.
print_z_x
-
ll
.
print_z_x
,
ur
.
print_z_y
-
ll
.
print_z_y
,
draw_type
,
idx
);
draw_type
,
idx
,
highlight
);
else
ctx
->
print_ps
->
filled_rect
(
ll
.
print_z_x
+
((
FlowPoint
*
)
pos
)
->
print_z_x
,
ll
.
print_z_y
+
((
FlowPoint
*
)
pos
)
->
print_z_y
,
...
...
xtt/lib/flow/src/flow_rect.h
View file @
0450aeb9
...
...
@@ -27,7 +27,7 @@ class FlowRect : public FlowArrayElem {
int
event_handler
(
void
*
pos
,
flow_eEvent
event
,
int
x
,
int
y
,
void
*
node
);
void
conpoint_select
(
void
*
pos
,
int
x
,
int
y
,
double
*
distance
,
void
**
cp
)
{};
void
print
(
void
*
pos
,
void
*
node
);
void
print
(
void
*
pos
,
void
*
node
,
int
highlight
);
void
save
(
ofstream
&
fp
,
flow_eSaveMode
mode
);
void
open
(
ifstream
&
fp
);
void
draw
(
void
*
pos
,
int
hightlight
,
int
hot
,
void
*
node
);
...
...
xtt/lib/flow/src/flow_text.cpp
View file @
0450aeb9
...
...
@@ -25,7 +25,7 @@ void FlowText::traverse( int x, int y)
p
.
traverse
(
x
,
y
);
}
void
FlowText
::
print
(
void
*
pos
,
void
*
node
)
void
FlowText
::
print
(
void
*
pos
,
void
*
node
,
int
highlight
)
{
int
idx
=
int
(
ctx
->
print_zoom_factor
/
ctx
->
base_zoom_factor
*
(
text_size
+
4
)
-
4
);
...
...
xtt/lib/flow/src/flow_text.h
View file @
0450aeb9
...
...
@@ -22,7 +22,7 @@ class FlowText : public FlowArrayElem {
int
event_handler
(
void
*
pos
,
flow_eEvent
event
,
int
x
,
int
y
,
void
*
node
);
void
conpoint_select
(
void
*
pos
,
int
x
,
int
y
,
double
*
distance
,
void
**
cp
)
{};
void
print
(
void
*
pos
,
void
*
node
);
void
print
(
void
*
pos
,
void
*
node
,
int
highlight
);
void
save
(
ofstream
&
fp
,
flow_eSaveMode
mode
);
void
open
(
ifstream
&
fp
);
void
draw
(
void
*
pos
,
int
highlight
,
int
hot
,
void
*
node
);
...
...
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