GdkPixbuf Update

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

GdkPixbuf Update

Jake Cobb
Hello,

Filled in some blanks.  Fixed error in save() example, requires 'jpeg'
not 'jpg'.

-Jake Cobb


--- php-gtk-doc/manual/en/reference/gdk/gdkpixbuf.xml.orig 2008-04-22 09:26:47.000000000 -0400
+++ php-gtk-doc/manual/en/reference/gdk/gdkpixbuf.xml 2008-04-22 09:27:01.000000000 -0400
@@ -295,10 +295,12 @@
     </funcprototype>
    </funcsynopsis>
    <shortdesc>
-
+    Returns a new GdkPixbuf which is a copy of this one.
    </shortdesc>
-   <desc>
-
+ <desc>
+    <para>
+     Returns a new GdkPixbuf which is a copy of this one.
+    </para>
    </desc>
   </method>
 
@@ -316,10 +318,17 @@
     </funcprototype>
    </funcsynopsis>
    <shortdesc>
-
+    Copy an area into another GdkPixbuf.
    </shortdesc>
    <desc>
-
+ <para>
+     Copies a <parameter>width</parameter> by <parameter>height</parameter>
+     rectangular area of pixels from this GdkPixbuf into <parameter>dest_pixbuf</parameter>.
+     (<parameter>src_x</parameter>,<parameter>src_y</parameter>) and
+     (<parameter>dest_x</parameter>,<parameter>dest_y</parameter>) specify the
+     coordinates of the top-left corner of the source and destination rectangles,
+     respectively.
+    </para>
    </desc>
   </method>
 
@@ -444,7 +453,7 @@
    <funcsynopsis>
     <funcprototype>
      <funcdef>GdkPixbuf <function>get_from_drawable</function></funcdef>
-     <paramdef>GdkWindow <parameter>src</parameter></paramdef>
+     <paramdef>GdkDrawable <parameter>src</parameter></paramdef>
      <paramdef>GdkColormap <parameter>cmap</parameter></paramdef>
      <paramdef>int <parameter>src_x</parameter></paramdef>
      <paramdef>int <parameter>src_y</parameter></paramdef>
@@ -455,10 +464,26 @@
     </funcprototype>
    </funcsynopsis>
    <shortdesc>
-
+    Copy a rectangular area from a <classname>GdkDrawable</classname>.
    </shortdesc>
    <desc>
-
+    <para>
+     Copies a <parameter>width</parameter> by <parameter>height</parameter>
+     rectangular area of pixels from <parameter>src</parameter>.
+     (<parameter>src_x</parameter>,<parameter>src_y</parameter>) and
+     (<parameter>dest_x</parameter>,<parameter>dest_y</parameter>) specify the
+     coordinates of the top-left corner of the source and destination rectangles,
+     respectively.
+    </para>
+    <para>
+     <parameter>src</parameter> is typically a <classname>GdkDrawable</classname>
+     subclass, <classname>GdkWindow</classname> or <classname>GdkPixmap</classname>.
+     <function class="Gdk">rgb_get_colormap</function> will get the default RGB
+     colormap for <parameter>cmap</parameter>.
+    </para>
+    <para>
+     Returns the GdkPixbuf the method is called from.
+    </para>
    </desc>
   </method>
 
@@ -477,10 +502,24 @@
     </funcprototype>
    </funcsynopsis>
    <shortdesc>
-
+    Copy a rectangular area from a <classname>GdkImage</classname>.
    </shortdesc>
    <desc>
-
+    <para>
+     Copies a <parameter>width</parameter> by <parameter>height</parameter>
+     rectangular area of pixels from <parameter>src</parameter>.
+     (<parameter>src_x</parameter>,<parameter>src_y</parameter>) and
+     (<parameter>dest_x</parameter>,<parameter>dest_y</parameter>) specify the
+     coordinates of the top-left corner of the source and destination rectangles,
+     respectively.
+    </para>
+    <para>
+     <function class="Gdk">rgb_get_colormap</function> will get the default RGB
+     colormap for <parameter>cmap</parameter>.    
+    </para>
+    <para>
+     Returns the GdkPixbuf the method is called from.
+    </para>
    </desc>
   </method>
 
@@ -783,8 +822,8 @@
     </example>
     <para>
      The optional third <parameter>options</parameter> can be a list of keys
-     and values that depend on the output format. E.g., jpg has a
-     <literal>quality</literal> parameter that defines the jpg quality from
+     and values that depend on the output format. E.g., jpeg has a
+     <literal>quality</literal> parameter that defines the jpeg quality from
      <literal>0</literal> to <literal>100</literal>.
     </para>
     <example>
@@ -859,10 +898,20 @@
     </funcprototype>
    </funcsynopsis>
    <shortdesc>
-
+    Returns pixels from a rectangular area as a new GdkPixuf.
    </shortdesc>
    <desc>
-
+    <para>
+     Returns the rectangular area with corners at (<parameter>src_x</parameter>,
+     <parameter>src_y</parameter>) and (<parameter>src_x</parameter> +
+     <parameter>width</parameter>, <parameter>src_y</parameter> +
+     <parameter>height</parameter>).
+    </para>
+    <para>
+     Note that the GdkPixbuf returned by this method shares pixels with the
+     original.  It does not create copies; any changes to the subpixbuf
+     will be reflected in the original.
+    </para>
    </desc>
   </method>
 

--- php-gtk-doc/examples/reference/gdk/gdkpixbuf/save_jpg.phpw.orig 2008-04-22 09:29:06.000000000 -0400
+++ php-gtk-doc/examples/reference/gdk/gdkpixbuf/save_jpg.phpw 2008-04-22 09:29:16.000000000 -0400
@@ -6,5 +6,5 @@
 $pixbuf->fill(128, 255, 0, 255);
 
 //save it as a png file
-$pixbuf->save('green.jpg', 'jpg', array('quality' => 85));
+$pixbuf->save('green.jpg', 'jpeg', array('quality' => 85));
 ?>
\ No newline at end of file


--
PHP-GTK Documentation Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php