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
b931f371
Commit
b931f371
authored
Jul 08, 2004
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix in rounded rect, and prepared for new layout manager
parent
8dc36d7b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
15 deletions
+22
-15
xtt/lib/glow/src/glow_exportjbean.cpp
xtt/lib/glow/src/glow_exportjbean.cpp
+22
-15
No files found.
xtt/lib/glow/src/glow_exportjbean.cpp
View file @
b931f371
...
@@ -136,7 +136,9 @@ void GlowExportJBean::growctx( glow_eExportPass pass, ofstream& fp)
...
@@ -136,7 +136,9 @@ void GlowExportJBean::growctx( glow_eExportPass pass, ofstream& fp)
" Graphics2D g = (Graphics2D) g1;"
<<
endl
<<
" Graphics2D g = (Graphics2D) g1;"
<<
endl
<<
" float width = getWidth();"
<<
endl
<<
" float width = getWidth();"
<<
endl
<<
" float height = getHeight();"
<<
endl
<<
" float height = getHeight();"
<<
endl
<<
" g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);"
<<
endl
;
" g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);"
<<
endl
<<
" double scaleWidth = (1.0*width/original_width);"
<<
endl
<<
" double scaleHeight = (1.0*height/original_height);"
<<
endl
;
if
(
((
GrowCtx
*
)
ctx
)
->
subgraph
)
if
(
((
GrowCtx
*
)
ctx
)
->
subgraph
)
fp
<<
fp
<<
...
@@ -164,11 +166,11 @@ void GlowExportJBean::growctx( glow_eExportPass pass, ofstream& fp)
...
@@ -164,11 +166,11 @@ void GlowExportJBean::growctx( glow_eExportPass pass, ofstream& fp)
" height/original_height));"
<<
endl
;
" height/original_height));"
<<
endl
;
else
else
fp
<<
fp
<<
"// g.transform( AffineTransform.getScaleInstance( scaleWidth, scaleHeight));"
<<
endl
<<
" AffineTransform save = g.getTransform();"
<<
endl
<<
" AffineTransform save = g.getTransform();"
<<
endl
<<
" AffineTransform save_tmp;"
<<
endl
<<
" g.setColor(getBackground());"
<<
endl
<<
" g.setColor(getBackground());"
<<
endl
<<
" g.fill(new Rectangle(0,0,getWidth(),getHeight()));"
<<
endl
;
" g.fill(new Rectangle(0,0,getWidth(),getHeight()));"
<<
endl
<<
" // xxx g.transform( AffineTransform.getScaleInstance( scaleWidth, scaleHeight));"
<<
endl
<<
" AffineTransform save_tmp;"
<<
endl
;
if
(
strcmp
(
((
GrowCtx
*
)
ctx
)
->
background_image
,
""
)
!=
0
)
if
(
strcmp
(
((
GrowCtx
*
)
ctx
)
->
background_image
,
""
)
!=
0
)
{
{
fp
<<
fp
<<
...
@@ -834,6 +836,7 @@ void GlowExportJBean::rectrounded( double x0, double y0, double width, double he
...
@@ -834,6 +836,7 @@ void GlowExportJBean::rectrounded( double x0, double y0, double width, double he
y0
-
dim_y0
+
glow_cJBean_Offset
+
shadow_width
<<
"F, "
<<
y0
-
dim_y0
+
glow_cJBean_Offset
+
shadow_width
<<
"F, "
<<
width
-
2
*
shadow_width
<<
"F, "
<<
height
-
2
*
shadow_width
<<
"F),"
<<
endl
;
width
-
2
*
shadow_width
<<
"F, "
<<
height
-
2
*
shadow_width
<<
"F),"
<<
endl
;
}
}
if
(
border
)
fp
<<
fp
<<
" new RoundRectangle2D.Float("
<<
x0
-
dim_x0
+
glow_cJBean_Offset
<<
"F, "
<<
" new RoundRectangle2D.Float("
<<
x0
-
dim_x0
+
glow_cJBean_Offset
<<
"F, "
<<
y0
-
dim_y0
+
glow_cJBean_Offset
<<
"F, "
<<
y0
-
dim_y0
+
glow_cJBean_Offset
<<
"F, "
<<
...
@@ -947,6 +950,8 @@ void GlowExportJBean::rectrounded( double x0, double y0, double width, double he
...
@@ -947,6 +950,8 @@ void GlowExportJBean::rectrounded( double x0, double y0, double width, double he
else
else
fp
<<
fp
<<
" g.draw( shapes_p"
<<
page
<<
"["
<<
(
*
shape_cnt
)
++
<<
"]);"
<<
endl
;
" g.draw( shapes_p"
<<
page
<<
"["
<<
(
*
shape_cnt
)
++
<<
"]);"
<<
endl
;
if
(
shadow_width
==
0
)
(
*
shape_cnt
)
++
;
}
}
break
;
break
;
}
}
...
@@ -1333,6 +1338,7 @@ void GlowExportJBean::annot( int x0, int y0, int number,
...
@@ -1333,6 +1338,7 @@ void GlowExportJBean::annot( int x0, int y0, int number,
fp
<<
fp
<<
" g.transform( AffineTransform.getScaleInstance( original_width/width *"
<<
endl
<<
" g.transform( AffineTransform.getScaleInstance( original_width/width *"
<<
endl
<<
" height/original_height * 0.75, 1));"
<<
endl
<<
" height/original_height * 0.75, 1));"
<<
endl
<<
" if ( annot"
<<
number
<<
" != null)"
<<
endl
<<
" g.drawString( annot"
<<
number
<<
", "
<<
" g.drawString( annot"
<<
number
<<
", "
<<
x0
-
int
(
dim_x0
)
+
glow_cJBean_Offset
<<
x0
-
int
(
dim_x0
)
+
glow_cJBean_Offset
<<
" * original_height / height * width / original_width, "
<<
" * original_height / height * width / original_width, "
<<
...
@@ -1342,6 +1348,7 @@ void GlowExportJBean::annot( int x0, int y0, int number,
...
@@ -1342,6 +1348,7 @@ void GlowExportJBean::annot( int x0, int y0, int number,
" g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_OFF);"
<<
endl
<<
" g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_OFF);"
<<
endl
<<
" g.transform( AffineTransform.getScaleInstance( original_width/width *"
<<
endl
<<
" g.transform( AffineTransform.getScaleInstance( original_width/width *"
<<
endl
<<
" height/original_height, 1));"
<<
endl
<<
" height/original_height, 1));"
<<
endl
<<
" if ( annot"
<<
number
<<
" != null)"
<<
endl
<<
" g.drawString( annot"
<<
number
<<
", "
<<
" g.drawString( annot"
<<
number
<<
", "
<<
x0
-
int
(
dim_x0
)
+
glow_cJBean_Offset
<<
x0
-
int
(
dim_x0
)
+
glow_cJBean_Offset
<<
" * original_height / height * width / original_width, "
<<
" * original_height / height * width / original_width, "
<<
...
@@ -1476,7 +1483,7 @@ void GlowExportJBean::node( double x1, double y1, double x2, double y2,
...
@@ -1476,7 +1483,7 @@ void GlowExportJBean::node( double x1, double y1, double x2, double y2,
" add("
<<
var_name
<<
");"
<<
endl
;
" add("
<<
var_name
<<
");"
<<
endl
;
else
else
fp
<<
fp
<<
" localPanel.add("
<<
var_name
<<
",
null
);"
<<
endl
;
" localPanel.add("
<<
var_name
<<
",
ScaleTools.getAddString("
<<
var_name
<<
".getBounds(),size)
);"
<<
endl
;
break
;
break
;
}
}
...
@@ -1573,7 +1580,7 @@ void GlowExportJBean::image( double x1, double y1, double x2, double y2,
...
@@ -1573,7 +1580,7 @@ void GlowExportJBean::image( double x1, double y1, double x2, double y2,
" add("
<<
var_name
<<
");"
<<
endl
;
" add("
<<
var_name
<<
");"
<<
endl
;
else
else
fp
<<
fp
<<
" localPanel.add("
<<
var_name
<<
",
null
);"
<<
endl
;
" localPanel.add("
<<
var_name
<<
",
ScaleTools.getAddString("
<<
var_name
<<
".getBounds(),size)
);"
<<
endl
;
break
;
break
;
}
}
...
@@ -1671,7 +1678,7 @@ void GlowExportJBean::bar( double x1, double y1, double x2, double y2,
...
@@ -1671,7 +1678,7 @@ void GlowExportJBean::bar( double x1, double y1, double x2, double y2,
" add("
<<
var_name
<<
");"
<<
endl
;
" add("
<<
var_name
<<
");"
<<
endl
;
else
else
fp
<<
fp
<<
" localPanel.add("
<<
var_name
<<
",
null
);"
<<
endl
;
" localPanel.add("
<<
var_name
<<
",
ScaleTools.getAddString("
<<
var_name
<<
".getBounds(),size)
);"
<<
endl
;
break
;
break
;
}
}
case
glow_eExportPass_Draw
:
case
glow_eExportPass_Draw
:
...
@@ -1775,7 +1782,7 @@ void GlowExportJBean::trend( double x1, double y1, double x2, double y2,
...
@@ -1775,7 +1782,7 @@ void GlowExportJBean::trend( double x1, double y1, double x2, double y2,
" add("
<<
var_name
<<
");"
<<
endl
;
" add("
<<
var_name
<<
");"
<<
endl
;
else
else
fp
<<
fp
<<
" localPanel.add("
<<
var_name
<<
",
null
);"
<<
endl
;
" localPanel.add("
<<
var_name
<<
",
ScaleTools.getAddString("
<<
var_name
<<
".getBounds(),size)
);"
<<
endl
;
break
;
break
;
}
}
case
glow_eExportPass_Draw
:
case
glow_eExportPass_Draw
:
...
@@ -1884,7 +1891,7 @@ void GlowExportJBean::axis( double x1, double y1, double x2, double y2,
...
@@ -1884,7 +1891,7 @@ void GlowExportJBean::axis( double x1, double y1, double x2, double y2,
" add("
<<
var_name
<<
");"
<<
endl
;
" add("
<<
var_name
<<
");"
<<
endl
;
else
else
fp
<<
fp
<<
" localPanel.add("
<<
var_name
<<
",
null
);"
<<
endl
;
" localPanel.add("
<<
var_name
<<
",
ScaleTools.getAddString("
<<
var_name
<<
".getBounds(),size)
);"
<<
endl
;
break
;
break
;
}
}
case
glow_eExportPass_Draw
:
case
glow_eExportPass_Draw
:
...
@@ -1939,7 +1946,7 @@ void GlowExportJBean::window( double x1, double y1, double x2, double y2,
...
@@ -1939,7 +1946,7 @@ void GlowExportJBean::window( double x1, double y1, double x2, double y2,
(
int
)(
y1
-
dim_y0
/* - glow_cJBean_Offset) */
)
<<
","
<<
(
int
)(
y1
-
dim_y0
/* - glow_cJBean_Offset) */
)
<<
","
<<
(
int
)(
x2
-
x1
+
2
*
glow_cJBean_Offset
)
<<
","
<<
(
int
)(
x2
-
x1
+
2
*
glow_cJBean_Offset
)
<<
","
<<
(
int
)(
y2
-
y1
+
2
*
glow_cJBean_Offset
)
<<
"));"
<<
endl
<<
(
int
)(
y2
-
y1
+
2
*
glow_cJBean_Offset
)
<<
"));"
<<
endl
<<
" localPanel.add("
<<
var_name
<<
",
null
);"
<<
endl
;
" localPanel.add("
<<
var_name
<<
",
ScaleTools.getAddString("
<<
var_name
<<
".getBounds(),size)
);"
<<
endl
;
break
;
break
;
}
}
case
glow_eExportPass_Draw
:
case
glow_eExportPass_Draw
:
...
@@ -2010,7 +2017,7 @@ void GlowExportJBean::folder( double x1, double y1, double x2, double y2,
...
@@ -2010,7 +2017,7 @@ void GlowExportJBean::folder( double x1, double y1, double x2, double y2,
(
int
)(
y1
-
dim_y0
/* - glow_cJBean_Offset) */
)
<<
","
<<
(
int
)(
y1
-
dim_y0
/* - glow_cJBean_Offset) */
)
<<
","
<<
(
int
)(
x2
-
x1
+
2
*
glow_cJBean_Offset
)
<<
","
<<
(
int
)(
x2
-
x1
+
2
*
glow_cJBean_Offset
)
<<
","
<<
(
int
)(
y2
-
y1
+
2
*
glow_cJBean_Offset
)
<<
"));"
<<
endl
<<
(
int
)(
y2
-
y1
+
2
*
glow_cJBean_Offset
)
<<
"));"
<<
endl
<<
" localPanel.add("
<<
var_name
<<
",
null
);"
<<
endl
;
" localPanel.add("
<<
var_name
<<
",
ScaleTools.getAddString("
<<
var_name
<<
".getBounds(),size)
);"
<<
endl
;
break
;
break
;
}
}
case
glow_eExportPass_Draw
:
case
glow_eExportPass_Draw
:
...
@@ -2094,7 +2101,7 @@ void GlowExportJBean::table( double x1, double y1, double x2, double y2,
...
@@ -2094,7 +2101,7 @@ void GlowExportJBean::table( double x1, double y1, double x2, double y2,
(
int
)(
x2
-
x1
+
2
*
glow_cJBean_Offset
)
<<
","
<<
(
int
)(
x2
-
x1
+
2
*
glow_cJBean_Offset
)
<<
","
<<
(
int
)(
y2
-
y1
+
2
*
glow_cJBean_Offset
)
<<
"));"
<<
endl
;
(
int
)(
y2
-
y1
+
2
*
glow_cJBean_Offset
)
<<
"));"
<<
endl
;
fp
<<
fp
<<
" localPanel.add("
<<
var_name
<<
",
null
);"
<<
endl
;
" localPanel.add("
<<
var_name
<<
",
ScaleTools.getAddString("
<<
var_name
<<
".getBounds(),size)
);"
<<
endl
;
break
;
break
;
}
}
case
glow_eExportPass_Draw
:
case
glow_eExportPass_Draw
:
...
...
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