gegl r2775 - in trunk/bindings/rgegl: . samples



Author: ok
Date: Mon Nov 17 00:25:22 2008
New Revision: 2775
URL: http://svn.gnome.org/viewvc/gegl?rev=2775&view=rev

Log:
* samples/render-test.rb:
* samples/view-test.rb:
* samples/xml-parsing.rb: updated samples to use the gegl: prefixed op
names.


Modified:
   trunk/bindings/rgegl/ChangeLog
   trunk/bindings/rgegl/samples/render-test.rb
   trunk/bindings/rgegl/samples/view-test.rb
   trunk/bindings/rgegl/samples/xml-parsing.rb

Modified: trunk/bindings/rgegl/samples/render-test.rb
==============================================================================
--- trunk/bindings/rgegl/samples/render-test.rb	(original)
+++ trunk/bindings/rgegl/samples/render-test.rb	Mon Nov 17 00:25:22 2008
@@ -11,10 +11,10 @@
 height=40
 
 gegl    = Gegl::Node.new
-fractal = gegl.new_child :fractal_explorer, :width=>width, :height=>height, :ncolors=>3
-contrast= gegl.new_child :threshold, :value=>0.5
-text    = gegl.new_child :text, :string=>'GEGL\n\n term', :size=>height/4
-over    = gegl.new_child :over
+fractal = gegl.new_child "gegl:fractal_explorer", :width=>width, :height=>height, :ncolors=>3
+contrast= gegl.new_child "gegl:threshold", :value=>0.5
+text    = gegl.new_child "gegl:text", :string=>'GEGL\n\n term', :size=>height/4
+over    = gegl.new_child "gegl:over"
 
 fractal >> contrast >> over
 text >> over[:aux]

Modified: trunk/bindings/rgegl/samples/view-test.rb
==============================================================================
--- trunk/bindings/rgegl/samples/view-test.rb	(original)
+++ trunk/bindings/rgegl/samples/view-test.rb	Mon Nov 17 00:25:22 2008
@@ -8,12 +8,12 @@
 
 gegl=Gegl.parse_xml(
 "<gegl>
-   <over>
-     <gaussian-blur std_dev_y='0' name='blur'/>
-     <shift x='20' y='170' name='shift'/>
-     <text string='rgegl' size='120' color='rgb(0.5,0.5,1.0)'/>
-   </over>
-   <fractal-explorer xmin='0.2' ymin='0' xmax='0.5' ymax='0.45'
+   <gegl:over>
+     <gegl:gaussian-blur std_dev_y='0' name='blur'/>
+     <gegl:shift x='20' y='170' name='shift'/>
+     <gegl:text string='rgegl' size='120' color='rgb(0.5,0.5,1.0)'/>
+   </gegl:over>
+   <gegl:fractal-explorer xmin='0.2' ymin='0' xmax='0.5' ymax='0.45'
                     width='400' height='400'/>
 </gegl>", "")
 

Modified: trunk/bindings/rgegl/samples/xml-parsing.rb
==============================================================================
--- trunk/bindings/rgegl/samples/xml-parsing.rb	(original)
+++ trunk/bindings/rgegl/samples/xml-parsing.rb	Mon Nov 17 00:25:22 2008
@@ -8,24 +8,21 @@
 
 gegl=Gegl.parse_xml(
 "<gegl>
-   <crop x='0' y='145' width='320' height='240'/>
-   <over>
-     <gaussian-blur std_dev_y='0' name='blur'/>
-     <shift x='20' y='170' name='shift'/>
-     <text string='rgegl' size='120' color='rgb(0.5,0.5,1.0)'/>
-   </over>
-   <fractal-explorer xmin='0.2' ymin='0' xmax='0.5' ymax='0.45'
+   <gegl:display name='display'/>
+   <gegl:crop x='0' y='145' width='320' height='240'/>
+   <gegl:over>
+     <gegl:gaussian-blur std_dev_y='0' name='blur'/>
+     <gegl:shift x='20' y='170' name='shift'/>
+     <gegl:text string='rgegl' size='120' color='rgb(0.5,0.5,1.0)'/>
+   </gegl:over>
+   <gegl:fractal-explorer xmin='0.2' ymin='0' xmax='0.5' ymax='0.45'
                     width='320' height='400'/>
 </gegl>", "")
 
-display = gegl.new_child :display
-gegl >> display
-
 frames=50
 frames.times do |frame|
   t = 1.0*frame/frames
-  puts t
-#  gegl.lookup("blur").std_dev_x = t * 20.0
+  gegl.lookup("blur").std_dev_x = t * 20.0
   gegl.lookup("shift").y       =  t * 200
-  display.process
+  gegl.lookup("display").process
 end



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]