[Xcb] missing fields in proto/src/render.xml?

Barton C Massey bart at cs.pdx.edu
Tue Jul 22 21:07:07 PDT 2008


Thanks much for the patch!  This looks quite reasonable to
me, but I'm certainly not a RENDER expert.  Hopefully one of
them will reply. :-)

	Bart

In message <4886AC24.9040901 at mistfall.net> you wrote:
> This is a multi-part message in MIME format.
> --------------090201030504020107090901
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding: 7bit
> 
> Hi,
> 
> I'm going to use render extension's gradient from xcb.
> 
> Though the requests needed to create pictures:
>  - CreateLinearGradient
>  - CreateRadialGradient
>  - CreateConicalGradient
> are already included in xcb/proto/src/render.xml,
> their definitions lacks fields to pass list of color-stops.
> 
> 
> To create gradients with desired colors, I've tried to add
>  - a list of FIXED
> and
>  - a list of COLOR
> to arguments of xcb_render_create_*_gradient().
> (attached patch)
> 
> I've just tested xcb_render_create_linear_gradient() but
> at least it seems to be working for me.
> 
> 
> Is this correct way to add parameters?
> or there's a generic way to pass additional arrays with a request?
> 
> minami
> 
> 
> 
> --------------090201030504020107090901
> Content-Type: text/x-patch;
>  name="render.xml.diff"
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline;
>  filename="render.xml.diff"
> 
> --- render.xml.orig	2006-10-30 13:12:00.000000000 +0900
> +++ render.xml	2008-07-22 23:56:18.000000000 +0900
> @@ -525,6 +525,12 @@
>      <field type="POINTFIX" name="p1" />
>      <field type="POINTFIX" name="p2" />
>      <field type="CARD32" name="num_stops" />
> +    <list type="FIXED" name="stops">
> +      <fieldref>num_stops</fieldref>
> +    </list>
> +    <list type="COLOR" name="colors">
> +      <fieldref>num_stops</fieldref>
> +    </list>
>    </request>
>  
>    <request name="CreateRadialGradient" opcode="35">
> @@ -534,6 +540,12 @@
>      <field type="FIXED" name="inner_radius" />
>      <field type="FIXED" name="outer_radius" />
>      <field type="CARD32" name="num_stops" />
> +    <list type="FIXED" name="stops">
> +      <fieldref>num_stops</fieldref>
> +    </list>
> +    <list type="COLOR" name="colors">
> +      <fieldref>num_stops</fieldref>
> +    </list>
>    </request>
>  
>    <request name="CreateConicalGradient" opcode="36">
> @@ -541,5 +553,11 @@
>      <field type="POINTFIX" name="center" />
>      <field type="FIXED" name="angle" />        <!-- degrees -->
>      <field type="CARD32" name="num_stops" />
> +    <list type="FIXED" name="stops">
> +      <fieldref>num_stops</fieldref>
> +    </list>
> +    <list type="COLOR" name="colors">
> +      <fieldref>num_stops</fieldref>
> +    </list>
>    </request>
>  </xcb>
> 
> 
> --------------090201030504020107090901
> Content-Type: text/plain; charset="us-ascii"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
> 
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb
> --------------090201030504020107090901--


More information about the Xcb mailing list