Hello,

I'd like to know what's the best way to converting Cairo.Color into
Gdk.Color and viceversa, mainly for using Gtk.ColorSelection widget.
Currently I'm doing something like:

Gdk.Color gcl;
Cairo.Color ccl;

...

gcl = Gdk.Color ( (byte)ccl.R, (byte)ccl.G, (byte),cc.B);

Although it seems to work, it does not looks neither clean nor robust,
as Cairo.Color uses a double for each color component, data may be lost
on the conversion though. I wonder if there's a better method for doing
this, and also for converting from Gdk.Color to Cairo.Color.

Thanks a lot in advance.

Best regards,



_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to