text selection consistency

Leo Savernik l.savernik at aon.at
Sun Sep 28 19:18:41 BST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Sonntag, 28. September 2003 19:14 schrieb Germain Garand:
> {
> #define HUE_DISTANCE 15
> #define CONTRAST_DISTANCE 10
> int h1, s1, v1, h2, s2, v2;
> c1.hsv(&h1,&s1,&v1);
> c2.hsv(&h2,&s2,&v2);
> return QABS(h1-h2) > HUE_DISTANCE &&
>        QABS(s1-s2) + QABS(v1-v2) > CONTRAST_DISTANCE*2;
> #undef CONTRAST_DISTANCE
> #undef HUE_DISTANCE
> }

Thanks for that. The solution seems not to be slow because only integer 
arithmetic is involved in the rgb->hsv conversion. I incorporated it into 
khtml, encapsulated by #if, using your implementation by default.

mfg
	Leo


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE/dyYCj5jssenUYTsRAqkVAJ9jNVQRzUJtsT3I1fhuB3vPvkGERQCZAVPN
TkMqcLCP4EsU30WvcAYXyjg=
=WKKt
-----END PGP SIGNATURE-----





More information about the kfm-devel mailing list