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
a92df731
Commit
a92df731
authored
May 20, 2010
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ge export java, gradients implemented
parent
4bb49624
Changes
15
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
2711 additions
and
568 deletions
+2711
-568
java/jpwr/jop/src/GeColor.java
java/jpwr/jop/src/GeColor.java
+5
-1
java/jpwr/jop/src/GeComponent.java
java/jpwr/jop/src/GeComponent.java
+4
-0
java/jpwr/jop/src/GeGradient.java
java/jpwr/jop/src/GeGradient.java
+239
-0
xtt/lib/ge/src/ge_graph.cpp
xtt/lib/ge/src/ge_graph.cpp
+1
-0
xtt/lib/ge/src/ge_graph_javabean.cpp
xtt/lib/ge/src/ge_graph_javabean.cpp
+4
-1
xtt/lib/glow/src/glow_arc.cpp
xtt/lib/glow/src/glow_arc.cpp
+29
-16
xtt/lib/glow/src/glow_exportjbean.cpp
xtt/lib/glow/src/glow_exportjbean.cpp
+2321
-500
xtt/lib/glow/src/glow_exportjbean.h
xtt/lib/glow/src/glow_exportjbean.h
+16
-8
xtt/lib/glow/src/glow_growarc.cpp
xtt/lib/glow/src/glow_growarc.cpp
+14
-2
xtt/lib/glow/src/glow_growconglue.cpp
xtt/lib/glow/src/glow_growconglue.cpp
+32
-32
xtt/lib/glow/src/glow_grownode.cpp
xtt/lib/glow/src/glow_grownode.cpp
+1
-1
xtt/lib/glow/src/glow_growpolyline.cpp
xtt/lib/glow/src/glow_growpolyline.cpp
+19
-3
xtt/lib/glow/src/glow_growrect.cpp
xtt/lib/glow/src/glow_growrect.cpp
+11
-1
xtt/lib/glow/src/glow_growrectrounded.cpp
xtt/lib/glow/src/glow_growrectrounded.cpp
+14
-2
xtt/lib/glow/src/glow_growslider.cpp
xtt/lib/glow/src/glow_growslider.cpp
+1
-1
No files found.
java/jpwr/jop/src/GeColor.java
View file @
a92df731
...
...
@@ -524,6 +524,10 @@ public class GeColor {
Rgb
rgb
;
Color
color
=
null
;
if
(
idx
==
300
)
// TODO, should be background color
idx
=
31
;
if
(
idx
<
4
)
color
=
new
Color
(
(
int
)(
colorValues
[
3
*
idx
]
*
255
),
(
int
)(
colorValues
[
3
*
idx
+
1
]
*
255
),
...
...
@@ -614,7 +618,7 @@ public class GeColor {
if
(
local_drawtype
==
300
)
{
// This should be background color TODO...
return
3
3
;
return
3
1
;
}
if
(
default_color
==
NO_COLOR
&&
color_tone
!=
NO_TONE
)
{
...
...
java/jpwr/jop/src/GeComponent.java
View file @
a92df731
...
...
@@ -182,6 +182,7 @@ public class GeComponent extends JComponent implements GeComponentIfc,
public
int
levelColorTone
=
0
;
public
int
levelFillColor
=
0
;
public
int
shadow
=
0
;
public
int
gradient
=
0
;
public
boolean
visible
=
true
;
public
boolean
dimmed
=
false
;
public
void
setColorTone
(
int
colorTone
)
{
...
...
@@ -236,6 +237,9 @@ public class GeComponent extends JComponent implements GeComponentIfc,
public
void
setShadow
(
int
shadow
)
{
this
.
shadow
=
shadow
;
}
public
void
setGradient
(
int
gradient
)
{
this
.
gradient
=
gradient
;
}
public
int
animationCount
=
1
;
public
int
page
=
1
;
public
int
pages
=
1
;
...
...
java/jpwr/jop/src/GeGradient.java
0 → 100644
View file @
a92df731
/*
* Proview $Id$
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package
jpwr.jop
;
import
jpwr.rt.*
;
import
java.awt.*
;
import
java.awt.geom.*
;
import
java.awt.event.*
;
public
class
GeGradient
{
public
static
final
int
eGradient_No
=
0
;
public
static
final
int
eGradient_HorizontalUp
=
1
;
public
static
final
int
eGradient_HorizontalDown
=
2
;
public
static
final
int
eGradient_HorizontalTube1
=
3
;
public
static
final
int
eGradient_HorizontalTube2
=
4
;
public
static
final
int
eGradient_VerticalLeft
=
5
;
public
static
final
int
eGradient_VerticalRight
=
6
;
public
static
final
int
eGradient_VerticalTube1
=
7
;
public
static
final
int
eGradient_VerticalTube2
=
8
;
public
static
final
int
eGradient_DiagonalUpperLeft
=
9
;
public
static
final
int
eGradient_DiagonalLowerLeft
=
10
;
public
static
final
int
eGradient_DiagonalUpperRight
=
11
;
public
static
final
int
eGradient_DiagonalLowerRight
=
12
;
public
static
final
int
eGradient_DiagonalUpTube
=
13
;
public
static
final
int
eGradient_DiagonalDownTube
=
14
;
public
static
final
int
eGradient_Globe
=
15
;
public
static
final
int
eGradient_RadialCenter
=
16
;
public
static
final
int
eGradient_RadialUpperLeft
=
17
;
public
static
final
int
eGradient_RadialLowerLeft
=
18
;
public
static
final
int
eGradient_RadialUpperRight
=
19
;
public
static
final
int
eGradient_RadialLowerRight
=
20
;
static
public
void
paint
(
Graphics2D
g
,
int
gradient
,
int
gradientContrast1
,
int
gradientContrast2
,
float
x
,
float
y
,
float
w
,
float
h
,
boolean
fixcolor
,
int
fillDrawtype
,
int
colorTone
,
int
colorShift
,
int
colorIntensity
,
int
colorInverse
,
int
fillColor
,
boolean
dimmed
)
{
float
gx0
=
0
;
float
gy0
=
0
;
float
gx1
=
0
;
float
gy1
=
0
;
float
gr
=
0
;
switch
(
gradient
)
{
case
eGradient_HorizontalUp:
gx0
=
x
;
gy0
=
y
;
gx1
=
x
;
gy1
=
y
+
h
;
break
;
case
eGradient_HorizontalDown:
gx0
=
x
;
gy0
=
y
+
h
;
gx1
=
x
;
gy1
=
y
;
break
;
case
eGradient_HorizontalTube1:
gx0
=
x
;
gy0
=
y
+
0.5
F
*
h
;
gx1
=
x
;
gy1
=
y
;
break
;
case
eGradient_HorizontalTube2:
gx0
=
x
;
gy0
=
y
+
0.3
F
*
h
;
gx1
=
x
;
gy1
=
y
+
h
;
break
;
case
eGradient_VerticalLeft:
gx0
=
x
;
gy0
=
y
;
gx1
=
x
+
w
;
gy1
=
y
;
break
;
case
eGradient_VerticalRight:
gx0
=
x
+
w
;
gy0
=
y
;
gx1
=
x
;
gy1
=
y
;
break
;
case
eGradient_VerticalTube1:
gx0
=
x
+
0.5
F
*
w
;
gy0
=
y
;
gx1
=
x
;
gy1
=
y
;
break
;
case
eGradient_VerticalTube2:
gx0
=
x
+
0.3
F
*
w
;
gy0
=
y
;
gx1
=
x
+
w
;
gy1
=
y
;
break
;
case
eGradient_DiagonalUpperLeft:
gx0
=
x
;
gy0
=
y
;
gx1
=
x
+
w
;
gy1
=
y
+
h
;
break
;
case
eGradient_DiagonalLowerLeft:
gx0
=
x
;
gy0
=
y
+
h
;
gx1
=
x
+
w
;
gy1
=
y
;
break
;
case
eGradient_DiagonalUpperRight:
gx0
=
x
+
w
;
gy0
=
y
;
gx1
=
x
;
gy1
=
y
+
h
;
break
;
case
eGradient_DiagonalLowerRight:
gx0
=
x
+
w
;
gy0
=
y
+
h
;
gx1
=
x
;
gy1
=
y
;
break
;
case
eGradient_DiagonalUpTube:
gx0
=
x
+
0.5
F
*
w
;
gy0
=
y
+
0.5
F
*
h
;
gx1
=
x
+
w
;
gy1
=
y
+
h
;
break
;
case
eGradient_DiagonalDownTube:
gx0
=
x
+
0.5
F
*
w
;
gy0
=
y
+
0.5
F
*
h
;
gx1
=
x
;
gy1
=
y
+
h
;
break
;
case
eGradient_Globe:
gx0
=
x
+
0.3
F
*
w
;
gy0
=
y
+
0.3
F
*
h
;
gx1
=
x
+
w
;
gy1
=
y
+
h
;
gr
=
(
float
)
Math
.
sqrt
(
w
*
w
/
4
+
h
*
h
/
4
);
break
;
case
eGradient_RadialCenter:
gx0
=
x
+
0.5
F
*
w
;
gy0
=
y
+
0.5
F
*
h
;
gx1
=
x
+
w
;
gy1
=
y
+
h
;
gr
=
(
float
)
Math
.
sqrt
(
w
*
w
/
4
F
+
h
*
h
/
4
F
);
break
;
case
eGradient_RadialUpperLeft:
gx0
=
x
;
gy0
=
y
;
gx1
=
x
+
w
;
gy1
=
y
+
h
;
gr
=
(
float
)
Math
.
sqrt
(
w
*
w
+
h
*
h
);
break
;
case
eGradient_RadialLowerLeft:
gx0
=
x
;
gy0
=
y
+
h
;
gx1
=
x
+
w
;
gy1
=
y
;
gr
=
(
float
)
Math
.
sqrt
(
w
*
w
+
h
*
h
);
break
;
case
eGradient_RadialUpperRight:
gx0
=
x
+
w
;
gy0
=
y
;
gx1
=
x
;
gy1
=
y
+
h
;
gr
=
(
float
)
Math
.
sqrt
(
w
*
w
+
h
*
h
);
break
;
case
eGradient_RadialLowerRight:
gx0
=
x
+
w
;
gy0
=
y
+
h
;
gx1
=
x
;
gy1
=
y
;
gr
=
(
float
)
Math
.
sqrt
(
w
*
w
+
h
*
h
);
break
;
default
:
;
}
switch
(
gradient
)
{
case
eGradient_HorizontalUp:
case
eGradient_HorizontalDown:
case
eGradient_HorizontalTube1:
case
eGradient_HorizontalTube2:
case
eGradient_VerticalLeft:
case
eGradient_VerticalRight:
case
eGradient_VerticalTube1:
case
eGradient_VerticalTube2:
case
eGradient_DiagonalUpperLeft:
case
eGradient_DiagonalLowerLeft:
case
eGradient_DiagonalUpperRight:
case
eGradient_DiagonalLowerRight:
case
eGradient_DiagonalUpTube:
case
eGradient_DiagonalDownTube:
if
(
fixcolor
)
{
GradientPaint
gp
=
new
GradientPaint
(
gx0
,
gy0
,
GeColor
.
getColor
(
fillDrawtype
,
GeColor
.
NO_TONE
,
0
,
0
,
gradientContrast2
,
colorInverse
,
GeColor
.
NO_COLOR
,
dimmed
),
gx1
,
gy1
,
GeColor
.
getColor
(
fillDrawtype
,
GeColor
.
NO_TONE
,
0
,
0
,
gradientContrast1
,
colorInverse
,
GeColor
.
NO_COLOR
,
dimmed
),
true
);
g
.
setPaint
(
gp
);
}
else
{
GradientPaint
gp
=
new
GradientPaint
(
gx0
,
gy0
,
GeColor
.
getColor
(
fillDrawtype
,
colorTone
,
colorShift
,
colorIntensity
,
gradientContrast2
,
colorInverse
,
fillColor
,
dimmed
),
gx1
,
gy1
,
GeColor
.
getColor
(
fillDrawtype
,
colorTone
,
colorShift
,
colorIntensity
,
gradientContrast1
,
colorInverse
,
fillColor
,
dimmed
),
true
);
g
.
setPaint
(
gp
);
}
break
;
case
eGradient_Globe:
case
eGradient_RadialCenter:
case
eGradient_RadialUpperLeft:
case
eGradient_RadialLowerLeft:
case
eGradient_RadialUpperRight:
case
eGradient_RadialLowerRight:
if
(
fixcolor
)
{
RadialGradientPaint
gp
=
new
RadialGradientPaint
(
new
Point2D
.
Float
(
gx0
,
gy0
),
gr
,
new
float
[]
{
0
F
,
1
F
},
new
Color
[]
{
GeColor
.
getColor
(
fillDrawtype
,
GeColor
.
NO_TONE
,
0
,
0
,
gradientContrast2
,
colorInverse
,
GeColor
.
NO_COLOR
,
dimmed
),
GeColor
.
getColor
(
fillDrawtype
,
GeColor
.
NO_TONE
,
0
,
0
,
gradientContrast1
,
colorInverse
,
GeColor
.
NO_COLOR
,
dimmed
)});
g
.
setPaint
(
gp
);
}
else
{
RadialGradientPaint
gp
=
new
RadialGradientPaint
(
new
Point2D
.
Float
(
gx0
,
gy0
),
gr
,
new
float
[]
{
0
F
,
1
F
},
new
Color
[]
{
GeColor
.
getColor
(
fillDrawtype
,
colorTone
,
colorShift
,
colorIntensity
,
gradientContrast2
,
colorInverse
,
fillColor
,
dimmed
),
GeColor
.
getColor
(
fillDrawtype
,
colorTone
,
colorShift
,
colorIntensity
,
gradientContrast1
,
colorInverse
,
fillColor
,
dimmed
)});
g
.
setPaint
(
gp
);
}
break
;
default
:
;
}
}
}
xtt/lib/ge/src/ge_graph.cpp
View file @
a92df731
...
...
@@ -178,6 +178,7 @@ Graph::Graph(
else
strcpy
(
object_name
,
""
);
strcpy
(
filename
,
""
);
strcpy
(
systemname
,
""
);
// Create journal file
if
(
mode
==
graph_eMode_Development
)
{
...
...
xtt/lib/ge/src/ge_graph_javabean.cpp
View file @
a92df731
...
...
@@ -1935,7 +1935,10 @@ int Graph::export_gejava( char *filename, char *bean_name, int applet, int html)
" return JopUtility.GRAPH;"
<<
endl
<<
" }"
<<
endl
<<
" public PwrtObjid getUtilityObjid() {"
<<
endl
<<
" if ( utilityAref != null)"
<<
endl
<<
" return utilityAref.getObjid();"
<<
endl
<<
" else"
<<
endl
<<
" return null;"
<<
endl
<<
" }"
<<
endl
<<
" public PwrtAttrRef getUtilityAttrRef() {"
<<
endl
<<
" return utilityAref;"
<<
endl
<<
...
...
xtt/lib/glow/src/glow_arc.cpp
View file @
a92df731
...
...
@@ -359,8 +359,8 @@ void GlowArc::export_javabean( GlowTransform *t, void *node,
ll
.
z_x
-
ctx
->
mw
.
offset_x
,
ll
.
z_y
-
ctx
->
mw
.
offset_y
,
ur
.
z_x
-
ll
.
z_x
,
ur
.
z_y
-
ll
.
z_y
,
angle1
,
angle2
,
fill
,
!
fill
,
draw_type
,
draw_type
,
idx
,
0.0
,
0
,
glow_eDrawType_No
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
fill
,
!
fill
,
draw_type
,
draw_type
,
idx
,
0.0
,
0
,
glow_eDrawType_No
,
0
,
glow_eGradient_No
,
0
,
0
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
}
void
GlowArc
::
export_javabean_shadow
(
GlowTransform
*
t
,
void
*
node
,
...
...
@@ -379,68 +379,81 @@ void GlowArc::export_javabean_shadow( GlowTransform *t, void *node,
ll
.
z_y
-
ctx
->
mw
.
offset_y
+
idx
/
2
-
idx
+
offs
,
ur
.
z_x
-
ll
.
z_x
+
idx
-
offs
*
2
,
ur
.
z_y
-
ll
.
z_y
+
idx
-
offs
*
2
,
angle1
+
45
,
angle2
-
45
,
0
,
1
,
glow_eDrawType_No
,
((
GrowCtx
*
)
ctx
)
->
shift_drawtype
(
draw_type
,
-
2
,
0
),
ish
-
1
,
0.0
,
0
,
glow_eDrawType_No
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
ish
-
1
,
0.0
,
0
,
glow_eDrawType_No
,
0
,
glow_eGradient_No
,
0
,
0
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
((
GrowCtx
*
)
ctx
)
->
export_jbean
->
arc
(
ll
.
z_x
-
ctx
->
mw
.
offset_x
+
idx
/
2
-
idx
+
offs
,
ll
.
z_y
-
ctx
->
mw
.
offset_y
+
idx
/
2
-
idx
+
offs
,
ur
.
z_x
-
ll
.
z_x
+
idx
-
offs
*
2
,
ur
.
z_y
-
ll
.
z_y
+
idx
-
offs
*
2
,
angle1
,
angle2
-
45
,
0
,
1
,
glow_eDrawType_No
,
((
GrowCtx
*
)
ctx
)
->
shift_drawtype
(
draw_type
,
2
,
0
),
ish
-
1
,
0.0
,
0
,
glow_eDrawType_No
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
0
,
1
,
glow_eDrawType_No
,
((
GrowCtx
*
)
ctx
)
->
shift_drawtype
(
draw_type
,
2
,
0
),
ish
-
1
,
0.0
,
0
,
glow_eDrawType_No
,
0
,
glow_eGradient_No
,
0
,
0
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
((
GrowCtx
*
)
ctx
)
->
export_jbean
->
arc
(
ll
.
z_x
-
ctx
->
mw
.
offset_x
+
idx
/
2
-
offs
,
ll
.
z_y
-
ctx
->
mw
.
offset_y
+
idx
/
2
-
offs
,
max
(
0
,
ur
.
z_x
-
ll
.
z_x
-
idx
+
offs
*
2
),
max
(
0
,
ur
.
z_y
-
ll
.
z_y
-
idx
+
offs
*
2
),
angle1
+
45
,
angle2
-
45
,
0
,
1
,
glow_eDrawType_No
,
((
GrowCtx
*
)
ctx
)
->
shift_drawtype
(
draw_type
,
2
,
0
),
ish
-
1
,
0.0
,
0
,
glow_eDrawType_No
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
0
,
1
,
glow_eDrawType_No
,
((
GrowCtx
*
)
ctx
)
->
shift_drawtype
(
draw_type
,
2
,
0
),
ish
-
1
,
0.0
,
0
,
glow_eDrawType_No
,
0
,
glow_eGradient_No
,
0
,
0
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
((
GrowCtx
*
)
ctx
)
->
export_jbean
->
arc
(
ll
.
z_x
-
ctx
->
mw
.
offset_x
+
idx
/
2
-
offs
,
ll
.
z_y
-
ctx
->
mw
.
offset_y
+
idx
/
2
-
offs
,
max
(
0
,
ur
.
z_x
-
ll
.
z_x
-
idx
+
offs
*
2
),
max
(
0
,
ur
.
z_y
-
ll
.
z_y
-
idx
+
offs
*
2
),
angle1
,
angle2
-
45
,
0
,
1
,
glow_eDrawType_No
,
((
GrowCtx
*
)
ctx
)
->
shift_drawtype
(
draw_type
,
-
2
,
0
),
ish
-
1
,
0.0
,
0
,
glow_eDrawType_No
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
0
,
1
,
glow_eDrawType_No
,
((
GrowCtx
*
)
ctx
)
->
shift_drawtype
(
draw_type
,
-
2
,
0
),
ish
-
1
,
0.0
,
0
,
glow_eDrawType_No
,
0
,
glow_eGradient_No
,
0
,
0
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
}
else
if
(
angle1
==
90
)
{
((
GrowCtx
*
)
ctx
)
->
export_jbean
->
arc
(
ll
.
z_x
-
ctx
->
mw
.
offset_x
+
idx
/
2
-
idx
+
offs
,
ll
.
z_y
-
ctx
->
mw
.
offset_y
+
idx
/
2
-
idx
+
offs
,
ur
.
z_x
-
ll
.
z_x
+
idx
-
offs
*
2
,
ur
.
z_y
-
ll
.
z_y
+
idx
-
offs
*
2
,
angle1
,
angle2
,
0
,
1
,
glow_eDrawType_No
,
((
GrowCtx
*
)
ctx
)
->
shift_drawtype
(
draw_type
,
-
2
,
0
),
ish
-
1
,
0.0
,
0
,
glow_eDrawType_No
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
0
,
1
,
glow_eDrawType_No
,
((
GrowCtx
*
)
ctx
)
->
shift_drawtype
(
draw_type
,
-
2
,
0
),
ish
-
1
,
0.0
,
0
,
glow_eDrawType_No
,
0
,
glow_eGradient_No
,
0
,
0
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
((
GrowCtx
*
)
ctx
)
->
export_jbean
->
arc
(
ll
.
z_x
-
ctx
->
mw
.
offset_x
+
idx
/
2
-
offs
,
ll
.
z_y
-
ctx
->
mw
.
offset_y
+
idx
/
2
-
offs
,
max
(
0
,
ur
.
z_x
-
ll
.
z_x
-
idx
+
offs
*
2
),
max
(
0
,
ur
.
z_y
-
ll
.
z_y
-
idx
+
offs
*
2
),
angle1
,
angle2
,
0
,
1
,
glow_eDrawType_No
,
((
GrowCtx
*
)
ctx
)
->
shift_drawtype
(
draw_type
,
2
,
0
),
ish
-
1
,
0.0
,
0
,
glow_eDrawType_No
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
0
,
1
,
glow_eDrawType_No
,
((
GrowCtx
*
)
ctx
)
->
shift_drawtype
(
draw_type
,
2
,
0
),
ish
-
1
,
0.0
,
0
,
glow_eDrawType_No
,
0
,
glow_eGradient_No
,
0
,
0
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
}
else
if
(
angle1
==
180
)
{
((
GrowCtx
*
)
ctx
)
->
export_jbean
->
arc
(
ll
.
z_x
-
ctx
->
mw
.
offset_x
+
idx
/
2
-
idx
+
offs
,
ll
.
z_y
-
ctx
->
mw
.
offset_y
+
idx
/
2
-
idx
+
offs
,
ur
.
z_x
-
ll
.
z_x
+
idx
-
offs
*
2
,
ur
.
z_y
-
ll
.
z_y
+
idx
-
offs
*
2
,
angle1
+
45
,
angle2
-
45
,
0
,
1
,
glow_eDrawType_No
,
((
GrowCtx
*
)
ctx
)
->
shift_drawtype
(
draw_type
,
2
,
0
),
ish
-
1
,
0.0
,
0
,
glow_eDrawType_No
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
0
,
1
,
glow_eDrawType_No
,
((
GrowCtx
*
)
ctx
)
->
shift_drawtype
(
draw_type
,
2
,
0
),
ish
-
1
,
0.0
,
0
,
glow_eDrawType_No
,
0
,
glow_eGradient_No
,
0
,
0
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
((
GrowCtx
*
)
ctx
)
->
export_jbean
->
arc
(
ll
.
z_x
-
ctx
->
mw
.
offset_x
+
idx
/
2
-
idx
+
offs
,
ll
.
z_y
-
ctx
->
mw
.
offset_y
+
idx
/
2
-
idx
+
offs
,
ur
.
z_x
-
ll
.
z_x
+
idx
-
offs
*
2
,
ur
.
z_y
-
ll
.
z_y
+
idx
-
offs
*
2
,
angle1
,
angle2
-
45
,
0
,
1
,
glow_eDrawType_No
,
((
GrowCtx
*
)
ctx
)
->
shift_drawtype
(
draw_type
,
-
2
,
0
),
ish
-
1
,
0.0
,
0
,
glow_eDrawType_No
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
0
,
1
,
glow_eDrawType_No
,
((
GrowCtx
*
)
ctx
)
->
shift_drawtype
(
draw_type
,
-
2
,
0
),
ish
-
1
,
0.0
,
0
,
glow_eDrawType_No
,
0
,
glow_eGradient_No
,
0
,
0
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
((
GrowCtx
*
)
ctx
)
->
export_jbean
->
arc
(
ll
.
z_x
-
ctx
->
mw
.
offset_x
+
idx
/
2
-
offs
,
ll
.
z_y
-
ctx
->
mw
.
offset_y
+
idx
/
2
-
offs
,
max
(
0
,
ur
.
z_x
-
ll
.
z_x
-
idx
+
offs
*
2
),
max
(
0
,
ur
.
z_y
-
ll
.
z_y
-
idx
+
offs
*
2
),
angle1
+
45
,
angle2
-
45
,
0
,
1
,
glow_eDrawType_No
,
((
GrowCtx
*
)
ctx
)
->
shift_drawtype
(
draw_type
,
-
2
,
0
),
ish
-
1
,
0.0
,
0
,
glow_eDrawType_No
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
0
,
1
,
glow_eDrawType_No
,
((
GrowCtx
*
)
ctx
)
->
shift_drawtype
(
draw_type
,
-
2
,
0
),
ish
-
1
,
0.0
,
0
,
glow_eDrawType_No
,
0
,
glow_eGradient_No
,
0
,
0
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
((
GrowCtx
*
)
ctx
)
->
export_jbean
->
arc
(
ll
.
z_x
-
ctx
->
mw
.
offset_x
+
idx
/
2
-
offs
,
ll
.
z_y
-
ctx
->
mw
.
offset_y
+
idx
/
2
-
offs
,
max
(
0
,
ur
.
z_x
-
ll
.
z_x
-
idx
+
offs
*
2
),
max
(
0
,
ur
.
z_y
-
ll
.
z_y
-
idx
+
offs
*
2
),
angle1
,
angle2
-
45
,
0
,
1
,
glow_eDrawType_No
,
((
GrowCtx
*
)
ctx
)
->
shift_drawtype
(
draw_type
,
2
,
0
),
ish
-
1
,
0.0
,
0
,
glow_eDrawType_No
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
0
,
1
,
glow_eDrawType_No
,
((
GrowCtx
*
)
ctx
)
->
shift_drawtype
(
draw_type
,
2
,
0
),
ish
-
1
,
0.0
,
0
,
glow_eDrawType_No
,
0
,
glow_eGradient_No
,
0
,
0
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
}
else
if
(
angle1
==
270
)
{
((
GrowCtx
*
)
ctx
)
->
export_jbean
->
arc
(
ll
.
z_x
-
ctx
->
mw
.
offset_x
+
idx
/
2
-
idx
+
offs
,
ll
.
z_y
-
ctx
->
mw
.
offset_y
+
idx
/
2
-
idx
+
offs
,
ur
.
z_x
-
ll
.
z_x
+
idx
-
offs
*
2
,
ur
.
z_y
-
ll
.
z_y
+
idx
-
offs
*
2
,
angle1
,
angle2
,
0
,
1
,
glow_eDrawType_No
,
((
GrowCtx
*
)
ctx
)
->
shift_drawtype
(
draw_type
,
2
,
0
),
ish
-
1
,
0.0
,
0
,
glow_eDrawType_No
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
0
,
1
,
glow_eDrawType_No
,
((
GrowCtx
*
)
ctx
)
->
shift_drawtype
(
draw_type
,
2
,
0
),
ish
-
1
,
0.0
,
0
,
glow_eDrawType_No
,
0
,
glow_eGradient_No
,
0
,
0
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
((
GrowCtx
*
)
ctx
)
->
export_jbean
->
arc
(
ll
.
z_x
-
ctx
->
mw
.
offset_x
+
idx
/
2
-
offs
,
ll
.
z_y
-
ctx
->
mw
.
offset_y
+
idx
/
2
-
offs
,
max
(
0
,
ur
.
z_x
-
ll
.
z_x
-
idx
+
offs
*
2
),
max
(
0
,
ur
.
z_y
-
ll
.
z_y
-
idx
+
offs
*
2
),
angle1
,
angle2
,
0
,
1
,
glow_eDrawType_No
,
((
GrowCtx
*
)
ctx
)
->
shift_drawtype
(
draw_type
,
-
2
,
0
),
ish
-
1
,
0.0
,
0
,
glow_eDrawType_No
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
0
,
1
,
glow_eDrawType_No
,
((
GrowCtx
*
)
ctx
)
->
shift_drawtype
(
draw_type
,
-
2
,
0
),
ish
-
1
,
0.0
,
0
,
glow_eDrawType_No
,
0
,
glow_eGradient_No
,
0
,
0
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
}
}
if
(
border
)
{
((
GrowCtx
*
)
ctx
)
->
export_jbean
->
arc
(
ll
.
z_x
-
ctx
->
mw
.
offset_x
+
idx
/
2
-
idx
,
ll
.
z_y
-
ctx
->
mw
.
offset_y
+
idx
/
2
-
idx
,
ur
.
z_x
-
ll
.
z_x
+
idx
,
ur
.
z_y
-
ll
.
z_y
+
idx
,
angle1
,
angle2
,
0
,
1
,
glow_eDrawType_No
,
glow_eDrawType_Line
,
0
,
0.0
,
0
,
glow_eDrawType_No
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
0
,
1
,
glow_eDrawType_No
,
glow_eDrawType_Line
,
0
,
0.0
,
0
,
glow_eDrawType_No
,
0
,
glow_eGradient_No
,
0
,
0
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
((
GrowCtx
*
)
ctx
)
->
export_jbean
->
arc
(
ll
.
z_x
-
ctx
->
mw
.
offset_x
+
idx
/
2
,
ll
.
z_y
-
ctx
->
mw
.
offset_y
+
idx
/
2
,
max
(
0
,
ur
.
z_x
-
ll
.
z_x
-
idx
),
max
(
0
,
ur
.
z_y
-
ll
.
z_y
-
idx
),
angle1
,
angle2
,
0
,
1
,
glow_eDrawType_No
,
glow_eDrawType_Line
,
0
,
0.0
,
0
,
glow_eDrawType_No
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
0
,
1
,
glow_eDrawType_No
,
glow_eDrawType_Line
,
0
,
0.0
,
0
,
glow_eDrawType_No
,
0
,
glow_eGradient_No
,
0
,
0
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
}
}
...
...
xtt/lib/glow/src/glow_exportjbean.cpp
View file @
a92df731
This source diff could not be displayed because it is too large. You can
view the blob
instead.
xtt/lib/glow/src/glow_exportjbean.h
View file @
a92df731
...
...
@@ -44,7 +44,8 @@ class GlowExportJBean {
glow_eDrawType
fill_drawtype
,
glow_eDrawType
border_drawtype
,
int
fill_eq_border
,
int
fill_eq_light
,
int
fill_eq_shadow
,
int
line_width
,
int
print_shadow
,
int
shadow
,
int
drawtype_incr
,
glow_sShadowInfo
*
sp
,
int
sp_num
,
glow_eExportPass
pass
,
int
*
shape_cnt
,
int
node_cnt
,
ofstream
&
fp
);
int
fixcolor
,
glow_eGradient
gradient
,
int
gc1
,
int
gc2
,
glow_eExportPass
pass
,
int
*
shape_cnt
,
int
node_cnt
,
ofstream
&
fp
);
void
line
(
double
x1
,
double
y1
,
double
x2
,
double
y2
,
glow_eDrawType
border_drawtype
,
int
line_width
,
glow_eExportPass
pass
,
int
*
shape_cnt
,
int
node_cnt
,
ofstream
&
fp
);
...
...
@@ -52,18 +53,20 @@ class GlowExportJBean {
int
fill
,
int
border
,
glow_eDrawType
fill_drawtype
,
glow_eDrawType
border_drawtype
,
int
line_width
,
double
shadow_width
,
int
shadow
,
int
drawtype_incr
,
glow_eExportPass
pass
,
int
*
shape_cnt
,
int
node_cnt
,
ofstream
&
fp
);
int
drawtype_incr
,
int
fixcolor
,
glow_eGradient
gradient
,
int
gc1
,
int
gc2
,
glow_eExportPass
pass
,
int
*
shape_cnt
,
int
node_cnt
,
ofstream
&
fp
);
void
rectrounded
(
double
x0
,
double
y0
,
double
width
,
double
height
,
int
fill
,
int
border
,
glow_eDrawType
fill_drawtype
,
glow_eDrawType
border_drawtype
,
int
line_width
,
double
roundamount
,
double
shadow_width
,
int
shadow
,
int
drawtype_incr
,
glow_e
ExportPass
pass
,
int
*
shape_cnt
,
int
node_cnt
,
ofstream
&
fp
);
int
drawtype_incr
,
glow_e
Gradient
gradient
,
int
gc1
,
int
gc2
,
glow_eExportPass
pass
,
int
*
shape_cnt
,
int
node_cnt
,
ofstream
&
fp
);
void
arc
(
double
x0
,
double
y0
,
double
width
,
double
height
,
double
angle1
,
double
angle2
,
int
fill
,
int
border
,
glow_eDrawType
fill_drawtype
,
glow_eDrawType
border_drawtype
,
int
line_width
,
double
shadow_width
,
int
shadow
,
int
drawtype_incr
,
glow_eExportPass
pass
,
int
*
shape_cnt
,
int
node_cnt
,
ofstream
&
fp
);
int
drawtype_incr
,
int
fixcolor
,
glow_eGradient
gradient
,
int
gc1
,
int
gc2
,
glow_eExportPass
pass
,
int
*
shape_cnt
,
int
node_cnt
,
ofstream
&
fp
);
void
text
(
int
x0
,
int
y0
,
char
*
text
,
glow_eDrawType
drawtype
,
glow_eDrawType
color_drawtype
,
int
bold
,
int
idx
,
glow_eExportPass
pass
,
int
*
shape_cnt
,
int
node_cnt
,
ofstream
&
fp
);
...
...
@@ -86,6 +89,7 @@ class GlowExportJBean {
int
line_width
,
double
rotate
,
int
shadow
,
glow_eGradient
gradient
,
glow_eExportPass
pass
,
int
*
shape_cnt
,
int
node_cnt
,
int
in_nc
,
ofstream
&
fp
);
void
image
(
double
x1
,
double
y1
,
double
x2
,
double
y2
,
char
*
filename
,
int
transparent
,
...
...
@@ -185,7 +189,11 @@ class GlowExportJBean {
int
line_width
,
double
rotate
,
int
shadow
,
glow_eGradient
gradient
,
glow_eExportPass
pass
,
int
*
shape_cnt
,
int
node_cnt
,
int
in_nc
,
ofstream
&
fp
);
void
gradient_paint
(
glow_eGradient
gradient
,
int
gc1
,
int
gc2
,
double
x0
,
double
y0
,
double
w
,
double
h
,
int
fixcolor
,
glow_eDrawType
fill_drawtype
,
ofstream
&
fp
);
GlowCtx
*
ctx
;
GlowNodeClass
*
nc
;
int
is_nodeclass
;
...
...
xtt/lib/glow/src/glow_growarc.cpp
View file @
a92df731
...
...
@@ -997,6 +997,8 @@ void GrowArc::export_javabean( GlowTransform *t, void *node,
glow_eExportPass
pass
,
int
*
shape_cnt
,
int
node_cnt
,
int
in_nc
,
ofstream
&
fp
)
{
int
idx
;
int
gc1
,
gc2
;
if
(
node
&&
((
GrowNode
*
)
node
)
->
line_width
)
idx
=
int
(
ctx
->
mw
.
zoom_factor_y
/
ctx
->
mw
.
base_zoom_factor
*
((
GrowNode
*
)
node
)
->
line_width
-
1
);
...
...
@@ -1039,9 +1041,19 @@ void GrowArc::export_javabean( GlowTransform *t, void *node,
if
(
relief
==
glow_eRelief_Down
)
drawtype_incr
=
-
shadow_contrast
;
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
->
arc
(
ll_x
,
ll_y
,
ur_x
-
ll_x
,
ur_y
-
ll_y
,
angle1
-
rot
,
angle2
,
fill
,
border
||
!
fill
,
fill_drawtype
,
draw_type
,
idx
,
ish
,
shadow
,
drawtype_incr
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
idx
,
ish
,
shadow
,
drawtype_incr
,
fixcolor
,
gradient
,
gc1
,
gc2
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
}
void
GrowArc
::
flip
(
double
x0
,
double
y0
,
glow_eFlipDirection
dir
)
...
...
xtt/lib/glow/src/glow_growconglue.cpp
View file @
a92df731
This diff is collapsed.
Click to expand it.
xtt/lib/glow/src/glow_grownode.cpp
View file @
a92df731
...
...
@@ -1518,7 +1518,7 @@ void GrowNode::export_javabean( GlowTransform *t, void *node,
nc
->
get_java_name
(
java_name
);
ctx
->
export_jbean
->
node
(
x1
,
y1
,
x2
,
y2
,
java_name
,
draw_type
,
fill_drawtype
,
text_drawtype
,
color_tone
,
color_lightness
,
color_intensity
,
color_shift
,
line_width
,
rot
,
shadow
,
color_intensity
,
color_shift
,
line_width
,
rot
,
shadow
,
gradient
,
pass
,
shape_cnt
,
node_cnt
,
in_nc
,
fp
);
}
...
...
xtt/lib/glow/src/glow_growpolyline.cpp
View file @
a92df731
...
...
@@ -1447,6 +1447,8 @@ void GrowPolyLine::export_javabean( GlowTransform *t, void *node,
{
int
i
;
int
idx
;
int
gc1
,
gc2
;
if
(
node
&&
((
GrowNode
*
)
node
)
->
line_width
)
idx
=
int
(
ctx
->
mw
.
zoom_factor_y
/
ctx
->
mw
.
base_zoom_factor
*
((
GrowNode
*
)
node
)
->
line_width
-
1
);
...
...
@@ -1495,10 +1497,24 @@ void GrowPolyLine::export_javabean( GlowTransform *t, void *node,
}
int
jborder
=
border
||
!
(
fill
||
(
!
disable_shadow
&&
shadow_width
!=
0
));
glow_eGradient
grad
=
gradient
;
if
(
disable_gradient
)
grad
=
glow_eGradient_No
;
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
->
polyline
(
p
,
a_points
.
a_size
,
fill
,
jborder
,
fill_drawtype
,
draw_type
,
fill_eq_border
,
fill_eq_light
,
fill_eq_shadow
,
idx
,
jshadow
,
shadow
,
shadow_contrast
,
sp
,
p_num
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
idx
,
jshadow
,
shadow
,
shadow_contrast
,
sp
,
p_num
,
fixcolor
,
grad
,
gc1
,
gc2
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
free
(
(
char
*
)
p
);
free
(
sp
);
}
...
...
xtt/lib/glow/src/glow_growrect.cpp
View file @
a92df731
...
...
@@ -1083,6 +1083,7 @@ void GrowRect::export_javabean( GlowTransform *t, void *node,
if
(
!
(
display_level
&
ctx
->
display_level
)
||
invisible
)
return
;
int
idx
;
int
gc1
,
gc2
;
if
(
fix_line_width
)
{
...
...
@@ -1137,9 +1138,18 @@ void GrowRect::export_javabean( GlowTransform *t, void *node,
int
jborder
=
border
||
!
(
fill
||
(
!
disable_shadow
&&
shadow_width
!=
0
));
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
->
rect
(
ll_x
,
ll_y
,
ur_x
-
ll_x
,
ur_y
-
ll_y
,
fill
,
jborder
,
fill_drawtype
,
draw_type
,
idx
,
ish
,
shadow
,
drawtype_incr
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
drawtype_incr
,
fixcolor
,
gradient
,
gc1
,
gc2
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
}
void
GrowRect
::
flip
(
double
x0
,
double
y0
,
glow_eFlipDirection
dir
)
...
...
xtt/lib/glow/src/glow_growrectrounded.cpp
View file @
a92df731
...
...
@@ -1086,6 +1086,7 @@ void GrowRectRounded::export_javabean( GlowTransform *t, void *node,
if
(
!
(
display_level
&
ctx
->
display_level
))
return
;
int
idx
;
int
gc1
,
gc2
;
if
(
fix_line_width
)
{
...
...
@@ -1141,9 +1142,20 @@ void GrowRectRounded::export_javabean( GlowTransform *t, void *node,
if
(
relief
==
glow_eRelief_Down
)
drawtype_incr
=
-
shadow_contrast
;
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
->
rectrounded
(
ll_x
,
ll_y
,
ur_x
-
ll_x
,
ur_y
-
ll_y
,
fill
,
border
||
!
fill
,
fill_drawtype
,
draw_type
,
idx
,
amount
,
ish
,
shadow
,
drawtype_incr
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
fill
,
border
||
!
fill
,
fill_drawtype
,
draw_type
,
idx
,
amount
,
ish
,
shadow
,
drawtype_incr
,
gradient
,
gc1
,
gc2
,
pass
,
shape_cnt
,
node_cnt
,
fp
);
}
...
...
xtt/lib/glow/src/glow_growslider.cpp
View file @
a92df731
...
...
@@ -249,7 +249,7 @@ void GrowSlider::export_javabean( GlowTransform *t, void *node,
nc
->
get_java_name
(
java_name
);
ctx
->
export_jbean
->
slider
(
x1
,
y1
,
x2
,
y2
,
java_name
,
draw_type
,
fill_drawtype
,
text_drawtype
,
color_tone
,
color_lightness
,
color_intensity
,
color_shift
,
line_width
,
rot
,
shadow
,
color_intensity
,
color_shift
,
line_width
,
rot
,
shadow
,
gradient
,
pass
,
shape_cnt
,
node_cnt
,
in_nc
,
fp
);
}
...
...
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