From: Matt Birkholz Date: Mon, 12 Mar 2018 16:16:01 +0000 (-0700) Subject: pango: Document ->color procedure. Pull string formats from Cairo. X-Git-Tag: mit-scheme-pucked-x11-0.2.2~49 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=067e875f3f10441126c6a94d2e494c6ff9b0cf7a;p=mit-scheme.git pango: Document ->color procedure. Pull string formats from Cairo. --- diff --git a/src/pango/pango.texi b/src/pango/pango.texi index 1d513cb7e..88660bace 100644 --- a/src/pango/pango.texi +++ b/src/pango/pango.texi @@ -366,10 +366,24 @@ thereafter signal an error. @deffn Procedure pango-color-parse string Parses @var{string} and returns a floating-vector containing four flonums between 0. and 1. inclusive: the red, green, blue and alpha -components. @var{String} can be a standard color name (per the -Cascading Style Sheetse standard) or 1-4 hex digits specifying the -intensity of the red, green and blue components: @code{"#RGB"} or -@code{"#RRGGBB"} or @code{"#RRRGGGBBB"} or @code{"#RRRRGGGGBBBB"}. +components. @var{String} should be in one of the following formats. +@itemize +@item A standard color name (per the Cascading Style Sheets standard). +@item A hex value: 'RGB', 'RRGGBB', 'RRRGGGBBB', or 'RRRRGGGGBBBB'. +@item An RGB color: 'rgb(R,G,B)' where R, G and B are decimal +numbers between 0 and 255 inclusive or percentages. +@item An RGBA color: 'rgba(R,G,B,A)' where R, G and B are numbers or +percentages as above, and A is a floating point number between 0. and +1. inclusive. +@end itemize +@end deffn + +@anchor{->color} +@deffn Procedure ->color object operator +Returns a color, else signals @code{error:wrong-type-argument} with +@var{operator}. @var{Object} should be a color, symbol or string. +Symbols and strings are converted to colors by +@bref{pango-color-parse}. @end deffn @node GNU Free Documentation License, , API Reference, Top