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
33f599a6
Commit
33f599a6
authored
Dec 29, 2015
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ge trend curve position fix and fastcurve ghost drawing fix
parent
8069fd28
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
62 additions
and
29 deletions
+62
-29
xtt/lib/ge/src/ge_dyn.cpp
xtt/lib/ge/src/ge_dyn.cpp
+5
-1
xtt/lib/glow/src/glow_array.cpp
xtt/lib/glow/src/glow_array.cpp
+2
-1
xtt/lib/glow/src/glow_growapi.cpp
xtt/lib/glow/src/glow_growapi.cpp
+5
-0
xtt/lib/glow/src/glow_growapi.h
xtt/lib/glow/src/glow_growapi.h
+7
-0
xtt/lib/glow/src/glow_growpolyline.cpp
xtt/lib/glow/src/glow_growpolyline.cpp
+12
-9
xtt/lib/glow/src/glow_growpolyline.h
xtt/lib/glow/src/glow_growpolyline.h
+7
-6
xtt/lib/glow/src/glow_growtrend.cpp
xtt/lib/glow/src/glow_growtrend.cpp
+23
-12
xtt/lib/glow/src/glow_growtrend.h
xtt/lib/glow/src/glow_growtrend.h
+1
-0
No files found.
xtt/lib/ge/src/ge_dyn.cpp
View file @
33f599a6
...
...
@@ -7830,6 +7830,7 @@ int GeTrend::connect( grow_tObject object, glow_sTraceData *trace_data)
pwr_tAName
parsed_name
;
int
sts
;
int
inverted
;
int
attr_cnt
=
0
;
size1
=
4
;
p1
=
0
;
...
...
@@ -7851,8 +7852,9 @@ int GeTrend::connect( grow_tObject object, glow_sTraceData *trace_data)
trend_typeid1
=
attr_type
;
break
;
default:
;
;
}
attr_cnt
++
;
}
size2
=
4
;
p2
=
0
;
...
...
@@ -7875,6 +7877,7 @@ int GeTrend::connect( grow_tObject object, glow_sTraceData *trace_data)
default:
;
}
attr_cnt
++
;
}
grow_GetTrendScanTime
(
object
,
&
scan_time
);
acc_time
=
scan_time
;
...
...
@@ -7931,6 +7934,7 @@ int GeTrend::connect( grow_tObject object, glow_sTraceData *trace_data)
}
}
grow_SetTrendNoOfCurves
(
object
,
attr_cnt
);
trace_data
->
p
=
&
pdummy
;
first_scan
=
true
;
return
1
;
...
...
xtt/lib/glow/src/glow_array.cpp
View file @
33f599a6
...
...
@@ -1155,7 +1155,8 @@ void GlowArray::open( GrowCtx *ctx, ifstream& fp)
}
case
glow_eSave_GrowTrend
:
{
GrowTrend
*
n
=
new
GrowTrend
(
ctx
,
""
);
GrowTrend
*
n
=
new
GrowTrend
(
ctx
,
""
,
0
,
0
,
0
,
0
,
glow_eDrawType_Line
,
1
,
glow_mDisplayLevel_1
,
0
,
1
,
glow_eDrawType_Line
,
1
);
n
->
open
(
fp
);
insert
(
n
);
break
;
...
...
xtt/lib/glow/src/glow_growapi.cpp
View file @
33f599a6
...
...
@@ -4620,6 +4620,11 @@ void grow_SetTrendScanTime( grow_tObject object, double time)
((
GrowTrend
*
)
object
)
->
set_scan_time
(
time
);
}
void
grow_SetTrendNoOfCurves
(
grow_tObject
object
,
int
no_of_curves
)
{
((
GrowTrend
*
)
object
)
->
set_no_of_curves
(
no_of_curves
);
}
void
grow_SetSliderRange
(
grow_tObject
object
,
double
min
,
double
max
)
{
((
GrowSlider
*
)
object
)
->
set_range
(
min
,
max
);
...
...
xtt/lib/glow/src/glow_growapi.h
View file @
33f599a6
...
...
@@ -2330,6 +2330,13 @@ extern "C" {
*/
void
grow_SetTrendScanTime
(
grow_tObject
object
,
double
time
);
//! Set number of curves for of a trend object.
/*!
\param object Trend object.
\param no_of_curves Number of curves.
*/
void
grow_SetTrendNoOfCurves
(
grow_tObject
object
,
int
no_of_curves
);
//! Set number of vertical and horizontal lines in a trend object.
/*!
\param object Trend object.
...
...
xtt/lib/glow/src/glow_growpolyline.cpp
View file @
33f599a6
...
...
@@ -52,7 +52,7 @@ GrowPolyLine::GrowPolyLine( GrowCtx *glow_ctx, const char *name,
glow_sPoint
*
pointarray
,
int
point_cnt
,
glow_eDrawType
border_d_type
,
int
line_w
,
int
fix_line_w
,
int
fill
,
int
display_border
,
int
display_shadow
,
glow_eDrawType
fill_d_type
,
int
closed
,
int
nodraw
)
:
glow_eDrawType
fill_d_type
,
int
closed
,
int
nodraw
,
int
noround
)
:
GlowPolyLine
(
glow_ctx
,
pointarray
,
point_cnt
,
border_d_type
,
line_w
,
fix_line_w
,
fill
,
closed
),
x_right
(
0
),
x_left
(
0
),
y_high
(
0
),
y_low
(
0
),
hot
(
0
),
pzero
(
ctx
),
highlight
(
0
),
inverse
(
0
),
user_data
(
NULL
),
...
...
@@ -65,11 +65,14 @@ GrowPolyLine::GrowPolyLine( GrowCtx *glow_ctx, const char *name,
shadow_contrast
(
2
),
disable_shadow
(
0
),
fill_eq_light
(
0
),
fill_eq_shadow
(
0
),
fill_eq_bglight
(
0
),
fill_eq_bgshadow
(
0
),
fill_eq_background
(
0
),
fixcolor
(
0
),
fixposition
(
0
),
gradient
(
glow_eGradient_No
),
gradient_contrast
(
4
),
disable_gradient
(
0
)
gradient
(
glow_eGradient_No
),
gradient_contrast
(
4
),
disable_gradient
(
0
),
round
(
0.5
)
{
strcpy
(
n_name
,
name
);
pzero
.
nav_zoom
();
strcpy
(
last_group
,
""
);
if
(
noround
)
round
=
0
;
if
(
ctx
->
grid_on
&&
point_cnt
>
0
)
{
double
x_grid
,
y_grid
,
x
,
y
;
...
...
@@ -397,8 +400,8 @@ void GrowPolyLine::draw( GlowWind *w, GlowTransform *t, int highlight, int hot,
else
if
(
x1
*
w
->
zoom_factor_x
-
w
->
offset_x
<
SHRT_MIN
)
point_p
->
x
=
SHRT_MIN
;
else
point_p
->
x
=
int
(
x1
*
w
->
zoom_factor_x
+
0.5
)
-
w
->
offset_x
;
point_p
->
y
=
int
(
y1
*
w
->
zoom_factor_y
+
0.5
)
-
w
->
offset_y
;
point_p
->
x
=
int
(
x1
*
w
->
zoom_factor_x
+
round
)
-
w
->
offset_x
;
point_p
->
y
=
int
(
y1
*
w
->
zoom_factor_y
+
round
)
-
w
->
offset_y
;
point_p
++
;
}
if
(
fill
)
...
...
@@ -536,8 +539,8 @@ void GrowPolyLine::erase( GlowWind *w, GlowTransform *t, int hot, void *node)
y1
=
trf
.
y
(
t
,
((
GlowPoint
*
)
a_points
[
i
])
->
x
,
((
GlowPoint
*
)
a_points
[
i
])
->
y
);
}
point_p
->
x
=
int
(
x1
*
w
->
zoom_factor_x
+
0.5
)
-
w
->
offset_x
;
point_p
->
y
=
int
(
y1
*
w
->
zoom_factor_y
+
0.5
)
-
w
->
offset_y
;
point_p
->
x
=
int
(
x1
*
w
->
zoom_factor_x
+
round
)
-
w
->
offset_x
;
point_p
->
y
=
int
(
y1
*
w
->
zoom_factor_y
+
round
)
-
w
->
offset_y
;
point_p
++
;
}
int
display_shadow
=
((
node
&&
((
GrowNode
*
)
node
)
->
shadow
)
||
shadow
)
&&
!
disable_shadow
&&
...
...
@@ -1566,8 +1569,8 @@ void GrowPolyLine::export_javabean( GlowTransform *t, void *node,
p
[
i
].
x
=
x1
*
ctx
->
mw
.
zoom_factor_x
-
ctx
->
mw
.
offset_x
;
p
[
i
].
y
=
y1
*
ctx
->
mw
.
zoom_factor_y
-
ctx
->
mw
.
offset_y
;
if
(
jshadow
)
{
points
[
i
].
x
=
int
(
p
[
i
].
x
+
0.5
);
points
[
i
].
y
=
int
(
p
[
i
].
y
+
0.5
);
points
[
i
].
x
=
int
(
p
[
i
].
x
+
round
);
points
[
i
].
y
=
int
(
p
[
i
].
y
+
round
);
}
}
...
...
@@ -1576,7 +1579,7 @@ void GrowPolyLine::export_javabean( GlowTransform *t, void *node,
if
(
jshadow
)
{
double
trf_scale
=
trf
.
vertical_scale
(
t
);
int
ish
=
int
(
shadow_width
/
100
*
trf_scale
*
min
((
x_right
-
x_left
)
*
ctx
->
mw
.
zoom_factor_x
,
(
y_high
-
y_low
)
*
ctx
->
mw
.
zoom_factor_y
)
+
0.5
);
min
((
x_right
-
x_left
)
*
ctx
->
mw
.
zoom_factor_x
,
(
y_high
-
y_low
)
*
ctx
->
mw
.
zoom_factor_y
)
+
round
);
if
(
ish
)
calculate_shadow
(
&
sp
,
&
p_num
,
ish
,
0
,
0
,
1
,
0
);
...
...
xtt/lib/glow/src/glow_growpolyline.h
View file @
33f599a6
...
...
@@ -69,12 +69,12 @@ class GrowPolyLine : public GlowPolyLine {
\param nodraw Don't draw the object now.
*/
GrowPolyLine
(
GrowCtx
*
glow_ctx
,
const
char
*
name
,
glow_sPoint
*
pointarray
,
int
point_cnt
,
glow_eDrawType
border_d_type
=
glow_eDrawType_Line
,
int
line_w
=
1
,
int
fix_line_w
=
0
,
int
fill
=
0
,
int
display_border
=
1
,
int
display_shadow
=
0
,
glow_eDrawType
fill_d_type
=
glow_eDrawType_Line
,
int
closed
=
0
,
int
nodraw
=
0
);
glow_sPoint
*
pointarray
,
int
point_cnt
,
glow_eDrawType
border_d_type
=
glow_eDrawType_Line
,
int
line_w
=
1
,
int
fix_line_w
=
0
,
int
fill
=
0
,
int
display_border
=
1
,
int
display_shadow
=
0
,
glow_eDrawType
fill_d_type
=
glow_eDrawType_Line
,
int
closed
=
0
,
int
nodraw
=
0
,
int
noround
=
0
);
//! Destructor
~
GrowPolyLine
();
...
...
@@ -388,6 +388,7 @@ class GrowPolyLine : public GlowPolyLine {
glow_eGradient
gradient
;
//!< Type of gradient.
int
gradient_contrast
;
//!< Gradient contrast.
int
disable_gradient
;
//!< Disable gradient, even if parent node has gradient.
float
round
;
//!< Value to round or floor points.
//! Set user data.
/*!
...
...
xtt/lib/glow/src/glow_growtrend.cpp
View file @
33f599a6
...
...
@@ -114,11 +114,10 @@ void GrowTrend::configure_curves()
glow_sPoint
*
point_p
;
int
i
;
if
(
0
/* strcmp( trace.data[1], "") == 0 */
)
curve_cnt
=
1
;
else
#if 0
if ( !curve_cnt)
curve_cnt = 2;
#endif
no_of_points
=
max
(
2
,
no_of_points
);
points
=
no_of_points
;
...
...
@@ -163,8 +162,7 @@ void GrowTrend::configure_curves()
ctx
->
nodraw
++
;
curve
[
i
]
=
new
GrowPolyLine
(
ctx
,
""
,
pointarray
,
points
,
dt
,
curve_width
,
0
,
fill_curve
,
1
,
0
,
dt_fill
);
curve_width
,
0
,
fill_curve
,
1
,
0
,
dt_fill
,
0
,
1
,
1
);
ctx
->
nodraw
--
;
}
free
(
(
char
*
)
pointarray
);
...
...
@@ -577,11 +575,15 @@ void GrowTrend::draw( GlowWind *w, GlowTransform *t, int highlight, int hot, voi
ctx
->
gdraw
->
line
(
w
,
x
,
y
,
x
+
width
,
y
,
drawtype
,
0
,
0
);
}
if
(
fill_curve
)
if
(
border
)
ctx
->
gdraw
->
rect
(
w
,
ll_x
,
ll_y
,
ur_x
-
ll_x
,
ur_y
-
ll_y
,
drawtype
,
idx
,
0
);
if
(
fill_curve
)
{
for
(
i
=
0
;
i
<
curve_cnt
;
i
++
)
{
if
(
curve
[
i
])
curve
[
i
]
->
fill
=
0
;
}
}
if
(
t
)
{
GlowTransform
tmp
=
*
t
*
trf
;
for
(
i
=
0
;
i
<
curve_cnt
;
i
++
)
{
...
...
@@ -596,15 +598,15 @@ void GrowTrend::draw( GlowWind *w, GlowTransform *t, int highlight, int hot, voi
}
}
if
(
fill_curve
)
if
(
fill_curve
)
{
ctx
->
gdraw
->
line
(
w
,
ll_x
,
ll_y
,
ll_x
,
ur_y
,
drawtype
,
idx
,
0
);
ctx
->
gdraw
->
line
(
w
,
ur_x
,
ll_y
,
ur_x
,
ur_y
,
drawtype
,
idx
,
0
);
for
(
i
=
0
;
i
<
curve_cnt
;
i
++
)
{
if
(
curve
[
i
])
curve
[
i
]
->
fill
=
1
;
}
if
(
border
)
{
ctx
->
gdraw
->
rect
(
w
,
ll_x
,
ll_y
,
ur_x
-
ll_x
,
ur_y
-
ll_y
,
drawtype
,
idx
,
0
);
}
}
//! Erase the object.
...
...
@@ -805,6 +807,15 @@ void GrowTrend::get_trace_attr( GlowTraceData **attr)
*
attr
=
&
trace
;
}
//! Set no of curves
/*!
\param no_of_curves Number of curves.
*/
void
GrowTrend
::
set_no_of_curves
(
int
no_of_curves
)
{
curve_cnt
=
no_of_curves
;
configure_curves
();
}
//! Set scantime
/*!
\param time Scantime in seconds.
...
...
@@ -1003,7 +1014,7 @@ void GrowTrend::set_data( double *data[3], int data_curves, int data_points)
ctx
->
nodraw
++
;
curve
[
j
]
=
new
GrowPolyLine
(
ctx
,
""
,
pointarray
,
cpoints
,
dt
,
curve_width
,
0
,
fill_curve
,
1
,
0
,
dt_fill
);
0
,
fill_curve
,
1
,
0
,
dt_fill
,
0
,
1
,
1
);
ctx
->
nodraw
--
;
}
free
(
(
char
*
)
pointarray
);
...
...
xtt/lib/glow/src/glow_growtrend.h
View file @
33f599a6
...
...
@@ -134,6 +134,7 @@ class GrowTrend : public GrowRect {
void
align
(
double
x
,
double
y
,
glow_eAlignDirection
direction
);
void
set_no_of_curves
(
int
no_of_curves
);
void
set_scan_time
(
double
time
);
//! Get scantime
...
...
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