[gtkmm] Gdk::Pixbuf: Document some methods.



commit c7658dbe2981ff825f3e8a8aa3f8444dc4c8630a
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Oct 9 10:11:17 2013 +0200

    Gdk::Pixbuf: Document some methods.

 gdk/src/pixbuf.hg |   44 ++++++++++++++++++++++++++++++++++----------
 1 files changed, 34 insertions(+), 10 deletions(-)
---
diff --git a/gdk/src/pixbuf.hg b/gdk/src/pixbuf.hg
index 9680bbb..4c63a69 100644
--- a/gdk/src/pixbuf.hg
+++ b/gdk/src/pixbuf.hg
@@ -90,14 +90,26 @@ protected:
    *
    * @newin{2,12}
    */
-   Pixbuf(const Glib::RefPtr<Window>& src,
+  Pixbuf(const Glib::RefPtr<Window>& src,
          int src_x, int src_y, int width, int height);
-   _IGNORE(gdk_pixbuf_get_from_window)
+  _IGNORE(gdk_pixbuf_get_from_window)
 
-   //TODO: Documentation:
-   /** @newin{2,30}
-    */
-   Pixbuf(const Cairo::RefPtr<Cairo::Surface>& src,
+  /** Transfers image data from a Cairo::Surface and converts it to an RGB(A)
+   * representation inside a Gdk::Pixbuf. This allows you to efficiently read
+   * individual pixels from cairo surfaces. For Gdk::Windows, use the
+   * constructor that takes a Gdk::Window instead.
+   *
+   * This will create an RGB pixbuf with 8 bits per channel. The pixbuf will contain an alpha channel if the 
surface contains one. 
+   *
+   * @param surface Surface to copy from.
+   * @param src_x Source X coordinate within the surface.
+   * @param src_y Source Y coordinate within the surface.
+   * @param width Width in pixels of region to get.
+   * @param height Height in pixels of region to get.
+   *
+   * @newin{2,30}
+   */
+  Pixbuf(const Cairo::RefPtr<Cairo::Surface>& src,
          int src_x, int src_y, int width, int height);
    _IGNORE(gdk_pixbuf_get_from_surface)
 
@@ -139,10 +151,22 @@ public:
   _WRAP_CREATE(const Glib::RefPtr<Window>& src,
                int src_x, int src_y, int width, int height)
 
-   //TODO: Documentation
-   /**
-    * @newin{2,30}
-    */
+
+  /** Transfers image data from a Cairo::Surface and converts it to an RGB(A)
+   * representation inside a Gdk::Pixbuf. This allows you to efficiently read
+   * individual pixels from cairo surfaces. For Gdk::Windows, use the
+   * create() method that takes a Gdk::Window instead.
+   *
+   * This will create an RGB pixbuf with 8 bits per channel. The pixbuf will contain an alpha channel if the 
surface contains one. 
+   *
+   * @param surface Surface to copy from.
+   * @param src_x Source X coordinate within the surface.
+   * @param src_y Source Y coordinate within the surface.
+   * @param width Width in pixels of region to get.
+   * @param height Height in pixels of region to get.
+   *
+   * @newin{2,30}
+   */
   _WRAP_CREATE(const Cairo::RefPtr<Cairo::Surface>& src,
                int src_x, int src_y, int width, int height)
 


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