Evas doc: Move filters examples to Lua
authorJean-Philippe Andre <jp.andre@samsung.com>
Fri, 9 May 2014 01:51:52 +0000 (10:51 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Fri, 9 May 2014 07:57:39 +0000 (16:57 +0900)
Part 1: auto-generated examples with previews

18 files changed:
doc/previews/Makefile.am
src/examples/evas/filters/filter_blend.lua [new file with mode: 0644]
src/examples/evas/filters/filter_blend.txt [deleted file]
src/examples/evas/filters/filter_blur.lua [new file with mode: 0644]
src/examples/evas/filters/filter_blur.txt [deleted file]
src/examples/evas/filters/filter_bump.lua [new file with mode: 0644]
src/examples/evas/filters/filter_bump.txt [deleted file]
src/examples/evas/filters/filter_curve.lua [new file with mode: 0644]
src/examples/evas/filters/filter_curve.txt [deleted file]
src/examples/evas/filters/filter_example_1.lua [new file with mode: 0644]
src/examples/evas/filters/filter_example_1.txt [deleted file]
src/examples/evas/filters/filter_grow.lua [new file with mode: 0644]
src/examples/evas/filters/filter_grow.txt [deleted file]
src/examples/evas/filters/filter_mask.lua [new file with mode: 0644]
src/examples/evas/filters/filter_mask.txt [deleted file]
src/examples/evas/filters/filter_transform.lua [new file with mode: 0644]
src/examples/evas/filters/filter_transform.txt [deleted file]
src/lib/evas/filters/evas_filter_parser.c

index fc5737084606f7024ca56bf6b82cd3970d175612..3b09953ac1a9b471d7adfe714391e1dd8b3a3337 100644 (file)
@@ -48,7 +48,7 @@ previews-data: preview_text_filter
                echo "  GEN      filter_$${a}.png" ; \
                FONT="Sans" ; \
                SIZE=24 ; \
-               FILTER=`cat ${top_srcdir}/src/examples/evas/filters/filter_$${a}.txt` ; \
+               FILTER=`cat ${top_srcdir}/src/examples/evas/filters/filter_$${a}.lua` ; \
                if [ -e ${top_srcdir}/doc/previews/filter_$${a}.sh ] ; then \
                        source ${top_srcdir}/doc/previews/filter_$${a}.sh ; \
                fi ; \
diff --git a/src/examples/evas/filters/filter_blend.lua b/src/examples/evas/filters/filter_blend.lua
new file mode 100644 (file)
index 0000000..3e4bde2
--- /dev/null
@@ -0,0 +1 @@
+blend ({ color = 0x3399FF })
diff --git a/src/examples/evas/filters/filter_blend.txt b/src/examples/evas/filters/filter_blend.txt
deleted file mode 100644 (file)
index 251c8c3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-blend (color = #3399FF);
\ No newline at end of file
diff --git a/src/examples/evas/filters/filter_blur.lua b/src/examples/evas/filters/filter_blur.lua
new file mode 100644 (file)
index 0000000..9723f45
--- /dev/null
@@ -0,0 +1,2 @@
+blur ({ 10, color = 'black', oy = 5, ox = 5 })
+blend ({ color = 0x3399FF })
diff --git a/src/examples/evas/filters/filter_blur.txt b/src/examples/evas/filters/filter_blur.txt
deleted file mode 100644 (file)
index 18f5c34..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-blur (10, color = black, oy = 5, ox = 5);
-blend (color = #3399FF);
diff --git a/src/examples/evas/filters/filter_bump.lua b/src/examples/evas/filters/filter_bump.lua
new file mode 100644 (file)
index 0000000..b90e594
--- /dev/null
@@ -0,0 +1,3 @@
+a = buffer ('alpha')
+blur ({ 5, dst = a })
+bump ({ map = a, compensate = true, color = 0x3399FF, specular = 10.0 })
diff --git a/src/examples/evas/filters/filter_bump.txt b/src/examples/evas/filters/filter_bump.txt
deleted file mode 100644 (file)
index 7326146..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-buffer : a (alpha);
-blur (5, dst = a);
-bump (map = a, compensate = yes, color = #3399FF, specular = 10.0);
diff --git a/src/examples/evas/filters/filter_curve.lua b/src/examples/evas/filters/filter_curve.lua
new file mode 100644 (file)
index 0000000..cc3bd00
--- /dev/null
@@ -0,0 +1,4 @@
+a = buffer ('alpha')
+blur ({ 4, dst = a })
+curve ({ points = '0:0 - 20:0 - 60:255 - 160:255 - 200:0 - 255:0', src = a, dst = a })
+blend ({ src = a, color = 'black' })
diff --git a/src/examples/evas/filters/filter_curve.txt b/src/examples/evas/filters/filter_curve.txt
deleted file mode 100644 (file)
index e2e84f7..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-buffer : a (alpha);
-blur (4, dst = a);
-curve (0:0 - 20:0 - 60:255 - 160:255 - 200:0 - 255:0, src = a, dst = a);
-blend(src = a, color = black);
\ No newline at end of file
diff --git a/src/examples/evas/filters/filter_example_1.lua b/src/examples/evas/filters/filter_example_1.lua
new file mode 100644 (file)
index 0000000..e5a2550
--- /dev/null
@@ -0,0 +1,5 @@
+fat = buffer ('alpha')
+grow ({ 8, dst = fat })
+blur ({ 12, src = fat, color = 'darkblue' })
+blur ({ 4, color = 'cyan' })
+blend ()
diff --git a/src/examples/evas/filters/filter_example_1.txt b/src/examples/evas/filters/filter_example_1.txt
deleted file mode 100644 (file)
index ed87d7e..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-buffer : fat (alpha);
-grow (8, dst = fat);
-blur (12, src = fat, color = darkblue);
-blur (4, color = cyan);
-blend ();
\ No newline at end of file
diff --git a/src/examples/evas/filters/filter_grow.lua b/src/examples/evas/filters/filter_grow.lua
new file mode 100644 (file)
index 0000000..a5935d6
--- /dev/null
@@ -0,0 +1,4 @@
+fat = buffer ('alpha')
+grow ({ 8, dst = fat })
+blend ({ src = fat, color = 'black' })
+blend ({ color = 0x3399FF })
diff --git a/src/examples/evas/filters/filter_grow.txt b/src/examples/evas/filters/filter_grow.txt
deleted file mode 100644 (file)
index 08ceb0a..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-buffer : fat (alpha);
-grow (8, dst = fat);
-blend (src = fat, color = black);
-blend (color = #3399FF);
diff --git a/src/examples/evas/filters/filter_mask.lua b/src/examples/evas/filters/filter_mask.lua
new file mode 100644 (file)
index 0000000..87d886b
--- /dev/null
@@ -0,0 +1,5 @@
+a = buffer ('alpha')
+blur ({ 6, dst = a })
+curve ({ points = '0:255 - 128:255 - 255:0', src = a, dst = a })
+blend ({ color = 'yellow' })
+mask ({ mask = a, color = 'black' })
diff --git a/src/examples/evas/filters/filter_mask.txt b/src/examples/evas/filters/filter_mask.txt
deleted file mode 100644 (file)
index 2e7434b..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-buffer: a (alpha);
-blur(6, dst = a);
-curve(points = 0:255 - 128:255 - 255:0, src = a, dst = a);
-blend(color = yellow);
-mask(mask = a, color = black);
diff --git a/src/examples/evas/filters/filter_transform.lua b/src/examples/evas/filters/filter_transform.lua
new file mode 100644 (file)
index 0000000..d332fb3
--- /dev/null
@@ -0,0 +1,4 @@
+t = buffer ('alpha')
+transform ({ oy = 20, dst = t })
+blend ({ src = t, color = 'silver' })
+blend ({ color = 'black' })
diff --git a/src/examples/evas/filters/filter_transform.txt b/src/examples/evas/filters/filter_transform.txt
deleted file mode 100644 (file)
index f16631b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-buffer : t (alpha);
-transform (oy = 20, dst = t);
-blend (src = t, color = silver);
-blend (color = black);
index 4a5a9cb7410c0975b78552366e116c806abd5f49..9ecb05ffa2d92950f6481629f5a200f33f09b294 100644 (file)
@@ -84,7 +84,7 @@
 
   Here is a simple example illustrating the syntax:
 
-  @include filter_example_1.txt
+  @include filter_example_1.lua
 
   This example will display a cyan and dark blue glow surrounding the
   main text (its color depends on the object's theme).
@@ -803,7 +803,7 @@ _blend_padding_update(Evas_Filter_Program *pgm, Evas_Filter_Instruction *instr,
 
   If @a src is an alpha buffer and @a dst is an RGBA buffer, then the @a color option should be set.
 
-  @include filter_blend.txt
+  @include filter_blend.lua
 
   <center>
   @image html filter_blend.png
@@ -923,7 +923,7 @@ _blur_padding_update(Evas_Filter_Program *pgm, Evas_Filter_Instruction *instr,
   If @a src is an alpha buffer and @a dst is an RGBA buffer, then the color option should be set.
 
   @a ox and @a oy can be used to move the blurry output by a few pixels, like a drop shadow. Example:
-  @include filter_blur.txt
+  @include filter_blur.lua
 
   <center>
   @image html filter_blur.png
@@ -985,7 +985,7 @@ _blur_instruction_prepare(Evas_Filter_Instruction *instr)
   @note As of 2014/02/11, the ALPHA to RGBA support is of much better quality than ALPHA only, but @b very slow. RGBA sources are not supported yet.
 
   Here is a full example of a very simple bevel effect:
-  @include filter_bump.txt
+  @include filter_bump.lua
 
   <center>
   @image html filter_bump.png
@@ -1052,7 +1052,7 @@ _bump_instruction_prepare(Evas_Filter_Instruction *instr)
   If ignored, y(x = 0) is 0 and y(x = 255) is 255.
 
   The following example will generate a 4px thick stroke around text letters:
-  @include filter_curve.txt
+  @include filter_curve.lua
 
   <center>
   @image html filter_curve.png
@@ -1289,7 +1289,7 @@ _grow_padding_update(Evas_Filter_Program *pgm, Evas_Filter_Instruction *instr,
   @param dst     Destination buffer for blending. This must be of same size and colorspace as @a src.
 
   Example:
-  @include filter_grow.txt
+  @include filter_grow.lua
 
   This will first grow the letters in the buffer @c input by a few pixels, and
   then draw this buffer in black in the background.
@@ -1340,7 +1340,7 @@ _grow_instruction_prepare(Evas_Filter_Instruction *instr)
   Note that @a src and @a mask are interchangeable, if they have the same dimensions.
 
   Example:
-  @include filter_mask.txt
+  @include filter_mask.lua
 
   This will create an inner shadow effect.
 
@@ -1422,7 +1422,7 @@ _transform_padding_update(Evas_Filter_Program *pgm,
   @param oy       Y offset.
 
   Example:
-  @include filter_transform.txt
+  @include filter_transform.lua
 
   This will create a mirrored text effect, for a font of 50px.