Re: What is the recommended interface for color manipulation?



Hi,

Am Freitag, den 12.03.2010, 16:24 +0100 schrieb BALLABIO GERARDO:

> I want to convert a string (e.g., "white", "blue", "#ff0000") to a
> color. I found in the gtkmm documentation that there's a class
> Gdk::Color with a constructor taking a Glib::ustring as argument. I
> tried it and it does what I want. However I also read that using Gdk
> for drawing is now deprecated and Cairo should be used instead. Is
> Gdk::Color deprecated too? If so, what should I use? I could not find
> a corresponding class or function in Cairomm.

No, Gdk::Color as such is not deprecated.  However, it is largely
redundant nowadays since Pango::Color also provides this functionality.
(In fact, setting a GdkColor from a string is implemented in terms of
pango_color_parse() these days).

--Daniel




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]