projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't display the frame efficiency.
[synfig.git]
/
synfig-core
/
trunk
/
src
/
synfig
/
color.cpp
diff --git
a/synfig-core/trunk/src/synfig/color.cpp
b/synfig-core/trunk/src/synfig/color.cpp
index
6c4dd5b
..
1fa133c
100644
(file)
--- a/
synfig-core/trunk/src/synfig/color.cpp
+++ b/
synfig-core/trunk/src/synfig/color.cpp
@@
-79,9
+79,16
@@
Color::real2hex(ColorReal c)
}
void
}
void
-Color::set_hex(String&
hex
)
+Color::set_hex(String&
str
)
{
value_type r, g, b;
{
value_type r, g, b;
+ String hex;
+
+ // use just the hex characters
+ for (String::const_iterator iter = str.begin(); iter != str.end(); iter++)
+ if (isxdigit(*iter))
+ hex.push_back(*iter);
+
try
{
if (hex.size() == 1)
try
{
if (hex.size() == 1)
@@
-429,7
+436,7
@@
blendfunc_LUMINANCE(Color &a,Color &b,float amount)
static Color
blendfunc_BEHIND(Color &a,Color &b,float amount)
{
static Color
blendfunc_BEHIND(Color &a,Color &b,float amount)
{
- if(a.get_a()==0)a.set_a(COLOR_EPSILON); //!< \hack
+ if(a.get_a()==0)a.set_a(COLOR_EPSILON); //!< \
todo this is a
hack
a.set_a(a.get_a()*amount);
return blendfunc_COMPOSITE(b,a,1.0);
}
a.set_a(a.get_a()*amount);
return blendfunc_COMPOSITE(b,a,1.0);
}