allow omitting alpha from "1,1,1", like #FFFFFF

This commit is contained in:
Glenn Maynard
2004-04-26 00:07:25 +00:00
parent 84e873bb28
commit 9707e6bb0c
+5
View File
@@ -140,6 +140,11 @@ public:
bool FromString( const CString &str )
{
int result = sscanf( str, "%f,%f,%f,%f", &r, &g, &b, &a );
if( result == 3 )
{
a = 1;
return true;
}
if( result == 4 )
return true;