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
5964a7aa
Commit
5964a7aa
authored
Jun 15, 2012
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Java piechart and barchart implemented
parent
39bfb511
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1312 additions
and
34 deletions
+1312
-34
java/jpwr/jop/src/JopBarChart.java
java/jpwr/jop/src/JopBarChart.java
+445
-0
java/jpwr/jop/src/JopPie.java
java/jpwr/jop/src/JopPie.java
+497
-0
java/jpwr/jop/src/os_templ/hw_templ/makefile
java/jpwr/jop/src/os_templ/hw_templ/makefile
+2
-0
xtt/lib/ge/src/ge_graph.h
xtt/lib/ge/src/ge_graph.h
+16
-0
xtt/lib/ge/src/ge_graph_javabean.cpp
xtt/lib/ge/src/ge_graph_javabean.cpp
+86
-22
xtt/lib/glow/src/glow_exportjbean.cpp
xtt/lib/glow/src/glow_exportjbean.cpp
+197
-0
xtt/lib/glow/src/glow_exportjbean.h
xtt/lib/glow/src/glow_exportjbean.h
+32
-0
xtt/lib/glow/src/glow_growbarchart.cpp
xtt/lib/glow/src/glow_growbarchart.cpp
+19
-6
xtt/lib/glow/src/glow_growpie.cpp
xtt/lib/glow/src/glow_growpie.cpp
+18
-6
No files found.
java/jpwr/jop/src/JopBarChart.java
0 → 100644
View file @
5964a7aa
This diff is collapsed.
Click to expand it.
java/jpwr/jop/src/JopPie.java
0 → 100644
View file @
5964a7aa
This diff is collapsed.
Click to expand it.
java/jpwr/jop/src/os_templ/hw_templ/makefile
View file @
5964a7aa
...
...
@@ -34,6 +34,8 @@ local_java_sources := \
JopTrend.java
\
JopAxis.java
\
JopAxisarc.java
\
JopPie.java
\
JopBarChart.java
\
GeTable.java
\
GeDynElem.java
\
GeDynDigLowColor.java
\
...
...
xtt/lib/ge/src/ge_graph.h
View file @
5964a7aa
...
...
@@ -1082,6 +1082,22 @@ class Graph {
*/
int
export_TrendTraceAttr
(
ofstream
&
fp
,
grow_tObject
object
,
int
cnt
);
//! Export java code for dynamics of a pie object.
/*!
\param fp Output file.
\param object Object.
\param cnt Index for javabean name.
*/
int
export_PieTraceAttr
(
ofstream
&
fp
,
grow_tObject
object
,
int
cnt
);
//! Export java code for dynamics of a barchart object.
/*!
\param fp Output file.
\param object Object.
\param cnt Index for javabean name.
*/
int
export_BarChartTraceAttr
(
ofstream
&
fp
,
grow_tObject
object
,
int
cnt
);
//! Export java code for dynamics of a table object.
/*!
\param fp Output file.
...
...
xtt/lib/ge/src/ge_graph_javabean.cpp
View file @
5964a7aa
...
...
@@ -1483,6 +1483,10 @@ int Graph::export_gejava_nodeclass( ofstream& fp, grow_tNodeClass nodeclass)
export_BarTraceAttr
(
fp
,
*
object_p
,
i
);
else
if
(
grow_GetObjectType
(
*
object_p
)
==
glow_eObjectType_GrowTrend
)
export_TrendTraceAttr
(
fp
,
*
object_p
,
i
);
else
if
(
grow_GetObjectType
(
*
object_p
)
==
glow_eObjectType_GrowPie
)
export_PieTraceAttr
(
fp
,
*
object_p
,
i
);
else
if
(
grow_GetObjectType
(
*
object_p
)
==
glow_eObjectType_GrowBarChart
)
export_BarChartTraceAttr
(
fp
,
*
object_p
,
i
);
else
if
(
grow_GetObjectType
(
*
object_p
)
==
glow_eObjectType_GrowTable
)
export_TableTraceAttr
(
fp
,
*
object_p
,
i
);
else
if
(
grow_GetObjectType
(
*
object_p
)
==
glow_eObjectType_GrowSlider
)
...
...
@@ -1627,6 +1631,10 @@ int Graph::export_javaframe( char *filename, char *bean_name, int applet,
export_BarTraceAttr
(
fp
,
*
object_p
,
i
);
else
if
(
grow_GetObjectType
(
*
object_p
)
==
glow_eObjectType_GrowTrend
)
export_TrendTraceAttr
(
fp
,
*
object_p
,
i
);
else
if
(
grow_GetObjectType
(
*
object_p
)
==
glow_eObjectType_GrowPie
)
export_PieTraceAttr
(
fp
,
*
object_p
,
i
);
else
if
(
grow_GetObjectType
(
*
object_p
)
==
glow_eObjectType_GrowBarChart
)
export_BarChartTraceAttr
(
fp
,
*
object_p
,
i
);
else
if
(
grow_GetObjectType
(
*
object_p
)
==
glow_eObjectType_GrowTable
)
export_TableTraceAttr
(
fp
,
*
object_p
,
i
);
else
if
(
grow_GetObjectType
(
*
object_p
)
==
glow_eObjectType_GrowSlider
)
...
...
@@ -1882,6 +1890,10 @@ int Graph::export_gejava( char *filename, char *bean_name, int applet, int html)
export_BarTraceAttr
(
fp
,
*
object_p
,
i
);
else
if
(
grow_GetObjectType
(
*
object_p
)
==
glow_eObjectType_GrowTrend
)
export_TrendTraceAttr
(
fp
,
*
object_p
,
i
);
else
if
(
grow_GetObjectType
(
*
object_p
)
==
glow_eObjectType_GrowPie
)
export_PieTraceAttr
(
fp
,
*
object_p
,
i
);
else
if
(
grow_GetObjectType
(
*
object_p
)
==
glow_eObjectType_GrowBarChart
)
export_BarChartTraceAttr
(
fp
,
*
object_p
,
i
);
else
if
(
grow_GetObjectType
(
*
object_p
)
==
glow_eObjectType_GrowTable
)
export_TableTraceAttr
(
fp
,
*
object_p
,
i
);
else
if
(
grow_GetObjectType
(
*
object_p
)
==
glow_eObjectType_GrowSlider
)
...
...
@@ -2284,19 +2296,6 @@ int Graph::export_BarTraceAttr( ofstream& fp, grow_tObject object, int cnt)
dyn
->
export_java
(
object
,
fp
,
var_name
);
}
#if 0
grow_GetTraceAttr( object, &trace_data);
strcpy( var_name, class_name);
var_name[0] = _tolower(var_name[0]);
sprintf( &var_name[strlen(var_name)], "%d", cnt);
if ( strcmp( trace_data->data[0], "") != 0)
{
fp <<
" " << var_name << ".setPwrAttribute(\"" << trace_data->data[0] << "\");" << endl;
}
#endif
return
1
;
}
...
...
@@ -2344,24 +2343,87 @@ int Graph::export_TrendTraceAttr( ofstream& fp, grow_tObject object, int cnt)
dyn
->
export_java
(
object
,
fp
,
var_name
);
}
return
1
;
}
#if 0
grow_GetTraceAttr( object, &trace_data);
int
Graph
::
export_PieTraceAttr
(
ofstream
&
fp
,
grow_tObject
object
,
int
cnt
)
{
GeDyn
*
dyn
;
char
class_name
[]
=
"JopPie"
;
char
var_name
[
40
];
grow_GetUserData
(
object
,
(
void
**
)
&
dyn
);
strcpy
(
var_name
,
class_name
);
var_name
[
0
]
=
_tolower
(
var_name
[
0
]);
sprintf
(
&
var_name
[
strlen
(
var_name
)],
"%d"
,
cnt
);
if ( strcmp( trace_data->data[0], "") != 0)
{
if ( strcmp( trace_data->data[0], "") != 0)
for
(
GeDynElem
*
elem
=
dyn
->
elements
;
elem
;
elem
=
elem
->
next
)
{
if
(
elem
->
dyn_type
==
ge_mDynType_Pie
)
{
fp
<<
" " << var_name << ".setPwrAttribute1(\"" << trace_data->data[0] << "\");" << endl;
if ( strcmp( trace_data->data[1], "") != 0)
" "
<<
var_name
<<
".setPwrAttribute(new String[]{"
;
for
(
int
i
=
0
;
i
<
PIE_MAX_SECTORS
;
i
++
)
{
if
(
strcmp
(
((
GePie
*
)
elem
)
->
attribute
[
i
],
""
)
!=
0
)
fp
<<
"
\"
"
<<
((
GePie
*
)
elem
)
->
attribute
[
i
]
<<
"
\"
"
;
else
fp
<<
"null"
;
if
(
i
!=
PIE_MAX_SECTORS
-
1
)
fp
<<
","
;
}
fp
<<
"});"
<<
endl
<<
" "
<<
var_name
<<
".setFixRange("
<<
((
GePie
*
)
elem
)
->
fix_range
<<
");"
<<
endl
;
}
break
;
}
if
(
dyn
->
total_action_type
&
~
ge_mActionType_Inherit
)
{
fp
<<
" "
<<
var_name
<<
".dd.setActionType("
<<
(
int
)
dyn
->
total_action_type
<<
");"
<<
endl
<<
" "
<<
var_name
<<
".dd.setAccess("
<<
(
int
)
dyn
->
access
<<
");"
<<
endl
;
dyn
->
export_java
(
object
,
fp
,
var_name
);
}
return
1
;
}
int
Graph
::
export_BarChartTraceAttr
(
ofstream
&
fp
,
grow_tObject
object
,
int
cnt
)
{
GeDyn
*
dyn
;
char
class_name
[]
=
"JopBarChart"
;
char
var_name
[
40
];
grow_GetUserData
(
object
,
(
void
**
)
&
dyn
);
strcpy
(
var_name
,
class_name
);
var_name
[
0
]
=
_tolower
(
var_name
[
0
]);
sprintf
(
&
var_name
[
strlen
(
var_name
)],
"%d"
,
cnt
);
for
(
GeDynElem
*
elem
=
dyn
->
elements
;
elem
;
elem
=
elem
->
next
)
{
if
(
elem
->
dyn_type
==
ge_mDynType_BarChart
)
{
fp
<<
" " << var_name << ".setPwrAttribute2(\"" << trace_data->data[1] << "\");" << endl;
" "
<<
var_name
<<
".setPwrAttribute(new String[]{"
;
for
(
int
i
=
0
;
i
<
BARCHART_MAX_BARSEGMENTS
;
i
++
)
{
if
(
strcmp
(
((
GeBarChart
*
)
elem
)
->
attribute
[
i
],
""
)
!=
0
)
fp
<<
"
\"
"
<<
((
GeBarChart
*
)
elem
)
->
attribute
[
i
]
<<
"
\"
"
;
else
fp
<<
"null"
;
if
(
i
!=
BARCHART_MAX_BARSEGMENTS
-
1
)
fp
<<
","
;
}
fp
<<
"});"
<<
endl
;
}
break
;
}
#endif
if
(
dyn
->
total_action_type
&
~
ge_mActionType_Inherit
)
{
fp
<<
" "
<<
var_name
<<
".dd.setActionType("
<<
(
int
)
dyn
->
total_action_type
<<
");"
<<
endl
<<
" "
<<
var_name
<<
".dd.setAccess("
<<
(
int
)
dyn
->
access
<<
");"
<<
endl
;
dyn
->
export_java
(
object
,
fp
,
var_name
);
}
return
1
;
}
...
...
@@ -2399,6 +2461,8 @@ int Graph::export_ObjectTraceAttr( ofstream& fp, grow_tObject object, int cnt) {
int
Graph
::
export_GejavaObjectTraceAttr
(
ofstream
&
fp
,
grow_tObject
object
,
int
cnt
)
{
return
1
;}
int
Graph
::
export_BarTraceAttr
(
ofstream
&
fp
,
grow_tObject
object
,
int
cnt
){
return
1
;}
int
Graph
::
export_TrendTraceAttr
(
ofstream
&
fp
,
grow_tObject
object
,
int
cnt
)
{
return
1
;}
int
Graph
::
export_PieTraceAttr
(
ofstream
&
fp
,
grow_tObject
object
,
int
cnt
){
return
1
;}
int
Graph
::
export_BarChartTraceAttr
(
ofstream
&
fp
,
grow_tObject
object
,
int
cnt
){
return
1
;}
int
Graph
::
export_TableTraceAttr
(
ofstream
&
fp
,
grow_tObject
object
,
int
cnt
)
{
return
1
;}
int
Graph
::
export_SliderTraceAttr
(
ofstream
&
fp
,
grow_tObject
object
,
int
cnt
)
{
return
1
;}
...
...
xtt/lib/glow/src/glow_exportjbean.cpp
View file @
5964a7aa
...
...
@@ -45,6 +45,8 @@
#include "glow_growctx.h"
#include "glow_grownode.h"
#include "glow_exportjbean.h"
#include "glow_growpie.h"
#include "glow_growbarchart.h"
#define glow_cJBean_Offset 2
#define glow_cJBean_SizeCorr 2
...
...
@@ -3892,6 +3894,201 @@ void GlowExportJBean::axisarc( double x1, double y1, double x2, double y2,
}
}
void
GlowExportJBean
::
pie
(
double
x1
,
double
y1
,
double
x2
,
double
y2
,
int
angle1
,
int
angle2
,
glow_eDrawType
border_drawtype
,
glow_eDrawType
fill_drawtype
,
int
fill
,
int
border
,
int
sectors
,
glow_eDrawType
*
sector_colors
,
double
min_value
,
double
max_value
,
int
line_width
,
double
rotate
,
double
shadow_width
,
int
shadow
,
glow_eGradient
gradient
,
int
gc1
,
int
gc2
,
glow_eExportPass
pass
,
int
*
shape_cnt
,
int
node_cnt
,
ofstream
&
fp
)
{
double
dim_x0
,
dim_x1
,
dim_y0
,
dim_y1
;
char
var_name
[
40
];
char
class_name
[]
=
"JopPie"
;
strcpy
(
var_name
,
class_name
);
var_name
[
0
]
=
_tolower
(
var_name
[
0
]);
sprintf
(
&
var_name
[
strlen
(
var_name
)],
"%d"
,
node_cnt
);
switch
(
pass
)
{
case
glow_eExportPass_Shape
:
break
;
case
glow_eExportPass_Declare
:
{
fp
<<
" "
<<
class_name
<<
" "
<<
var_name
<<
";"
<<
endl
;
break
;
}
case
glow_eExportPass_Attributes
:
{
((
GrowCtx
*
)
ctx
)
->
measure_javabean
(
&
dim_x1
,
&
dim_x0
,
&
dim_y1
,
&
dim_y0
);
fp
<<
" "
<<
var_name
<<
" = new "
<<
class_name
<<
"(session);"
<<
endl
<<
" "
<<
var_name
<<
".setBounds(new Rectangle("
<<
(
int
)(
x1
-
dim_x0
+
glow_cJBean_Offset
)
<<
","
<<
(
int
)(
y1
-
dim_y0
+
glow_cJBean_Offset
)
<<
","
<<
(
int
)(
x2
-
x1
)
<<
","
<<
(
int
)(
y2
-
y1
)
<<
"));"
<<
" "
<<
var_name
<<
".setAngle1("
<<
angle1
<<
"F);"
<<
endl
<<
" "
<<
var_name
<<
".setAngle2("
<<
angle2
<<
"F);"
<<
endl
;
if
(
fill_drawtype
!=
glow_eDrawType_No
)
fp
<<
" "
<<
var_name
<<
".setFillColor("
<<
(
int
)
fill_drawtype
<<
");"
<<
endl
;
if
(
border_drawtype
!=
glow_eDrawType_No
)
fp
<<
" "
<<
var_name
<<
".setBorderColor("
<<
(
int
)
border_drawtype
<<
");"
<<
endl
;
else
fp
<<
" "
<<
var_name
<<
".setBorderColor( 0);"
<<
endl
;
if
(
fill
)
fp
<<
" "
<<
var_name
<<
".setDrawFill(1);"
<<
endl
;
if
(
border
)
fp
<<
" "
<<
var_name
<<
".setDrawBorder(1);"
<<
endl
;
fp
<<
" "
<<
var_name
<<
".setSectors("
<<
sectors
<<
");"
<<
endl
<<
" "
<<
var_name
<<
".setSectorColors(new int[] {"
;
for
(
int
i
=
0
;
i
<
PIE_MAX_SECTORS
;
i
++
)
{
fp
<<
sector_colors
[
i
];
if
(
i
!=
PIE_MAX_SECTORS
-
1
)
fp
<<
","
;
}
fp
<<
"});"
<<
endl
;
fp
<<
" "
<<
var_name
<<
".setLineWidth("
<<
line_width
<<
");"
<<
endl
<<
" "
<<
var_name
<<
".setMinValue("
<<
min_value
<<
"F);"
<<
endl
<<
" "
<<
var_name
<<
".setMaxValue("
<<
max_value
<<
"F);"
<<
endl
<<
" "
<<
var_name
<<
".setRotate("
<<
rotate
<<
");"
<<
endl
<<
" "
<<
var_name
<<
".setShadow("
<<
shadow
<<
");"
<<
endl
<<
" "
<<
var_name
<<
".setShadowWidth("
<<
shadow_width
<<
");"
<<
endl
<<
" "
<<
var_name
<<
".setGradient("
<<
(
int
)
gradient
<<
");"
<<
endl
<<
" "
<<
var_name
<<
".setGc1("
<<
gc1
<<
");"
<<
endl
<<
" "
<<
var_name
<<
".setGc2("
<<
gc2
<<
");"
<<
endl
;
if
(
is_nodeclass
)
fp
<<
" add("
<<
var_name
<<
");"
<<
endl
;
else
fp
<<
" localPanel.add("
<<
var_name
<<
", new Proportion("
<<
var_name
<<
".getBounds(), dsize));"
<<
endl
;
break
;
}
case
glow_eExportPass_Draw
:
break
;
default:
;
}
}
void
GlowExportJBean
::
barchart
(
double
x1
,
double
y1
,
double
x2
,
double
y2
,
glow_eDrawType
border_drawtype
,
glow_eDrawType
fill_drawtype
,
int
fill
,
int
border
,
int
bars
,
int
barsegments
,
glow_eDrawType
*
bar_colors
,
double
min_value
,
double
max_value
,
int
line_width
,
double
rotate
,
double
shadow_width
,
int
shadow
,
glow_eGradient
gradient
,
int
gc1
,
int
gc2
,
int
vertical_lines
,
int
horizontal_lines
,
glow_eDrawType
line_color
,
glow_eExportPass
pass
,
int
*
shape_cnt
,
int
node_cnt
,
ofstream
&
fp
)
{
double
dim_x0
,
dim_x1
,
dim_y0
,
dim_y1
;
char
var_name
[
40
];
char
class_name
[]
=
"JopBarChart"
;
strcpy
(
var_name
,
class_name
);
var_name
[
0
]
=
_tolower
(
var_name
[
0
]);
sprintf
(
&
var_name
[
strlen
(
var_name
)],
"%d"
,
node_cnt
);
switch
(
pass
)
{
case
glow_eExportPass_Shape
:
break
;
case
glow_eExportPass_Declare
:
{
fp
<<
" "
<<
class_name
<<
" "
<<
var_name
<<
";"
<<
endl
;
break
;
}
case
glow_eExportPass_Attributes
:
{
((
GrowCtx
*
)
ctx
)
->
measure_javabean
(
&
dim_x1
,
&
dim_x0
,
&
dim_y1
,
&
dim_y0
);
fp
<<
" "
<<
var_name
<<
" = new "
<<
class_name
<<
"(session);"
<<
endl
<<
" "
<<
var_name
<<
".setBounds(new Rectangle("
<<
(
int
)(
x1
-
dim_x0
+
glow_cJBean_Offset
)
<<
","
<<
(
int
)(
y1
-
dim_y0
+
glow_cJBean_Offset
)
<<
","
<<
(
int
)(
x2
-
x1
)
<<
","
<<
(
int
)(
y2
-
y1
)
<<
"));"
<<
endl
;
if
(
fill_drawtype
!=
glow_eDrawType_No
)
fp
<<
" "
<<
var_name
<<
".setFillColor("
<<
(
int
)
fill_drawtype
<<
");"
<<
endl
;
if
(
border_drawtype
!=
glow_eDrawType_No
)
fp
<<
" "
<<
var_name
<<
".setBorderColor("
<<
(
int
)
border_drawtype
<<
");"
<<
endl
;
else
fp
<<
" "
<<
var_name
<<
".setBorderColor( 0);"
<<
endl
;
if
(
fill
)
fp
<<
" "
<<
var_name
<<
".setDrawFill(1);"
<<
endl
;
if
(
border
)
fp
<<
" "
<<
var_name
<<
".setDrawBorder(1);"
<<
endl
;
fp
<<
" "
<<
var_name
<<
".setBars("
<<
bars
<<
");"
<<
endl
<<
" "
<<
var_name
<<
".setBarSegments("
<<
barsegments
<<
");"
<<
endl
<<
" "
<<
var_name
<<
".setBarColors(new int[] {"
;
for
(
int
i
=
0
;
i
<
BARCHART_MAX_BARSEGMENTS
;
i
++
)
{
fp
<<
bar_colors
[
i
];
if
(
i
!=
BARCHART_MAX_BARSEGMENTS
-
1
)
fp
<<
","
;
}
fp
<<
"});"
<<
endl
;
fp
<<
" "
<<
var_name
<<
".setLineWidth("
<<
line_width
<<
");"
<<
endl
<<
" "
<<
var_name
<<
".setMinValue("
<<
min_value
<<
"F);"
<<
endl
<<
" "
<<
var_name
<<
".setMaxValue("
<<
max_value
<<
"F);"
<<
endl
<<
" "
<<
var_name
<<
".setRotate("
<<
rotate
<<
");"
<<
endl
<<
" "
<<
var_name
<<
".setShadow("
<<
shadow
<<
");"
<<
endl
<<
" "
<<
var_name
<<
".setShadowWidth("
<<
shadow_width
<<
");"
<<
endl
<<
" "
<<
var_name
<<
".setGradient("
<<
(
int
)
gradient
<<
");"
<<
endl
<<
" "
<<
var_name
<<
".setGc1("
<<
gc1
<<
");"
<<
endl
<<
" "
<<
var_name
<<
".setGc2("
<<
gc2
<<
");"
<<
endl
<<
" "
<<
var_name
<<
".setVerticalLines("
<<
vertical_lines
<<
");"
<<
endl
<<
" "
<<
var_name
<<
".setHorizontalLines("
<<
horizontal_lines
<<
");"
<<
endl
<<
" "
<<
var_name
<<
".setLineColor("
<<
(
int
)
line_color
<<
");"
<<
endl
;
if
(
is_nodeclass
)
fp
<<
" add("
<<
var_name
<<
");"
<<
endl
;
else
fp
<<
" localPanel.add("
<<
var_name
<<
", new Proportion("
<<
var_name
<<
".getBounds(), dsize));"
<<
endl
;
break
;
}
case
glow_eExportPass_Draw
:
break
;
default:
;
}
}
void
GlowExportJBean
::
window
(
double
x1
,
double
y1
,
double
x2
,
double
y2
,
char
*
filename
,
int
vertical_scrollbar
,
int
horizontal_scrollbar
,
char
*
owner
,
...
...
xtt/lib/glow/src/glow_exportjbean.h
View file @
5964a7aa
...
...
@@ -194,6 +194,38 @@ class GlowExportJBean {
int
text_idx
,
char
*
format
,
glow_eExportPass
pass
,
int
*
shape_cnt
,
int
node_cnt
,
ofstream
&
fp
);
void
pie
(
double
x1
,
double
y1
,
double
x2
,
double
y2
,
int
angle1
,
int
angle2
,
glow_eDrawType
border_drawtype
,
glow_eDrawType
fill_drawtype
,
int
fill
,
int
border
,
int
sectors
,
glow_eDrawType
*
sector_color
,
double
min_value
,
double
max_value
,
int
line_width
,
double
rotate
,
double
shadow_width
,
int
shadow
,
glow_eGradient
gradient
,
int
gc1
,
int
gc2
,
glow_eExportPass
pass
,
int
*
shape_cnt
,
int
node_cnt
,
ofstream
&
fp
);
void
barchart
(
double
x1
,
double
y1
,
double
x2
,
double
y2
,
glow_eDrawType
border_drawtype
,
glow_eDrawType
fill_drawtype
,
int
fill
,
int
border
,
int
bars
,
int
barsegments
,
glow_eDrawType
*
bar_color
,
double
min_value
,
double
max_value
,
int
line_width
,
double
rotate
,
double
shadow_width
,
int
shadow
,
glow_eGradient
gradient
,
int
gc1
,
int
gc2
,
int
vertical_lines
,
int
horizontal_lines
,
glow_eDrawType
line_color
,
glow_eExportPass
pass
,
int
*
shape_cnt
,
int
node_cnt
,
ofstream
&
fp
);
void
window
(
double
x1
,
double
y1
,
double
x2
,
double
y2
,
char
*
filename
,
int
vertical_scrollbar
,
...
...
xtt/lib/glow/src/glow_growbarchart.cpp
View file @
5964a7aa
...
...
@@ -551,6 +551,8 @@ void GrowBarChart::export_javabean( GlowTransform *t, void *node,
{
double
x1
,
y1
,
x2
,
y2
,
ll_x
,
ll_y
,
ur_x
,
ur_y
;
double
rotation
;
double
ish
;
int
gc1
,
gc2
;
if
(
!
t
)
{
...
...
@@ -577,12 +579,23 @@ void GrowBarChart::export_javabean( GlowTransform *t, void *node,
else
rotation
=
(
trf
.
rot
()
/
360
-
floor
(
trf
.
rot
()
/
360
))
*
360
;
#if 0
((GrowCtx *)ctx)->export_jbean->barchart( ll_x, ll_y, ur_x, ur_y, angle1, angle2,
draw_type, text_color_drawtype, min_value, max_value, lines, longquotient, valuequotient,
linelength, line_width, rotation, bold, idx, format,
pass, shape_cnt, node_cnt, fp);
#endif
ish
=
shadow_width
/
100
*
min
(
ur_x
-
ll_x
,
ur_y
-
ll_y
);
if
(
gradient_contrast
>=
0
)
{
gc1
=
gradient_contrast
/
2
;
gc2
=
-
int
(
float
(
gradient_contrast
)
/
2
+
0.6
);
}
else
{
gc1
=
int
(
float
(
gradient_contrast
)
/
2
-
0.6
);
gc2
=
-
gradient_contrast
/
2
;
}
ctx
->
export_jbean
->
barchart
(
ll_x
,
ll_y
,
ur_x
,
ur_y
,
draw_type
,
fill_drawtype
,
fill
,
border
,
bars
,
barsegments
,
bar_color
,
min_value
,
max_value
,
line_width
,
rotation
,
ish
,
shadow
,
gradient
,
gc1
,
gc2
,
vertical_lines
,
horizontal_lines
,
line_color
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
}
void
GrowBarChart
::
set_conf
(
int
bar_num
,
int
barsegment_num
,
double
min_val
,
double
max_val
,
...
...
xtt/lib/glow/src/glow_growpie.cpp
View file @
5964a7aa
...
...
@@ -523,6 +523,8 @@ void GrowPie::export_javabean( GlowTransform *t, void *node,
{
double
x1
,
y1
,
x2
,
y2
,
ll_x
,
ll_y
,
ur_x
,
ur_y
;
double
rotation
;
double
ish
;
int
gc1
,
gc2
;
if
(
!
t
)
{
...
...
@@ -549,12 +551,22 @@ void GrowPie::export_javabean( GlowTransform *t, void *node,
else
rotation
=
(
trf
.
rot
()
/
360
-
floor
(
trf
.
rot
()
/
360
))
*
360
;
#if 0
((GrowCtx *)ctx)->export_jbean->pie( ll_x, ll_y, ur_x, ur_y, angle1, angle2,
draw_type, text_color_drawtype, min_value, max_value, lines, longquotient, valuequotient,
linelength, line_width, rotation, bold, idx, format,
pass, shape_cnt, node_cnt, fp);
#endif
ish
=
shadow_width
/
100
*
min
(
ur_x
-
ll_x
,
ur_y
-
ll_y
);
if
(
gradient_contrast
>=
0
)
{
gc1
=
gradient_contrast
/
2
;
gc2
=
-
int
(
float
(
gradient_contrast
)
/
2
+
0.6
);
}
else
{
gc1
=
int
(
float
(
gradient_contrast
)
/
2
-
0.6
);
gc2
=
-
gradient_contrast
/
2
;
}
ctx
->
export_jbean
->
pie
(
ll_x
,
ll_y
,
ur_x
,
ur_y
,
angle1
,
angle2
,
draw_type
,
fill_drawtype
,
fill
,
border
,
sectors
,
sector_color
,
min_value
,
max_value
,
line_width
,
rotation
,
ish
,
shadow
,
gradient
,
gc1
,
gc2
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
}
void
GrowPie
::
set_conf
(
int
sector_num
,
double
min_val
,
double
max_val
,
glow_eDrawType
*
color
)
...
...
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