[PATCH] Document invalid nStop value

Soeren Sandmann sandmann at daimi.au.dk
Wed Nov 3 18:50:38 PDT 2010


Andrea Canciani <ranma42 at gmail.com> writes:

> Gradients must have at least one stop.
> ---
>  renderproto.txt |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/renderproto.txt b/renderproto.txt
> index 9f1f231..f6a9884 100644
> --- a/renderproto.txt
> +++ b/renderproto.txt
> @@ -1089,6 +1089,8 @@ CreateLinearGradient
>  	The gradient has nstops stop points between 0 and 1, each
>  	having a stop color defined in stop_colors.
>  
> +	If nStop is 0, a Value error is generated.
> +

It's probably better to use the "nstops" spelling like the rest of the
protocol spec.

Also, while the change to allow one-stop gradients is good, shouldn't
the spec say what actually happens in that case?


Soren


More information about the xorg-devel mailing list