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
958f7a24
Commit
958f7a24
authored
Dec 21, 2007
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix in rounded rect without fill, wrote to menu shapes
parent
24cbfe5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
50 deletions
+53
-50
xtt/lib/glow/src/glow_exportjbean.cpp
xtt/lib/glow/src/glow_exportjbean.cpp
+53
-50
No files found.
xtt/lib/glow/src/glow_exportjbean.cpp
View file @
958f7a24
/*
* Proview $Id: glow_exportjbean.cpp,v 1.1
7 2007-09-19 15:07:1
1 claes Exp $
* Proview $Id: glow_exportjbean.cpp,v 1.1
8 2007-12-21 13:20:3
1 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -791,69 +791,72 @@ void GlowExportJBean::rectrounded( double x0, double y0, double width, double he
else
((
GrowCtx
*
)
ctx
)
->
measure_javabean
(
&
dim_x1
,
&
dim_x0
,
&
dim_y1
,
&
dim_y0
);
fp
<<
" new RoundRectangle2D.Float("
<<
x0
-
dim_x0
+
glow_cJBean_Offset
<<
"F, "
<<
y0
-
dim_y0
+
glow_cJBean_Offset
<<
"F, "
<<
width
<<
"F, "
<<
height
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
2
*
roundamount
<<
"F),"
<<
endl
;
if
(
shadow_width
!=
0
)
{
// Light shadow
if
(
fill
)
{
fp
<<
" new R
ectangle2D.Float("
<<
x0
-
dim_x0
+
glow_cJBean_Offset
+
roundamoun
t
<<
"F, "
<<
" new R
oundRectangle2D.Float("
<<
x0
-
dim_x0
+
glow_cJBean_Offse
t
<<
"F, "
<<
y0
-
dim_y0
+
glow_cJBean_Offset
<<
"F, "
<<
width
-
2
*
roundamount
<<
"F, "
<<
shadow_width
<<
"F),"
<<
endl
<<
width
<<
"F, "
<<
height
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
2
*
roundamount
<<
"F),"
<<
endl
;
if
(
shadow_width
!=
0
)
{
// Light shadow
fp
<<
" new Rectangle2D.Float("
<<
x0
-
dim_x0
+
glow_cJBean_Offset
+
roundamount
<<
"F, "
<<
y0
-
dim_y0
+
glow_cJBean_Offset
<<
"F, "
<<
width
-
2
*
roundamount
<<
"F, "
<<
shadow_width
<<
"F),"
<<
endl
<<
" new Rectangle2D.Float("
<<
x0
-
dim_x0
+
glow_cJBean_Offset
<<
"F, "
<<
y0
-
dim_y0
+
glow_cJBean_Offset
+
roundamount
<<
"F, "
<<
shadow_width
<<
"F, "
<<
height
-
2
*
roundamount
<<
"F),"
<<
endl
<<
y0
-
dim_y0
+
glow_cJBean_Offset
+
roundamount
<<
"F, "
<<
shadow_width
<<
"F, "
<<
height
-
2
*
roundamount
<<
"F),"
<<
endl
<<
" new Arc2D.Float("
<<
x0
-
dim_x0
+
glow_cJBean_Offset
<<
"F, "
<<
y0
-
dim_y0
+
glow_cJBean_Offset
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
90
<<
"F, "
<<
90
<<
"F, Arc2D.PIE),"
<<
endl
<<
y0
-
dim_y0
+
glow_cJBean_Offset
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
90
<<
"F, "
<<
90
<<
"F, Arc2D.PIE),"
<<
endl
<<
" new Arc2D.Float("
<<
x0
-
dim_x0
+
glow_cJBean_Offset
+
width
-
2
*
roundamount
<<
"F, "
<<
y0
-
dim_y0
+
glow_cJBean_Offset
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
45
<<
"F, "
<<
45
<<
"F, Arc2D.PIE),"
<<
endl
<<
y0
-
dim_y0
+
glow_cJBean_Offset
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
45
<<
"F, "
<<
45
<<
"F, Arc2D.PIE),"
<<
endl
<<
" new Arc2D.Float("
<<
x0
-
dim_x0
+
glow_cJBean_Offset
<<
"F, "
<<
y0
-
dim_y0
+
glow_cJBean_Offset
+
height
-
2
*
roundamount
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
180
<<
"F, "
<<
45
<<
"F, Arc2D.PIE),"
<<
endl
;
// Dark shadow
fp
<<
y0
-
dim_y0
+
glow_cJBean_Offset
+
height
-
2
*
roundamount
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
180
<<
"F, "
<<
45
<<
"F, Arc2D.PIE),"
<<
endl
;
// Dark shadow
fp
<<
" new Rectangle2D.Float("
<<
x0
-
dim_x0
+
glow_cJBean_Offset
+
roundamount
<<
"F, "
<<
y0
-
dim_y0
+
glow_cJBean_Offset
+
height
-
shadow_width
<<
"F, "
<<
width
-
2
*
roundamount
<<
"F, "
<<
shadow_width
<<
"F),"
<<
endl
<<
y0
-
dim_y0
+
glow_cJBean_Offset
+
height
-
shadow_width
<<
"F, "
<<
width
-
2
*
roundamount
<<
"F, "
<<
shadow_width
<<
"F),"
<<
endl
<<
" new Rectangle2D.Float("
<<
x0
-
dim_x0
+
glow_cJBean_Offset
+
width
-
shadow_width
<<
"F, "
<<
y0
-
dim_y0
+
glow_cJBean_Offset
+
roundamount
<<
"F, "
<<
shadow_width
<<
"F, "
<<
height
-
2
*
roundamount
<<
"F),"
<<
endl
<<
y0
-
dim_y0
+
glow_cJBean_Offset
+
roundamount
<<
"F, "
<<
shadow_width
<<
"F, "
<<
height
-
2
*
roundamount
<<
"F),"
<<
endl
<<
" new Arc2D.Float("
<<
x0
-
dim_x0
+
glow_cJBean_Offset
+
width
-
2
*
roundamount
<<
"F, "
<<
y0
-
dim_y0
+
glow_cJBean_Offset
+
height
-
2
*
roundamount
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
270
<<
"F, "
<<
90
<<
"F, Arc2D.PIE),"
<<
endl
<<
y0
-
dim_y0
+
glow_cJBean_Offset
+
height
-
2
*
roundamount
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
270
<<
"F, "
<<
90
<<
"F, Arc2D.PIE),"
<<
endl
<<
" new Arc2D.Float("
<<
x0
-
dim_x0
+
glow_cJBean_Offset
+
width
-
2
*
roundamount
<<
"F, "
<<
y0
-
dim_y0
+
glow_cJBean_Offset
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
0
<<
"F, "
<<
45
<<
"F, Arc2D.PIE),"
<<
endl
<<
y0
-
dim_y0
+
glow_cJBean_Offset
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
0
<<
"F, "
<<
45
<<
"F, Arc2D.PIE),"
<<
endl
<<
" new Arc2D.Float("
<<
x0
-
dim_x0
+
glow_cJBean_Offset
<<
"F, "
<<
y0
-
dim_y0
+
glow_cJBean_Offset
+
height
-
2
*
roundamount
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
225
<<
"F, "
<<
45
<<
"F, Arc2D.PIE),"
<<
endl
;
if
(
roundamount
>
shadow_width
)
{
fp
<<
y0
-
dim_y0
+
glow_cJBean_Offset
+
height
-
2
*
roundamount
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
225
<<
"F, "
<<
45
<<
"F, Arc2D.PIE),"
<<
endl
;
if
(
roundamount
>
shadow_width
)
{
fp
<<
" new RoundRectangle2D.Float("
<<
x0
-
dim_x0
+
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, "
<<
2
*
roundamount
-
2
*
shadow_width
<<
"F, "
<<
2
*
roundamount
-
2
*
shadow_width
<<
"F),"
<<
endl
;
}
else
{
fp
<<
y0
-
dim_y0
+
glow_cJBean_Offset
+
shadow_width
<<
"F, "
<<
width
-
2
*
shadow_width
<<
"F, "
<<
height
-
2
*
shadow_width
<<
"F, "
<<
2
*
roundamount
-
2
*
shadow_width
<<
"F, "
<<
2
*
roundamount
-
2
*
shadow_width
<<
"F),"
<<
endl
;
}
else
{
fp
<<
" new Rectangle2D.Float("
<<
x0
-
dim_x0
+
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
;
y0
-
dim_y0
+
glow_cJBean_Offset
+
shadow_width
<<
"F, "
<<
width
-
2
*
shadow_width
<<
"F, "
<<
height
-
2
*
shadow_width
<<
"F),"
<<
endl
;
}
}
if
(
border
)
fp
<<
" new RoundRectangle2D.Float("
<<
x0
-
dim_x0
+
glow_cJBean_Offset
<<
"F, "
<<
y0
-
dim_y0
+
glow_cJBean_Offset
<<
"F, "
<<
width
<<
"F, "
<<
height
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
2
*
roundamount
<<
"F),"
<<
endl
;
}
if
(
border
)
fp
<<
" new RoundRectangle2D.Float("
<<
x0
-
dim_x0
+
glow_cJBean_Offset
<<
"F, "
<<
y0
-
dim_y0
+
glow_cJBean_Offset
<<
"F, "
<<
width
<<
"F, "
<<
height
<<
"F, "
<<
2
*
roundamount
<<
"F, "
<<
2
*
roundamount
<<
"F),"
<<
endl
;
break
;
}
case
glow_eExportPass_Init
:
...
...
@@ -948,7 +951,7 @@ void GlowExportJBean::rectrounded( double x0, double y0, double width, double he
fp
<<
" }"
<<
endl
;
}
if
(
border
)
if
(
border
)
{
if
(
shadow_width
==
0
)
(
*
shape_cnt
)
--
;
...
...
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