[gtkmm] Added Gdk::Cairo::set_source_rgba().



commit ce84a52e4262e5f212f77fd5fccbe8228cd2806d
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Dec 7 16:48:25 2010 +0100

    Added Gdk::Cairo::set_source_rgba().
    
    * gdk/gdkmm/general.[h|cc]: Wrapped gdk_cairo_set_source_rgba().

 ChangeLog            |    6 ++++++
 gdk/gdkmm/general.cc |    5 +++++
 gdk/gdkmm/general.h  |    9 +++++++++
 3 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 58fc9fd..be034e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2010-12-07  Murray Cumming  <murrayc murrayc com>
 
+	Added Gdk::Cairo::set_source_rgba().
+
+	* gdk/gdkmm/general.[h|cc]: Wrapped gdk_cairo_set_source_rgba().
+
+2010-12-07  Murray Cumming  <murrayc murrayc com>
+
 	Widget, StyleContext: Allow default StyleFlag values.
 
 	* gtk/src/stylecontext.[hg|ccg]: get_color(), get_background_color(),
diff --git a/gdk/gdkmm/general.cc b/gdk/gdkmm/general.cc
index f65b448..9c1e5f6 100644
--- a/gdk/gdkmm/general.cc
+++ b/gdk/gdkmm/general.cc
@@ -60,6 +60,11 @@ void set_source_color(const ::Cairo::RefPtr< ::Cairo::Context >& context, const
   gdk_cairo_set_source_color(context->cobj(), const_cast<GdkColor*>(color.gobj()));
 }
 
+void set_source_rgba(const ::Cairo::RefPtr< ::Cairo::Context >& context, const Gdk::RGBA& color)
+{
+  gdk_cairo_set_source_rgba(context->cobj(), const_cast<GdkRGBA*>(color.gobj()));
+}
+
 void set_source_pixbuf(const ::Cairo::RefPtr< ::Cairo::Context >& context, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf, double pixbuf_x, double pixbuf_y)
 {
   gdk_cairo_set_source_pixbuf(context->cobj(), pixbuf->gobj(), pixbuf_x, pixbuf_y);
diff --git a/gdk/gdkmm/general.h b/gdk/gdkmm/general.h
index 9cea49c..7c1bfe9 100644
--- a/gdk/gdkmm/general.h
+++ b/gdk/gdkmm/general.h
@@ -47,6 +47,15 @@ namespace Cairo
  */
 void set_source_color(const ::Cairo::RefPtr< ::Cairo::Context >& context, const Gdk::Color& color);
 
+/** Sets the specified Gdk::RGBA as the source color of the Cairo context.
+ * @param @context The cairo context.
+ * @param color The color to use as the source color.
+ *
+ * @newin{3,0}
+ */
+void set_source_rgba(const ::Cairo::RefPtr< ::Cairo::Context >& context, const Gdk::RGBA& color);
+
+
 /** Sets the given pixbuf as the source pattern for the Cairo context. The pattern has an extend mode of CAIRO_EXTEND_NONE and is aligned so that the origin of pixbuf is pixbuf_x, pixbuf_y.
  * @param @context The cairo context.
  * @param pixbuf A Gdk::Pixbuf



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