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
d3fce4b2
Commit
d3fce4b2
authored
May 29, 2019
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Glow: Merged move() and move_erase() where they were identical.
parent
5b5a2598
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
12 additions
and
378 deletions
+12
-378
xtt/lib/glow/src/glow_arc.cpp
xtt/lib/glow/src/glow_arc.cpp
+0
-14
xtt/lib/glow/src/glow_arc.h
xtt/lib/glow/src/glow_arc.h
+0
-19
xtt/lib/glow/src/glow_array_elem.h
xtt/lib/glow/src/glow_array_elem.h
+3
-1
xtt/lib/glow/src/glow_con.cpp
xtt/lib/glow/src/glow_con.cpp
+3
-15
xtt/lib/glow/src/glow_growarc.cpp
xtt/lib/glow/src/glow_growarc.cpp
+0
-25
xtt/lib/glow/src/glow_growarc.h
xtt/lib/glow/src/glow_growarc.h
+0
-8
xtt/lib/glow/src/glow_growconpoint.cpp
xtt/lib/glow/src/glow_growconpoint.cpp
+0
-24
xtt/lib/glow/src/glow_growconpoint.h
xtt/lib/glow/src/glow_growconpoint.h
+0
-8
xtt/lib/glow/src/glow_growimage.cpp
xtt/lib/glow/src/glow_growimage.cpp
+0
-25
xtt/lib/glow/src/glow_growimage.h
xtt/lib/glow/src/glow_growimage.h
+0
-8
xtt/lib/glow/src/glow_growline.cpp
xtt/lib/glow/src/glow_growline.cpp
+0
-22
xtt/lib/glow/src/glow_growline.h
xtt/lib/glow/src/glow_growline.h
+0
-8
xtt/lib/glow/src/glow_grownode.cpp
xtt/lib/glow/src/glow_grownode.cpp
+6
-18
xtt/lib/glow/src/glow_growpolyline.cpp
xtt/lib/glow/src/glow_growpolyline.cpp
+0
-25
xtt/lib/glow/src/glow_growpolyline.h
xtt/lib/glow/src/glow_growpolyline.h
+0
-8
xtt/lib/glow/src/glow_growrect.cpp
xtt/lib/glow/src/glow_growrect.cpp
+0
-25
xtt/lib/glow/src/glow_growrect.h
xtt/lib/glow/src/glow_growrect.h
+0
-8
xtt/lib/glow/src/glow_growrectrounded.cpp
xtt/lib/glow/src/glow_growrectrounded.cpp
+0
-25
xtt/lib/glow/src/glow_growrectrounded.h
xtt/lib/glow/src/glow_growrectrounded.h
+0
-8
xtt/lib/glow/src/glow_growsubannot.cpp
xtt/lib/glow/src/glow_growsubannot.cpp
+0
-25
xtt/lib/glow/src/glow_growsubannot.h
xtt/lib/glow/src/glow_growsubannot.h
+0
-1
xtt/lib/glow/src/glow_growtext.cpp
xtt/lib/glow/src/glow_growtext.cpp
+0
-22
xtt/lib/glow/src/glow_growtext.h
xtt/lib/glow/src/glow_growtext.h
+0
-8
xtt/lib/glow/src/glow_line.cpp
xtt/lib/glow/src/glow_line.cpp
+0
-12
xtt/lib/glow/src/glow_line.h
xtt/lib/glow/src/glow_line.h
+0
-16
No files found.
xtt/lib/glow/src/glow_arc.cpp
View file @
d3fce4b2
...
@@ -322,20 +322,6 @@ void GlowArc::move(void* pos, double x1, double y1, double x2, double y2,
...
@@ -322,20 +322,6 @@ void GlowArc::move(void* pos, double x1, double y1, double x2, double y2,
ctx
->
set_dirty
();
ctx
->
set_dirty
();
}
}
void
GlowArc
::
move_noerase
(
void
*
pos
,
double
x1
,
double
y1
,
double
x2
,
double
y2
,
int
ang1
,
int
ang2
,
int
highlight
,
int
hot
)
{
ll
.
x
=
x1
;
ll
.
y
=
y1
;
ur
.
x
=
x2
;
ur
.
y
=
y2
;
angle1
=
ang1
;
angle2
=
ang2
;
zoom
();
nav_zoom
();
ctx
->
set_dirty
();
}
void
GlowArc
::
shift
(
void
GlowArc
::
shift
(
void
*
pos
,
double
delta_x
,
double
delta_y
,
int
highlight
,
int
hot
)
void
*
pos
,
double
delta_x
,
double
delta_y
,
int
highlight
,
int
hot
)
{
{
...
...
xtt/lib/glow/src/glow_arc.h
View file @
d3fce4b2
...
@@ -189,25 +189,6 @@ public:
...
@@ -189,25 +189,6 @@ public:
void
move
(
void
*
pos
,
double
x1
,
double
y1
,
double
x2
,
double
y2
,
int
ang1
,
void
move
(
void
*
pos
,
double
x1
,
double
y1
,
double
x2
,
double
y2
,
int
ang1
,
int
ang2
,
int
highlight
,
int
hot
);
int
ang2
,
int
highlight
,
int
hot
);
//! Move the arc to the specified coordinates without erase.
/*!
\param pos Position. Should be zero.
\param x1 x coordinate of first point.
\param y1 y coordinate of first point.
\param x2 x coordinate of second point.
\param y2 y coordinate of second point.
\param ang1 Start angle in degrees.
\param ang2 Length of arc in degrees.
\param highlight Draw with highlight colors.
\param hot Draw as hot, with larger line width.
Both points are given new coordinates, so the direction and length of the
arc can
be entirely different.
*/
void
move_noerase
(
void
*
pos
,
double
x1
,
double
y1
,
double
x2
,
double
y2
,
int
ang1
,
int
ang2
,
int
highlight
,
int
hot
);
//! Move the arc.
//! Move the arc.
/*!
/*!
\param pos Position. Should be zero.
\param pos Position. Should be zero.
...
...
xtt/lib/glow/src/glow_array_elem.h
View file @
d3fce4b2
...
@@ -113,7 +113,9 @@ public:
...
@@ -113,7 +113,9 @@ public:
virtual
void
erase
(
DrawWind
*
w
,
GlowTransform
*
t
,
int
hot
,
void
*
node
){}
virtual
void
erase
(
DrawWind
*
w
,
GlowTransform
*
t
,
int
hot
,
void
*
node
){}
virtual
void
draw_inverse
(
void
*
pos
,
int
hot
,
void
*
node
){}
virtual
void
draw_inverse
(
void
*
pos
,
int
hot
,
void
*
node
){}
virtual
void
move
(
double
delta_x
,
double
delta_y
,
int
grid
){}
virtual
void
move
(
double
delta_x
,
double
delta_y
,
int
grid
){}
virtual
void
move_noerase
(
int
delta_x
,
int
delta_y
,
int
grid
){}
virtual
void
move_noerase
(
int
delta_x
,
int
delta_y
,
int
grid
)
{
move
(
double
(
delta_x
),
double
(
delta_y
),
grid
);
}
virtual
void
shift
(
virtual
void
shift
(
void
*
pos
,
double
delta_x
,
double
delta_y
,
int
highlight
,
int
hot
){}
void
*
pos
,
double
delta_x
,
double
delta_y
,
int
highlight
,
int
hot
){}
virtual
void
conpoint_select
(
virtual
void
conpoint_select
(
...
...
xtt/lib/glow/src/glow_con.cpp
View file @
d3fce4b2
...
@@ -2851,11 +2851,7 @@ void GlowCon::draw_routed(int points, double* x, double* y)
...
@@ -2851,11 +2851,7 @@ void GlowCon::draw_routed(int points, double* x, double* y)
{
{
for
(
int
i
=
0
;
i
<
points
-
1
;
i
++
)
{
for
(
int
i
=
0
;
i
<
points
-
1
;
i
++
)
{
GlowLine
*
l
=
(
GlowLine
*
)
line_a
[
i
];
GlowLine
*
l
=
(
GlowLine
*
)
line_a
[
i
];
if
(
i
<
l_num
)
l
->
move
(
&
cc
->
zero
,
x
[
i
],
y
[
i
],
x
[
i
+
1
],
y
[
i
+
1
],
highlight
,
hot
);
l
->
move
(
&
cc
->
zero
,
x
[
i
],
y
[
i
],
x
[
i
+
1
],
y
[
i
+
1
],
highlight
,
hot
);
else
l
->
move_noerase
(
&
cc
->
zero
,
x
[
i
],
y
[
i
],
x
[
i
+
1
],
y
[
i
+
1
],
highlight
,
hot
);
}
}
ctx
->
set_dirty
();
ctx
->
set_dirty
();
...
@@ -3103,21 +3099,13 @@ void GlowCon::draw_routed_roundcorner(int points, double* x, double* y)
...
@@ -3103,21 +3099,13 @@ void GlowCon::draw_routed_roundcorner(int points, double* x, double* y)
for
(
int
i
=
0
;
i
<
points
-
1
;
i
++
)
{
for
(
int
i
=
0
;
i
<
points
-
1
;
i
++
)
{
l
=
(
GlowLine
*
)
line_a
[
i
];
l
=
(
GlowLine
*
)
line_a
[
i
];
if
(
i
<
l_num
)
l
->
move
(
&
cc
->
zero
,
line_x1
[
i
],
line_y1
[
i
],
line_x2
[
i
],
line_y2
[
i
],
l
->
move
(
&
cc
->
zero
,
line_x1
[
i
],
line_y1
[
i
],
line_x2
[
i
],
line_y2
[
i
],
highlight
,
hot
);
else
l
->
move_noerase
(
&
cc
->
zero
,
line_x1
[
i
],
line_y1
[
i
],
line_x2
[
i
],
line_y2
[
i
],
highlight
,
hot
);
highlight
,
hot
);
}
}
for
(
int
i
=
0
;
i
<
points
-
2
;
i
++
)
{
for
(
int
i
=
0
;
i
<
points
-
2
;
i
++
)
{
a
=
(
GlowArc
*
)
arc_a
[
i
];
a
=
(
GlowArc
*
)
arc_a
[
i
];
if
(
i
<
a_num
)
a
->
move
(
&
cc
->
zero
,
arc_ll_x
[
i
],
arc_ll_y
[
i
],
arc_ur_x
[
i
],
arc_ur_y
[
i
],
a
->
move
(
&
cc
->
zero
,
arc_ll_x
[
i
],
arc_ll_y
[
i
],
arc_ur_x
[
i
],
arc_ur_y
[
i
],
arc_angle1
[
i
],
arc_angle2
[
i
],
highlight
,
hot
);
arc_angle1
[
i
],
arc_angle2
[
i
],
highlight
,
hot
);
else
a
->
move_noerase
(
&
cc
->
zero
,
arc_ll_x
[
i
],
arc_ll_y
[
i
],
arc_ur_x
[
i
],
arc_ur_y
[
i
],
arc_angle1
[
i
],
arc_angle2
[
i
],
highlight
,
hot
);
}
}
ctx
->
set_dirty
();
ctx
->
set_dirty
();
l_num
=
points
-
1
;
l_num
=
points
-
1
;
...
...
xtt/lib/glow/src/glow_growarc.cpp
View file @
d3fce4b2
...
@@ -111,31 +111,6 @@ void GrowArc::move(double delta_x, double delta_y, int grid)
...
@@ -111,31 +111,6 @@ void GrowArc::move(double delta_x, double delta_y, int grid)
}
}
}
}
void
GrowArc
::
move_noerase
(
int
delta_x
,
int
delta_y
,
int
grid
)
{
if
(
fixposition
)
return
;
if
(
grid
)
{
double
x_grid
,
y_grid
;
/* Move to closest grid point */
ctx
->
find_grid
(
x_left
+
double
(
delta_x
)
/
ctx
->
mw
->
zoom_factor_x
,
y_low
+
double
(
delta_y
)
/
ctx
->
mw
->
zoom_factor_y
,
&
x_grid
,
&
y_grid
);
trf
.
move
(
x_grid
-
x_left
,
y_grid
-
y_low
);
get_node_borders
();
}
else
{
double
dx
=
double
(
delta_x
)
/
ctx
->
mw
->
zoom_factor_x
;
double
dy
=
double
(
delta_y
)
/
ctx
->
mw
->
zoom_factor_y
;
trf
.
move
(
dx
,
dy
);
x_right
+=
dx
;
x_left
+=
dx
;
y_high
+=
dy
;
y_low
+=
dy
;
}
ctx
->
set_dirty
();
}
int
GrowArc
::
local_event_handler
(
glow_eEvent
event
,
double
x
,
double
y
)
int
GrowArc
::
local_event_handler
(
glow_eEvent
event
,
double
x
,
double
y
)
{
{
double
ll_x
,
ur_x
,
ll_y
,
ur_y
;
double
ll_x
,
ur_x
,
ll_y
,
ur_y
;
...
...
xtt/lib/glow/src/glow_growarc.h
View file @
d3fce4b2
...
@@ -225,14 +225,6 @@ public:
...
@@ -225,14 +225,6 @@ public:
*/
*/
void
move
(
double
delta_x
,
double
delta_y
,
int
grid
);
void
move
(
double
delta_x
,
double
delta_y
,
int
grid
);
//! Move the object without erase.
/*!
\param delta_x Moved distance in x direction.
\param delta_y Moved distance in y direction.
\param grid Position object on grid point.
*/
void
move_noerase
(
int
delta_x
,
int
delta_y
,
int
grid
);
//! Set object highlight.
//! Set object highlight.
/*!
/*!
\param on If 1, set highlight. If 0, reset highlight.
\param on If 1, set highlight. If 0, reset highlight.
...
...
xtt/lib/glow/src/glow_growconpoint.cpp
View file @
d3fce4b2
...
@@ -100,30 +100,6 @@ void GrowConPoint::move(double delta_x, double delta_y, int grid)
...
@@ -100,30 +100,6 @@ void GrowConPoint::move(double delta_x, double delta_y, int grid)
ctx
->
set_dirty
();
ctx
->
set_dirty
();
}
}
void
GrowConPoint
::
move_noerase
(
int
delta_x
,
int
delta_y
,
int
grid
)
{
if
(
grid
)
{
double
x
,
y
,
x_grid
,
y_grid
;
/* Move to closest grid point */
x
=
(
x_right
+
x_left
)
/
2
;
y
=
(
y_high
+
y_low
)
/
2
;
ctx
->
find_grid
(
x
+
double
(
delta_x
)
/
ctx
->
mw
->
zoom_factor_x
,
y
+
double
(
delta_y
)
/
ctx
->
mw
->
zoom_factor_y
,
&
x_grid
,
&
y_grid
);
trf
.
move
(
x_grid
-
x
,
y_grid
-
y
);
get_node_borders
();
}
else
{
double
dx
=
double
(
delta_x
)
/
ctx
->
mw
->
zoom_factor_x
;
double
dy
=
double
(
delta_y
)
/
ctx
->
mw
->
zoom_factor_y
;
trf
.
move
(
dx
,
dy
);
x_right
+=
dx
;
x_left
+=
dx
;
y_high
+=
dy
;
y_low
+=
dy
;
}
ctx
->
set_dirty
();
}
int
GrowConPoint
::
event_handler
(
glow_eEvent
event
,
int
x
,
int
y
,
double
fx
,
double
fy
)
int
GrowConPoint
::
event_handler
(
glow_eEvent
event
,
int
x
,
int
y
,
double
fx
,
double
fy
)
{
{
int
sts
;
int
sts
;
...
...
xtt/lib/glow/src/glow_growconpoint.h
View file @
d3fce4b2
...
@@ -202,14 +202,6 @@ public:
...
@@ -202,14 +202,6 @@ public:
*/
*/
void
move
(
double
delta_x
,
double
delta_y
,
int
grid
);
void
move
(
double
delta_x
,
double
delta_y
,
int
grid
);
//! Move the object without erase.
/*!
\param delta_x Moved distance in x direction.
\param delta_y Moved distance in y direction.
\param grid Position object on grid point.
*/
void
move_noerase
(
int
delta_x
,
int
delta_y
,
int
grid
);
//! Set object highlight.
//! Set object highlight.
/*!
/*!
\param on If 1, set highlight. If 0, reset highlight.
\param on If 1, set highlight. If 0, reset highlight.
...
...
xtt/lib/glow/src/glow_growimage.cpp
View file @
d3fce4b2
...
@@ -277,31 +277,6 @@ void GrowImage::move(double delta_x, double delta_y, int grid)
...
@@ -277,31 +277,6 @@ void GrowImage::move(double delta_x, double delta_y, int grid)
ctx
->
set_dirty
();
ctx
->
set_dirty
();
}
}
void
GrowImage
::
move_noerase
(
int
delta_x
,
int
delta_y
,
int
grid
)
{
if
(
fixposition
)
return
;
if
(
grid
)
{
double
x_grid
,
y_grid
;
/* Move to closest grid point */
ctx
->
find_grid
(
x_left
+
double
(
delta_x
)
/
ctx
->
mw
->
zoom_factor_x
,
y_low
+
double
(
delta_y
)
/
ctx
->
mw
->
zoom_factor_y
,
&
x_grid
,
&
y_grid
);
trf
.
move
(
x_grid
-
x_left
,
y_grid
-
y_low
);
get_node_borders
();
}
else
{
double
dx
=
double
(
delta_x
)
/
ctx
->
mw
->
zoom_factor_x
;
double
dy
=
double
(
delta_y
)
/
ctx
->
mw
->
zoom_factor_y
;
trf
.
move
(
dx
,
dy
);
x_right
+=
dx
;
x_left
+=
dx
;
y_high
+=
dy
;
y_low
+=
dy
;
}
ctx
->
set_dirty
();
}
int
GrowImage
::
local_event_handler
(
glow_eEvent
event
,
double
x
,
double
y
)
int
GrowImage
::
local_event_handler
(
glow_eEvent
event
,
double
x
,
double
y
)
{
{
double
ll_x
,
ur_x
,
ll_y
,
ur_y
;
double
ll_x
,
ur_x
,
ll_y
,
ur_y
;
...
...
xtt/lib/glow/src/glow_growimage.h
View file @
d3fce4b2
...
@@ -212,14 +212,6 @@ public:
...
@@ -212,14 +212,6 @@ public:
*/
*/
void
move
(
double
delta_x
,
double
delta_y
,
int
grid
);
void
move
(
double
delta_x
,
double
delta_y
,
int
grid
);
//! Move the object without erase.
/*!
\param delta_x Moved distance in x direction.
\param delta_y Moved distance in y direction.
\param grid Position object on grid point.
*/
void
move_noerase
(
int
delta_x
,
int
delta_y
,
int
grid
);
//! Set object highlight.
//! Set object highlight.
/*!
/*!
\param on If 1, set highlight. If 0, reset highlight.
\param on If 1, set highlight. If 0, reset highlight.
...
...
xtt/lib/glow/src/glow_growline.cpp
View file @
d3fce4b2
...
@@ -102,28 +102,6 @@ void GrowLine::move(double delta_x, double delta_y, int grid)
...
@@ -102,28 +102,6 @@ void GrowLine::move(double delta_x, double delta_y, int grid)
}
}
}
}
void
GrowLine
::
move_noerase
(
int
delta_x
,
int
delta_y
,
int
grid
)
{
if
(
grid
)
{
double
x_grid
,
y_grid
;
/* Move to closest grid point */
ctx
->
find_grid
(
x_left
+
double
(
delta_x
)
/
ctx
->
mw
->
zoom_factor_x
,
y_low
+
double
(
delta_y
)
/
ctx
->
mw
->
zoom_factor_y
,
&
x_grid
,
&
y_grid
);
trf
.
move
(
x_grid
-
x_left
,
y_grid
-
y_low
);
get_node_borders
();
}
else
{
double
dx
=
double
(
delta_x
)
/
ctx
->
mw
->
zoom_factor_x
;
double
dy
=
double
(
delta_y
)
/
ctx
->
mw
->
zoom_factor_y
;
trf
.
move
(
dx
,
dy
);
x_right
+=
dx
;
x_left
+=
dx
;
y_high
+=
dy
;
y_low
+=
dy
;
}
ctx
->
set_dirty
();
}
int
GrowLine
::
local_event_handler
(
glow_eEvent
event
,
double
x
,
double
y
)
{
int
GrowLine
::
local_event_handler
(
glow_eEvent
event
,
double
x
,
double
y
)
{
glow_sPoint
tmp2
=
trf
.
reverse
(
0.05
*
line_width
,
0.05
*
line_width
);
glow_sPoint
tmp2
=
trf
.
reverse
(
0.05
*
line_width
,
0.05
*
line_width
);
glow_sPoint
tmp1
=
trf
.
reverse
(
0
,
0
);
glow_sPoint
tmp1
=
trf
.
reverse
(
0
,
0
);
...
...
xtt/lib/glow/src/glow_growline.h
View file @
d3fce4b2
...
@@ -211,14 +211,6 @@ public:
...
@@ -211,14 +211,6 @@ public:
*/
*/
void
move
(
double
delta_x
,
double
delta_y
,
int
grid
);
void
move
(
double
delta_x
,
double
delta_y
,
int
grid
);
//! Move the object without erase.
/*!
\param delta_x Moved distance in x direction.
\param delta_y Moved distance in y direction.
\param grid Position object on grid point.
*/
void
move_noerase
(
int
delta_x
,
int
delta_y
,
int
grid
);
//! Set object highlight.
//! Set object highlight.
/*!
/*!
\param on If 1, set highlight. If 0, reset highlight.
\param on If 1, set highlight. If 0, reset highlight.
...
...
xtt/lib/glow/src/glow_grownode.cpp
View file @
d3fce4b2
...
@@ -437,24 +437,12 @@ void GrowNode::move(double delta_x, double delta_y, int grid)
...
@@ -437,24 +437,12 @@ void GrowNode::move(double delta_x, double delta_y, int grid)
void
GrowNode
::
move_noerase
(
int
delta_x
,
int
delta_y
,
int
grid
)
void
GrowNode
::
move_noerase
(
int
delta_x
,
int
delta_y
,
int
grid
)
{
{
if
(
grid
)
{
double
x1
=
obst_x_left
,
y1
=
obst_y_low
,
x2
=
obst_x_right
,
y2
=
obst_y_high
;
double
x_grid
,
y_grid
;
move
(
double
(
delta_x
),
double
(
delta_y
),
grid
);
obst_x_left
=
x1
;
/* Move to closest grid point */
obst_y_low
=
y1
;
ctx
->
find_grid
(
x_left
+
double
(
delta_x
)
/
ctx
->
mw
->
zoom_factor_x
,
obst_x_right
=
x2
;
y_low
+
double
(
delta_y
)
/
ctx
->
mw
->
zoom_factor_y
,
&
x_grid
,
&
y_grid
);
obst_y_high
=
y2
;
trf
.
move
(
x_grid
-
x_left
,
y_grid
-
y_low
);
get_node_borders
();
}
else
{
double
dx
=
double
(
delta_x
)
/
ctx
->
mw
->
zoom_factor_x
;
double
dy
=
double
(
delta_y
)
/
ctx
->
mw
->
zoom_factor_y
;
trf
.
move
(
dx
,
dy
);
x_right
+=
dx
;
x_left
+=
dx
;
y_high
+=
dy
;
y_low
+=
dy
;
}
ctx
->
set_dirty
();
}
}
void
GrowNode
::
set_highlight
(
int
on
)
void
GrowNode
::
set_highlight
(
int
on
)
...
...
xtt/lib/glow/src/glow_growpolyline.cpp
View file @
d3fce4b2
...
@@ -575,31 +575,6 @@ GrowPolyLine::~GrowPolyLine()
...
@@ -575,31 +575,6 @@ GrowPolyLine::~GrowPolyLine()
ctx
->
gdraw
->
set_cursor
(
ctx
->
mw
,
glow_eDrawCursor_Normal
);
ctx
->
gdraw
->
set_cursor
(
ctx
->
mw
,
glow_eDrawCursor_Normal
);
}
}
void
GrowPolyLine
::
move_noerase
(
int
delta_x
,
int
delta_y
,
int
grid
)
{
if
(
fixposition
)
return
;
if
(
grid
)
{
double
x_grid
,
y_grid
;
/* Move to closest grid point */
ctx
->
find_grid
(
x_left
+
double
(
delta_x
)
/
ctx
->
mw
->
zoom_factor_x
,
y_low
+
double
(
delta_y
)
/
ctx
->
mw
->
zoom_factor_y
,
&
x_grid
,
&
y_grid
);
trf
.
move
(
x_grid
-
x_left
,
y_grid
-
y_low
);
get_node_borders
();
}
else
{
double
dx
=
double
(
delta_x
)
/
ctx
->
mw
->
zoom_factor_x
;
double
dy
=
double
(
delta_y
)
/
ctx
->
mw
->
zoom_factor_y
;
trf
.
move
(
dx
,
dy
);
x_right
+=
dx
;
x_left
+=
dx
;
y_high
+=
dy
;
y_low
+=
dy
;
}
ctx
->
set_dirty
();
}
int
GrowPolyLine
::
local_event_handler
(
glow_eEvent
event
,
double
x
,
double
y
)
int
GrowPolyLine
::
local_event_handler
(
glow_eEvent
event
,
double
x
,
double
y
)
{
{
if
(
ctx
->
edit_mode
==
grow_eMode_EditPolyLine
&&
ctx
->
a_sel
[
0
]
==
this
)
{
if
(
ctx
->
edit_mode
==
grow_eMode_EditPolyLine
&&
ctx
->
a_sel
[
0
]
==
this
)
{
...
...
xtt/lib/glow/src/glow_growpolyline.h
View file @
d3fce4b2
...
@@ -223,14 +223,6 @@ public:
...
@@ -223,14 +223,6 @@ public:
*/
*/
void
move
(
double
delta_x
,
double
delta_y
,
int
grid
);
void
move
(
double
delta_x
,
double
delta_y
,
int
grid
);
//! Move the object without erase.
/*!
\param delta_x Moved distance in x direction.
\param delta_y Moved distance in y direction.
\param grid Position object on grid point.
*/
void
move_noerase
(
int
delta_x
,
int
delta_y
,
int
grid
);
//! Move a single point
//! Move a single point
/*!
/*!
\param delta_x Moved distance in x direction.
\param delta_x Moved distance in x direction.
...
...
xtt/lib/glow/src/glow_growrect.cpp
View file @
d3fce4b2
...
@@ -113,31 +113,6 @@ void GrowRect::move(double delta_x, double delta_y, int grid)
...
@@ -113,31 +113,6 @@ void GrowRect::move(double delta_x, double delta_y, int grid)
ctx
->
set_dirty
();
ctx
->
set_dirty
();
}
}
void
GrowRect
::
move_noerase
(
int
delta_x
,
int
delta_y
,
int
grid
)
{
if
(
fixposition
)
return
;
if
(
grid
)
{
double
x_grid
,
y_grid
;
/* Move to closest grid point */
ctx
->
find_grid
(
x_left
+
double
(
delta_x
)
/
ctx
->
mw
->
zoom_factor_x
,
y_low
+
double
(
delta_y
)
/
ctx
->
mw
->
zoom_factor_y
,
&
x_grid
,
&
y_grid
);
trf
.
move
(
x_grid
-
x_left
,
y_grid
-
y_low
);
get_node_borders
();
}
else
{
double
dx
=
double
(
delta_x
)
/
ctx
->
mw
->
zoom_factor_x
;
double
dy
=
double
(
delta_y
)
/
ctx
->
mw
->
zoom_factor_y
;
trf
.
move
(
dx
,
dy
);
x_right
+=
dx
;
x_left
+=
dx
;
y_high
+=
dy
;
y_low
+=
dy
;
}
ctx
->
set_dirty
();
}
int
GrowRect
::
local_event_handler
(
glow_eEvent
event
,
double
x
,
double
y
)
int
GrowRect
::
local_event_handler
(
glow_eEvent
event
,
double
x
,
double
y
)
{
{
double
ll_x
,
ur_x
,
ll_y
,
ur_y
;
double
ll_x
,
ur_x
,
ll_y
,
ur_y
;
...
...
xtt/lib/glow/src/glow_growrect.h
View file @
d3fce4b2
...
@@ -219,14 +219,6 @@ public:
...
@@ -219,14 +219,6 @@ public:
*/
*/
void
move
(
double
delta_x
,
double
delta_y
,
int
grid
);
void
move
(
double
delta_x
,
double
delta_y
,
int
grid
);
//! Move the object without erase.
/*!
\param delta_x Moved distance in x direction.
\param delta_y Moved distance in y direction.
\param grid Position object on grid point.
*/
void
move_noerase
(
int
delta_x
,
int
delta_y
,
int
grid
);
//! Set object highlight.
//! Set object highlight.
/*!
/*!
\param on If 1, set highlight. If 0, reset highlight.
\param on If 1, set highlight. If 0, reset highlight.
...
...
xtt/lib/glow/src/glow_growrectrounded.cpp
View file @
d3fce4b2
...
@@ -110,31 +110,6 @@ void GrowRectRounded::move(double delta_x, double delta_y, int grid)
...
@@ -110,31 +110,6 @@ void GrowRectRounded::move(double delta_x, double delta_y, int grid)
ctx
->
set_dirty
();
ctx
->
set_dirty
();
}
}
void
GrowRectRounded
::
move_noerase
(
int
delta_x
,
int
delta_y
,
int
grid
)
{
if
(
fixposition
)
return
;
if
(
grid
)
{
double
x_grid
,
y_grid
;
/* Move to closest grid point */
ctx
->
find_grid
(
x_left
+
double
(
delta_x
)
/
ctx
->
mw
->
zoom_factor_x
,
y_low
+
double
(
delta_y
)
/
ctx
->
mw
->
zoom_factor_y
,
&
x_grid
,
&
y_grid
);
trf
.
move
(
x_grid
-
x_left
,
y_grid
-
y_low
);
get_node_borders
();
}
else
{
double
dx
=
double
(
delta_x
)
/
ctx
->
mw
->
zoom_factor_x
;
double
dy
=
double
(
delta_y
)
/
ctx
->
mw
->
zoom_factor_y
;
trf
.
move
(
dx
,
dy
);
x_right
+=
dx
;
x_left
+=
dx
;
y_high
+=
dy
;
y_low
+=
dy
;
}
ctx
->
set_dirty
();
}
int
GrowRectRounded
::
local_event_handler
(
glow_eEvent
event
,
double
x
,
double
y
)
int
GrowRectRounded
::
local_event_handler
(
glow_eEvent
event
,
double
x
,
double
y
)
{
{
double
ll_x
,
ur_x
,
ll_y
,
ur_y
;
double
ll_x
,
ur_x
,
ll_y
,
ur_y
;
...
...
xtt/lib/glow/src/glow_growrectrounded.h
View file @
d3fce4b2
...
@@ -216,14 +216,6 @@ public:
...
@@ -216,14 +216,6 @@ public:
*/
*/
void
move
(
double
delta_x
,
double
delta_y
,
int
grid
);
void
move
(
double
delta_x
,
double
delta_y
,
int
grid
);
//! Move the object without erase.
/*!
\param delta_x Moved distance in x direction.
\param delta_y Moved distance in y direction.
\param grid Position object on grid point.
*/
void
move_noerase
(
int
delta_x
,
int
delta_y
,
int
grid
);
//! Set object highlight.
//! Set object highlight.
/*!
/*!
\param on If 1, set highlight. If 0, reset highlight.
\param on If 1, set highlight. If 0, reset highlight.
...
...
xtt/lib/glow/src/glow_growsubannot.cpp
View file @
d3fce4b2
...
@@ -106,31 +106,6 @@ void GrowSubAnnot::move(double delta_x, double delta_y, int grid)
...
@@ -106,31 +106,6 @@ void GrowSubAnnot::move(double delta_x, double delta_y, int grid)
ctx
->
set_dirty
();
ctx
->
set_dirty
();
}
}
void
GrowSubAnnot
::
move_noerase
(
int
delta_x
,
int
delta_y
,
int
grid
)
{
if
(
grid
)
{
double
x_grid
,
y_grid
;
/* Move to closest grid point */
ctx
->
find_grid
(
x_left
+
double
(
delta_x
)
/
ctx
->
mw
->
zoom_factor_x
,
y_low
+
double
(
delta_y
)
/
ctx
->
mw
->
zoom_factor_y
,
&
x_grid
,
&
y_grid
);
trf
.
move
(
x_grid
-
x_left
,
y_grid
-
y_low
);
get_node_borders
();
}
else
{
double
dx
=
double
(
delta_x
)
/
ctx
->
mw
->
zoom_factor_x
;
double
dy
=
double
(
delta_y
)
/
ctx
->
mw
->
zoom_factor_y
;
trf
.
move
(
dx
,
dy
);
x_right
+=
dx
;
x_left
+=
dx
;
y_high
+=
dy
;
y_low
+=
dy
;
}
glow_sPoint
p
=
trf
*
this
->
p
;
rect
.
move
((
void
*
)
&
pzero
,
p
.
x
,
p
.
y
-
ctx
->
draw_delta
,
highlight
,
hot
);
text
.
move
((
void
*
)
&
pzero
,
p
.
x
,
p
.
y
,
highlight
,
hot
);
ctx
->
set_dirty
();
}
int
GrowSubAnnot
::
event_handler
(
glow_eEvent
event
,
int
x
,
int
y
,
double
fx
,
double
fy
)
int
GrowSubAnnot
::
event_handler
(
glow_eEvent
event
,
int
x
,
int
y
,
double
fx
,
double
fy
)
{
{
int
sts
;
int
sts
;
...
...
xtt/lib/glow/src/glow_growsubannot.h
View file @
d3fce4b2
...
@@ -75,7 +75,6 @@ public:
...
@@ -75,7 +75,6 @@ public:
rect
.
erase
(
w
,
(
void
*
)
&
pzero
,
hot
,
NULL
);
rect
.
erase
(
w
,
(
void
*
)
&
pzero
,
hot
,
NULL
);
}
}
void
move
(
double
delta_x
,
double
delta_y
,
int
grid
);
void
move
(
double
delta_x
,
double
delta_y
,
int
grid
);
void
move_noerase
(
int
delta_x
,
int
delta_y
,
int
grid
);
void
set_highlight
(
int
on
);
void
set_highlight
(
int
on
);
int
get_highlight
()
int
get_highlight
()
{
{
...
...
xtt/lib/glow/src/glow_growtext.cpp
View file @
d3fce4b2
...
@@ -109,28 +109,6 @@ void GrowText::move(double delta_x, double delta_y, int grid)
...
@@ -109,28 +109,6 @@ void GrowText::move(double delta_x, double delta_y, int grid)
ctx
->
set_dirty
();
ctx
->
set_dirty
();
}
}
void
GrowText
::
move_noerase
(
int
delta_x
,
int
delta_y
,
int
grid
)
{
if
(
grid
)
{
double
x_grid
,
y_grid
;
/* Move to closest grid point */
ctx
->
find_grid
(
x_left
+
double
(
delta_x
)
/
ctx
->
mw
->
zoom_factor_x
,
y_low
+
double
(
delta_y
)
/
ctx
->
mw
->
zoom_factor_y
,
&
x_grid
,
&
y_grid
);
trf
.
move
(
x_grid
-
x_left
,
y_grid
-
y_low
);
get_node_borders
();
}
else
{
double
dx
=
double
(
delta_x
)
/
ctx
->
mw
->
zoom_factor_x
;
double
dy
=
double
(
delta_y
)
/
ctx
->
mw
->
zoom_factor_y
;
trf
.
move
(
dx
,
dy
);
x_right
+=
dx
;
x_left
+=
dx
;
y_high
+=
dy
;
y_low
+=
dy
;
}
ctx
->
set_dirty
();
}
int
GrowText
::
local_event_handler
(
glow_eEvent
event
,
double
x
,
double
y
)
int
GrowText
::
local_event_handler
(
glow_eEvent
event
,
double
x
,
double
y
)
{
{
return
(
x_left
<=
x
&&
x
<=
x_right
&&
y_low
<=
y
&&
y
<=
y_high
);
return
(
x_left
<=
x
&&
x
<=
x_right
&&
y_low
<=
y
&&
y
<=
y_high
);
...
...
xtt/lib/glow/src/glow_growtext.h
View file @
d3fce4b2
...
@@ -219,14 +219,6 @@ public:
...
@@ -219,14 +219,6 @@ public:
*/
*/
void
move
(
double
delta_x
,
double
delta_y
,
int
grid
);
void
move
(
double
delta_x
,
double
delta_y
,
int
grid
);
//! Move the object without erase.
/*!
\param delta_x Moved distance in x direction.
\param delta_y Moved distance in y direction.
\param grid Position object on grid point.
*/
void
move_noerase
(
int
delta_x
,
int
delta_y
,
int
grid
);
//! Set object highlight.
//! Set object highlight.
/*!
/*!
\param on If 1, set highlight. If 0, reset highlight.
\param on If 1, set highlight. If 0, reset highlight.
...
...
xtt/lib/glow/src/glow_line.cpp
View file @
d3fce4b2
...
@@ -304,18 +304,6 @@ void GlowLine::move(void* pos, double x1, double y1, double x2, double y2,
...
@@ -304,18 +304,6 @@ void GlowLine::move(void* pos, double x1, double y1, double x2, double y2,
ctx
->
set_dirty
();
ctx
->
set_dirty
();
}
}
void
GlowLine
::
move_noerase
(
void
*
pos
,
double
x1
,
double
y1
,
double
x2
,
double
y2
,
int
highlight
,
int
hot
)
{
p1
.
x
=
x1
;
p1
.
y
=
y1
;
p2
.
x
=
x2
;
p2
.
y
=
y2
;
zoom
();
nav_zoom
();
ctx
->
set_dirty
();
}
void
GlowLine
::
shift
(
void
GlowLine
::
shift
(
void
*
pos
,
double
delta_x
,
double
delta_y
,
int
highlight
,
int
hot
)
void
*
pos
,
double
delta_x
,
double
delta_y
,
int
highlight
,
int
hot
)
{
{
...
...
xtt/lib/glow/src/glow_line.h
View file @
d3fce4b2
...
@@ -179,22 +179,6 @@ public:
...
@@ -179,22 +179,6 @@ public:
void
move
(
void
*
pos
,
double
x1
,
double
y1
,
double
x2
,
double
y2
,
void
move
(
void
*
pos
,
double
x1
,
double
y1
,
double
x2
,
double
y2
,
int
highlight
,
int
hot
);
int
highlight
,
int
hot
);
//! Move the line to the specified coordinates without erase.
/*!
\param pos Position. Should be zero.
\param x1 x coordinate of first point.
\param y1 y coordinate of first point.
\param x2 x coordinate of second point.
\param y2 y coordinate of second point.
\param highlight Draw with highlight colors.
\param hot Draw as hot, with larger line width.
Both endpoints are given new coordinates, so the direction and length of the
line can be entirely different.
*/
void
move_noerase
(
void
*
pos
,
double
x1
,
double
y1
,
double
x2
,
double
y2
,
int
highlight
,
int
hot
);
//! Move the line.
//! Move the line.
/*!
/*!
\param pos Position. Should be zero.
\param pos Position. Should be zero.
...
...
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