<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="gsk4-GskRoundedRect">
<refmeta>
<refentrytitle role="top_of_page" id="gsk4-GskRoundedRect.top_of_page">GskRoundedRect</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GSK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GskRoundedRect</refname>
<refpurpose>A rounded rectangle</refpurpose>
</refnamediv>

<refsect1 id="gsk4-GskRoundedRect.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="GSK-ROUNDED-RECT-INIT:CAPS">GSK_ROUNDED_RECT_INIT</link><phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GskRoundedRect"><returnvalue>GskRoundedRect</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gsk-rounded-rect-init">gsk_rounded_rect_init</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GskRoundedRect"><returnvalue>GskRoundedRect</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gsk-rounded-rect-init-copy">gsk_rounded_rect_init_copy</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GskRoundedRect"><returnvalue>GskRoundedRect</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gsk-rounded-rect-init-from-rect">gsk_rounded_rect_init_from_rect</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GskRoundedRect"><returnvalue>GskRoundedRect</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gsk-rounded-rect-normalize">gsk_rounded_rect_normalize</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GskRoundedRect"><returnvalue>GskRoundedRect</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gsk-rounded-rect-offset">gsk_rounded_rect_offset</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GskRoundedRect"><returnvalue>GskRoundedRect</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gsk-rounded-rect-shrink">gsk_rounded_rect_shrink</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gsk-rounded-rect-is-rectilinear">gsk_rounded_rect_is_rectilinear</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gsk-rounded-rect-contains-point">gsk_rounded_rect_contains_point</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gsk-rounded-rect-contains-rect">gsk_rounded_rect_contains_rect</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gsk-rounded-rect-intersects-rect">gsk_rounded_rect_intersects_rect</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="gsk4-GskRoundedRect.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="GskCorner">GskCorner</link></entry></row>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="GskRoundedRect">GskRoundedRect</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>


<refsect1 id="gsk4-GskRoundedRect.description" role="desc">
<title role="desc.title">Description</title>
<para><link linkend="GskRoundedRect"><type>GskRoundedRect</type></link> defines a rectangle with rounded corners, as is commonly
used in drawing.</para>
<para>Operations on a <link linkend="GskRoundedRect"><type>GskRoundedRect</type></link> will normalize the rectangle, to
ensure that the bounds are normalized and that the corner sizes don't exceed
the size of the rectangle. The algorithm used for normalizing corner sizes
is described in <ulink url="https://drafts.csswg.org/css-backgrounds-3/#border-radius">the CSS specification</ulink>.</para>

</refsect1>
<refsect1 id="gsk4-GskRoundedRect.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="GSK-ROUNDED-RECT-INIT:CAPS" role="macro">
<title>GSK_ROUNDED_RECT_INIT()</title>
<indexterm zone="GSK-ROUNDED-RECT-INIT:CAPS"><primary>GSK_ROUNDED_RECT_INIT</primary></indexterm>
<programlisting language="C">#define             GSK_ROUNDED_RECT_INIT(_x,_y,_w,_h)</programlisting>
<para>Initializes a <link linkend="GskRoundedRect"><type>GskRoundedRect</type></link> when declaring it.
All corner sizes will be initialized to 0.</para>
<refsect3 id="GSK-ROUNDED-RECT-INIT.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>_x</para></entry>
<entry role="parameter_description"><para>the X coordinate of the origin</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>_y</para></entry>
<entry role="parameter_description"><para>the Y coordinate of the origin</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>_w</para></entry>
<entry role="parameter_description"><para>the width</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>_h</para></entry>
<entry role="parameter_description"><para>the height</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gsk-rounded-rect-init" role="function">
<title>gsk_rounded_rect_init&#160;()</title>
<indexterm zone="gsk-rounded-rect-init"><primary>gsk_rounded_rect_init</primary></indexterm>
<programlisting language="C"><link linkend="GskRoundedRect"><returnvalue>GskRoundedRect</returnvalue></link>&#160;*
gsk_rounded_rect_init (<parameter><link linkend="GskRoundedRect"><type>GskRoundedRect</type></link> *self</parameter>,
                       <parameter>const <link linkend="graphene-rect-t"><type>graphene_rect_t</type></link> *bounds</parameter>,
                       <parameter>const <link linkend="graphene-size-t"><type>graphene_size_t</type></link> *top_left</parameter>,
                       <parameter>const <link linkend="graphene-size-t"><type>graphene_size_t</type></link> *top_right</parameter>,
                       <parameter>const <link linkend="graphene-size-t"><type>graphene_size_t</type></link> *bottom_right</parameter>,
                       <parameter>const <link linkend="graphene-size-t"><type>graphene_size_t</type></link> *bottom_left</parameter>);</programlisting>
<para>Initializes the given <link linkend="GskRoundedRect"><type>GskRoundedRect</type></link> with the given values.</para>
<para>This function will implicitly normalize the <link linkend="GskRoundedRect"><type>GskRoundedRect</type></link>
before returning.</para>
<refsect3 id="gsk-rounded-rect-init.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>The <link linkend="GskRoundedRect"><type>GskRoundedRect</type></link> to initialize</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>bounds</para></entry>
<entry role="parameter_description"><para>a <link linkend="graphene-rect-t"><type>graphene_rect_t</type></link> describing the bounds</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>top_left</para></entry>
<entry role="parameter_description"><para>the rounding radius of the top left corner</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>top_right</para></entry>
<entry role="parameter_description"><para>the rounding radius of the top right corner</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>bottom_right</para></entry>
<entry role="parameter_description"><para>the rounding radius of the bottom right corner</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>bottom_left</para></entry>
<entry role="parameter_description"><para>the rounding radius of the bottom left corner</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gsk-rounded-rect-init.returns" role="returns">
<title>Returns</title>
<para>the initialized rectangle. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gsk-rounded-rect-init-copy" role="function">
<title>gsk_rounded_rect_init_copy&#160;()</title>
<indexterm zone="gsk-rounded-rect-init-copy"><primary>gsk_rounded_rect_init_copy</primary></indexterm>
<programlisting language="C"><link linkend="GskRoundedRect"><returnvalue>GskRoundedRect</returnvalue></link>&#160;*
gsk_rounded_rect_init_copy (<parameter><link linkend="GskRoundedRect"><type>GskRoundedRect</type></link> *self</parameter>,
                            <parameter>const <link linkend="GskRoundedRect"><type>GskRoundedRect</type></link> *src</parameter>);</programlisting>
<para>Initializes <parameter>self</parameter>
 using the given <parameter>src</parameter>
 rectangle.</para>
<para>This function will not normalize the <link linkend="GskRoundedRect"><type>GskRoundedRect</type></link>, so
make sure the source is normalized.</para>
<refsect3 id="gsk-rounded-rect-init-copy.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GskRoundedRect"><type>GskRoundedRect</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>src</para></entry>
<entry role="parameter_description"><para>a <link linkend="GskRoundedRect"><type>GskRoundedRect</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gsk-rounded-rect-init-copy.returns" role="returns">
<title>Returns</title>
<para>the initialized rectangle. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gsk-rounded-rect-init-from-rect" role="function">
<title>gsk_rounded_rect_init_from_rect&#160;()</title>
<indexterm zone="gsk-rounded-rect-init-from-rect"><primary>gsk_rounded_rect_init_from_rect</primary></indexterm>
<programlisting language="C"><link linkend="GskRoundedRect"><returnvalue>GskRoundedRect</returnvalue></link>&#160;*
gsk_rounded_rect_init_from_rect (<parameter><link linkend="GskRoundedRect"><type>GskRoundedRect</type></link> *self</parameter>,
                                 <parameter>const <link linkend="graphene-rect-t"><type>graphene_rect_t</type></link> *bounds</parameter>,
                                 <parameter><link linkend="float"><type>float</type></link> radius</parameter>);</programlisting>
<para>Initializes <parameter>self</parameter>
 to the given <parameter>bounds</parameter>
 and sets the radius of all
four corners to <parameter>radius</parameter>
.</para>
<refsect3 id="gsk-rounded-rect-init-from-rect.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GskRoundedRect"><type>GskRoundedRect</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>bounds</para></entry>
<entry role="parameter_description"><para>a <link linkend="graphene-rect-t"><type>graphene_rect_t</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>radius</para></entry>
<entry role="parameter_description"><para>the border radius</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gsk-rounded-rect-init-from-rect.returns" role="returns">
<title>Returns</title>
<para>the initialized rectangle. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gsk-rounded-rect-normalize" role="function">
<title>gsk_rounded_rect_normalize&#160;()</title>
<indexterm zone="gsk-rounded-rect-normalize"><primary>gsk_rounded_rect_normalize</primary></indexterm>
<programlisting language="C"><link linkend="GskRoundedRect"><returnvalue>GskRoundedRect</returnvalue></link>&#160;*
gsk_rounded_rect_normalize (<parameter><link linkend="GskRoundedRect"><type>GskRoundedRect</type></link> *self</parameter>);</programlisting>
<para>Normalizes the passed rectangle.</para>
<para>this function will ensure that the bounds of the rectangle are normalized
and ensure that the corner values are positive and the corners do not overlap.</para>
<refsect3 id="gsk-rounded-rect-normalize.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GskRoundedRect"><type>GskRoundedRect</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gsk-rounded-rect-normalize.returns" role="returns">
<title>Returns</title>
<para>the normalized rectangle. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gsk-rounded-rect-offset" role="function">
<title>gsk_rounded_rect_offset&#160;()</title>
<indexterm zone="gsk-rounded-rect-offset"><primary>gsk_rounded_rect_offset</primary></indexterm>
<programlisting language="C"><link linkend="GskRoundedRect"><returnvalue>GskRoundedRect</returnvalue></link>&#160;*
gsk_rounded_rect_offset (<parameter><link linkend="GskRoundedRect"><type>GskRoundedRect</type></link> *self</parameter>,
                         <parameter><link linkend="float"><type>float</type></link> dx</parameter>,
                         <parameter><link linkend="float"><type>float</type></link> dy</parameter>);</programlisting>
<para>Offsets the bound's origin by <parameter>dx</parameter>
 and <parameter>dy</parameter>
.</para>
<para>The size and corners of the rectangle are unchanged.</para>
<refsect3 id="gsk-rounded-rect-offset.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GskRoundedRect"><type>GskRoundedRect</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>dx</para></entry>
<entry role="parameter_description"><para>the horizontal offset</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>dy</para></entry>
<entry role="parameter_description"><para>the vertical offset</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gsk-rounded-rect-offset.returns" role="returns">
<title>Returns</title>
<para>the offset rectangle. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gsk-rounded-rect-shrink" role="function">
<title>gsk_rounded_rect_shrink&#160;()</title>
<indexterm zone="gsk-rounded-rect-shrink"><primary>gsk_rounded_rect_shrink</primary></indexterm>
<programlisting language="C"><link linkend="GskRoundedRect"><returnvalue>GskRoundedRect</returnvalue></link>&#160;*
gsk_rounded_rect_shrink (<parameter><link linkend="GskRoundedRect"><type>GskRoundedRect</type></link> *self</parameter>,
                         <parameter><link linkend="float"><type>float</type></link> top</parameter>,
                         <parameter><link linkend="float"><type>float</type></link> right</parameter>,
                         <parameter><link linkend="float"><type>float</type></link> bottom</parameter>,
                         <parameter><link linkend="float"><type>float</type></link> left</parameter>);</programlisting>
<para>Shrinks (or grows) the given rectangle by moving the 4 sides
according to the offsets given. The corner radii will be changed
in a way that tries to keep the center of the corner circle intact.
This emulates CSS behavior.</para>
<para>This function also works for growing rectangles if you pass
negative values for the <parameter>top</parameter>
, <parameter>right</parameter>
, <parameter>bottom</parameter>
 or <parameter>left</parameter>
.</para>
<refsect3 id="gsk-rounded-rect-shrink.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>The <link linkend="GskRoundedRect"><type>GskRoundedRect</type></link> to shrink or grow</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>top</para></entry>
<entry role="parameter_description"><para>How far to move the top side downwards</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>right</para></entry>
<entry role="parameter_description"><para>How far to move the right side to the left</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>bottom</para></entry>
<entry role="parameter_description"><para>How far to move the bottom side upwards</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>left</para></entry>
<entry role="parameter_description"><para>How far to move the left side to the right</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gsk-rounded-rect-shrink.returns" role="returns">
<title>Returns</title>
<para>the resized <link linkend="GskRoundedRect"><type>GskRoundedRect</type></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gsk-rounded-rect-is-rectilinear" role="function">
<title>gsk_rounded_rect_is_rectilinear&#160;()</title>
<indexterm zone="gsk-rounded-rect-is-rectilinear"><primary>gsk_rounded_rect_is_rectilinear</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gsk_rounded_rect_is_rectilinear (<parameter>const <link linkend="GskRoundedRect"><type>GskRoundedRect</type></link> *self</parameter>);</programlisting>
<para>Checks if all corners of <parameter>self</parameter>
 are right angles and the
rectangle covers all of its bounds.</para>
<para>This information can be used to decide if <link linkend="gsk-clip-node-new"><function>gsk_clip_node_new()</function></link>
or <link linkend="gsk-rounded-clip-node-new"><function>gsk_rounded_clip_node_new()</function></link> should be called.</para>
<refsect3 id="gsk-rounded-rect-is-rectilinear.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>the <link linkend="GskRoundedRect"><type>GskRoundedRect</type></link> to check</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gsk-rounded-rect-is-rectilinear.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the rectangle is rectilinear</para>
</refsect3></refsect2>
<refsect2 id="gsk-rounded-rect-contains-point" role="function">
<title>gsk_rounded_rect_contains_point&#160;()</title>
<indexterm zone="gsk-rounded-rect-contains-point"><primary>gsk_rounded_rect_contains_point</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gsk_rounded_rect_contains_point (<parameter>const <link linkend="GskRoundedRect"><type>GskRoundedRect</type></link> *self</parameter>,
                                 <parameter>const <link linkend="graphene-point-t"><type>graphene_point_t</type></link> *point</parameter>);</programlisting>
<para>Checks if the given <parameter>point</parameter>
 is inside the rounded rectangle. This function
returns <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if the point is in the rounded corner areas.</para>
<refsect3 id="gsk-rounded-rect-contains-point.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GskRoundedRect"><type>GskRoundedRect</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>point</para></entry>
<entry role="parameter_description"><para>the point to check</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gsk-rounded-rect-contains-point.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the <parameter>point</parameter>
is inside the rounded rectangle</para>
</refsect3></refsect2>
<refsect2 id="gsk-rounded-rect-contains-rect" role="function">
<title>gsk_rounded_rect_contains_rect&#160;()</title>
<indexterm zone="gsk-rounded-rect-contains-rect"><primary>gsk_rounded_rect_contains_rect</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gsk_rounded_rect_contains_rect (<parameter>const <link linkend="GskRoundedRect"><type>GskRoundedRect</type></link> *self</parameter>,
                                <parameter>const <link linkend="graphene-rect-t"><type>graphene_rect_t</type></link> *rect</parameter>);</programlisting>
<para>Checks if the given <parameter>rect</parameter>
 is contained inside the rounded rectangle.
This function returns <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if <parameter>rect</parameter>
 extends into one of the rounded
corner areas.</para>
<refsect3 id="gsk-rounded-rect-contains-rect.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GskRoundedRect"><type>GskRoundedRect</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>rect</para></entry>
<entry role="parameter_description"><para>the rectangle to check</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gsk-rounded-rect-contains-rect.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the <parameter>rect</parameter>
is fully contained inside the rounded rectangle</para>
</refsect3></refsect2>
<refsect2 id="gsk-rounded-rect-intersects-rect" role="function">
<title>gsk_rounded_rect_intersects_rect&#160;()</title>
<indexterm zone="gsk-rounded-rect-intersects-rect"><primary>gsk_rounded_rect_intersects_rect</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gsk_rounded_rect_intersects_rect (<parameter>const <link linkend="GskRoundedRect"><type>GskRoundedRect</type></link> *self</parameter>,
                                  <parameter>const <link linkend="graphene-rect-t"><type>graphene_rect_t</type></link> *rect</parameter>);</programlisting>
<para>Checks if part of the given <parameter>rect</parameter>
 is contained inside the rounded rectangle.
This function returns <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if <parameter>rect</parameter>
 only extends into one of the rounded
corner areas but not into the rounded rectangle itself.</para>
<refsect3 id="gsk-rounded-rect-intersects-rect.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GskRoundedRect"><type>GskRoundedRect</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>rect</para></entry>
<entry role="parameter_description"><para>the rectangle to check</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gsk-rounded-rect-intersects-rect.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the <parameter>rect</parameter>
intersects with the rounded rectangle</para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="gsk4-GskRoundedRect.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GskCorner" role="enum">
<title>enum GskCorner</title>
<indexterm zone="GskCorner"><primary>GskCorner</primary></indexterm>
<para>The corner indices used by <link linkend="GskRoundedRect"><type>GskRoundedRect</type></link>.</para>
<refsect3 id="GskCorner.members" role="enum_members">
<title>Members</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="enum_members_name" colwidth="300px"/>
<colspec colname="enum_members_description"/>
<colspec colname="enum_members_annotations" colwidth="200px"/>
<tbody>
<row role="constant"><entry role="enum_member_name"><para id="GSK-CORNER-TOP-LEFT:CAPS">GSK_CORNER_TOP_LEFT</para></entry>
<entry role="enum_member_description"><para>The top left corner</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GSK-CORNER-TOP-RIGHT:CAPS">GSK_CORNER_TOP_RIGHT</para></entry>
<entry role="enum_member_description"><para>The top right corner</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GSK-CORNER-BOTTOM-RIGHT:CAPS">GSK_CORNER_BOTTOM_RIGHT</para></entry>
<entry role="enum_member_description"><para>The bottom right corner</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GSK-CORNER-BOTTOM-LEFT:CAPS">GSK_CORNER_BOTTOM_LEFT</para></entry>
<entry role="enum_member_description"><para>The bottom left corner</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="GskRoundedRect" role="struct">
<title>struct GskRoundedRect</title>
<indexterm zone="GskRoundedRect"><primary>GskRoundedRect</primary></indexterm>
<programlisting language="C">struct GskRoundedRect {
  graphene_rect_t bounds;

  graphene_size_t corner[4];
};
</programlisting>
<para>A rectangular region with rounded corners.</para>
<para>Application code should normalize rectangles using <link linkend="gsk-rounded-rect-normalize"><function>gsk_rounded_rect_normalize()</function></link>;
this function will ensure that the bounds of the rectangle are normalized
and ensure that the corner values are positive and the corners do not overlap.
All functions taking a <link linkend="GskRoundedRect"><type>GskRoundedRect</type></link> as an argument will internally operate on
a normalized copy; all functions returning a <link linkend="GskRoundedRect"><type>GskRoundedRect</type></link> will always return
a normalized one.</para>
<refsect3 id="GskRoundedRect.members" role="struct_members">
<title>Members</title>
<informaltable role="struct_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="struct_members_name" colwidth="300px"/>
<colspec colname="struct_members_description"/>
<colspec colname="struct_members_annotations" colwidth="200px"/>
<tbody>
<row role="member"><entry role="struct_member_name"><para><link linkend="graphene-rect-t"><type>graphene_rect_t</type></link>&#160;<structfield id="GskRoundedRect.bounds">bounds</structfield>;</para></entry>
<entry role="struct_member_description"><para>the bounds of the rectangle</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="graphene-size-t"><type>graphene_size_t</type></link>&#160;<structfield id="GskRoundedRect.corner">corner</structfield>[4];</para></entry>
<entry role="struct_member_description"><para>the size of the 4 rounded corners</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3>
</refsect2>

</refsect1>

</refentry>
