On Wed, Jan 11, 2012 at 12:28 PM, Anurag Priyam
<[email protected]> wrote:
> gears.color: expose documentation for create_(linear|radial)_pattern functions

Spotted a few more quirks in gears.color's documentation when looking
for a way to define gradients for graph and progressbar widgets:

1. 0002-gears.colors-docs-fix-pattern-string-used-in-the-exa.patch

gears.colors() docs: fix pattern string used in the example

In general, patterns are specified as 'type:arguments', where 'arguments' is
specific to the pattern used.  The example provided in the documentation,
defined the pattern type to be 'linear', but used arguments meant to create
radial pattern.  So we modify the example to use the correct type -- 'radial'.
[...]

2. 0003-gears.color-docs-replace-literal-and-with-respective.patch

gears.color docs: replace literal '<' and '>' with respective HTML entities

Luadoc confuses '<stop>' with an HTML tag otherwise.
[...]

Both the patches are based off the one in the previous mail. Though,
they should apply cleanly in any order.

-- 
Anurag Priyam
From 43fca38aa71ec42660f2a08efca09c548e874082 Mon Sep 17 00:00:00 2001
From: Anurag Priyam <[email protected]>
Date: Wed, 11 Jan 2012 15:18:35 +0530
Subject: [PATCH 2/3] gears.colors() docs: fix pattern string used in the
 example

In general, patterns are specified as 'type:arguments', where 'arguments' is
specific to the pattern used.  The example provided in the documentation,
defined the pattern type to be 'linear', but used arguments meant to create
radial pattern.  So we modify the example to use the correct type -- 'radial'.

Signed-off-by: Anurag Priyam <[email protected]>
---
 lib/gears/color.lua.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/gears/color.lua.in b/lib/gears/color.lua.in
index 6b1c7e4..266b162 100644
--- a/lib/gears/color.lua.in
+++ b/lib/gears/color.lua.in
@@ -130,7 +130,7 @@ types = {
 -- This function can create solid, linear, radial and png patterns. In general,
 -- patterns are specified as "type:arguments". "arguments" is specific to the
 -- pattern used. For example, one can use
--- "linear:50,50,10:55,55,30:0,#ff0000:0.5,#00ff00:1,#0000ff"
+-- "radial:50,50,10:55,55,30:0,#ff0000:0.5,#00ff00:1,#0000ff"
 -- Any argument that cannot be understood is passed to create_solid_pattern().
 -- @see create_solid_pattern, create_png_pattern, create_linear_pattern,
 --      create_radial_pattern
-- 
1.7.8.2

From e5c69379a05e715a599ae880a3ef3d2103302b36 Mon Sep 17 00:00:00 2001
From: Anurag Priyam <[email protected]>
Date: Wed, 11 Jan 2012 15:44:26 +0530
Subject: [PATCH 3/3] gears.color docs: replace literal '<' and '>' with
 respective HTML entities

Luadoc confuses '<stop>' with an HTML tag otherwise.

Signed-off-by: Anurag Priyam <[email protected]>
---
 lib/gears/color.lua.in |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/gears/color.lua.in b/lib/gears/color.lua.in
index 266b162..9b0a992 100644
--- a/lib/gears/color.lua.in
+++ b/lib/gears/color.lua.in
@@ -81,9 +81,9 @@ end
 
 --- Create a linear pattern object.
 -- The pattern is created from a string. This string should have the following
--- form: "x0,y0:x1,y1:<stops>"
+-- form: "x0,y0:x1,y1:&#60;stops&#62;"
 -- x0,y0 and x1,y1 are the start and stop point of the pattern.
--- For the explanation of "<stops>", see add_stops().
+-- For the explanation of "&#60;stops&#62;", see add_stops().
 -- @param arg The argument describing the pattern
 -- @return a cairo pattern object
 -- @name create_linear_pattern
@@ -91,10 +91,10 @@ end
 
 --- Create a radial pattern object.
 -- The pattern is created from a string. This string should have the following
--- form: "x0,y0,r0:x1,y1,r1:<stops>"
+-- form: "x0,y0,r0:x1,y1,r1:&#60stops&#62"
 -- x0,y0 and x1,y1 are the start and stop point of the pattern.
 -- r0 and r1 are the radii of the start / stop circle.
--- For the explanation of "<stops>", see add_stops().
+-- For the explanation of "&#60stops&#62", see add_stops().
 -- @param arg The argument describing the pattern
 -- @return a cairo pattern object
 -- @name create_radial_pattern
-- 
1.7.8.2

Reply via email to