Skip to content

Instantly share code, notes, and snippets.

@hyOzd
Created January 24, 2017 20:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hyOzd/f1c0121ff4dd38a0c856db707866182e to your computer and use it in GitHub Desktop.
Save hyOzd/f1c0121ff4dd38a0c856db707866182e to your computer and use it in GitHub Desktop.
<function name="new"
c:identifier="goo_canvas_rect_new"
introspectable="0">
<doc xml:space="preserve">Creates a new rectangle item.
&lt;!--PARAMETERS--&gt;
Here's an example showing how to create a rectangle at (100,100) with a
width of 200 and a height of 100.
&lt;informalexample&gt;&lt;programlisting&gt;
GooCanvasItem *rect = goo_canvas_rect_new (mygroup, 100.0, 100.0, 200.0, 100.0,
"stroke-color", "red",
"line-width", 5.0,
"fill-color", "blue",
NULL);
&lt;/programlisting&gt;&lt;/informalexample&gt;</doc>
<return-value transfer-ownership="full">
<doc xml:space="preserve">a new rectangle item.</doc>
<type name="CanvasItem" c:type="GooCanvasItem*"/>
</return-value>
<parameters>
<parameter name="parent" transfer-ownership="none" skip="1">
<doc xml:space="preserve">the parent item, or %NULL. If a parent is specified, it will assume
ownership of the item, and the item will automatically be freed when it is
removed from the parent. Otherwise call g_object_unref() to free it.</doc>
<type name="CanvasItem" c:type="GooCanvasItem*"/>
</parameter>
<parameter name="x" transfer-ownership="none">
<doc xml:space="preserve">the x coordinate of the left of the rectangle.</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="y" transfer-ownership="none">
<doc xml:space="preserve">the y coordinate of the top of the rectangle.</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="width" transfer-ownership="none">
<doc xml:space="preserve">the width of the rectangle.</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="height" transfer-ownership="none">
<doc xml:space="preserve">the height of the rectangle.</doc>
<type name="gdouble" c:type="gdouble"/>
</parameter>
<parameter name="..." transfer-ownership="none">
<doc xml:space="preserve">optional pairs of property names and values, and a terminating %NULL.</doc>
<varargs/>
</parameter>
</parameters>
</function>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment