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
90dae3ab
Commit
90dae3ab
authored
Feb 02, 2011
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Flow alloc color problem fixed
parent
b2fceed0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
9 deletions
+25
-9
xtt/changelog.txt
xtt/changelog.txt
+1
-0
xtt/lib/flow/gtk/flow_draw_gtk.cpp
xtt/lib/flow/gtk/flow_draw_gtk.cpp
+24
-9
No files found.
xtt/changelog.txt
View file @
90dae3ab
...
...
@@ -196,3 +196,4 @@
110120 cs ge wb_ge, execution of wtt initfile to get history log enable/disable setup added.
110121 cs xtt Languages zh_cn and fr_fr added.
110121 rk rtmon Runtime Monitor, problem with restart timeout fixed.
110202 cs flow Color alloc problem fixed.
xtt/lib/flow/gtk/flow_draw_gtk.cpp
View file @
90dae3ab
...
...
@@ -295,19 +295,34 @@ static GdkColor flow_allocate_color( FlowDrawGtk *draw_ctx, const char *named_co
{
GdkColor
color
;
if
(
draw_ctx
->
color_vect_cnt
>=
(
int
)(
sizeof
(
draw_ctx
->
color_vect
)
/
sizeof
(
draw_ctx
->
color_vect
[
0
])))
{
printf
(
"Flow allocate color error: max number of colors exceeded
\n
"
);
return
draw_ctx
->
color_vect
[
0
];
if
(
draw_ctx
->
color_vect_cnt
==
0
)
{
gdk_color_parse
(
"black"
,
&
draw_ctx
->
color_vect
[
0
]);
gdk_colormap_alloc_color
(
draw_ctx
->
colormap
,
&
draw_ctx
->
color_vect
[
0
],
FALSE
,
TRUE
);
gdk_color_parse
(
"white"
,
&
draw_ctx
->
color_vect
[
1
]);
gdk_colormap_alloc_color
(
draw_ctx
->
colormap
,
&
draw_ctx
->
color_vect
[
1
],
FALSE
,
TRUE
);
draw_ctx
->
color_vect_cnt
=
2
;
}
if
(
!
gdk_color_parse
(
named_color
,
&
color
))
gdk_color_parse
(
"black"
,
&
color
);
gdk_colormap_alloc_color
(
draw_ctx
->
colormap
,
&
color
,
FALSE
,
TRUE
);
if
(
strcmp
(
named_color
,
"black"
)
==
0
)
return
draw_ctx
->
color_vect
[
0
];
else
if
(
strcmp
(
named_color
,
"white"
)
==
0
)
return
draw_ctx
->
color_vect
[
1
];
else
{
if
(
draw_ctx
->
color_vect_cnt
>=
(
int
)(
sizeof
(
draw_ctx
->
color_vect
)
/
sizeof
(
draw_ctx
->
color_vect
[
0
])))
{
printf
(
"Flow allocate color error: max number of colors exceeded
\n
"
);
return
draw_ctx
->
color_vect
[
0
];
}
if
(
!
gdk_color_parse
(
named_color
,
&
color
))
gdk_color_parse
(
"black"
,
&
color
);
gdk_colormap_alloc_color
(
draw_ctx
->
colormap
,
&
color
,
FALSE
,
TRUE
);
draw_ctx
->
color_vect
[
draw_ctx
->
color_vect_cnt
]
=
color
;
draw_ctx
->
color_vect_cnt
++
;
draw_ctx
->
color_vect
[
draw_ctx
->
color_vect_cnt
]
=
color
;
draw_ctx
->
color_vect_cnt
++
;
return
color
;
return
color
;
}
}
FlowDrawGtk
::~
FlowDrawGtk
()
...
...
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