[ruby-gnome2-doc-cvs] [Ruby-GNOME2 Project Website] update - tut-gtk2-dancr-rbcatut

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2013年 3月 27日 (水) 22:56:42 JST


-------------------------
REMOTE_ADDR = 70.49.48.128
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-dancr-rbcatut
-------------------------
@@ -585,6 +585,46 @@
 
     {{image_right("123-08-mask.png")}}
 
+    The ((<cairo_mask()|URL:http://www.cairographics.org/manual/cairo-cairo-t.html#cairo-mask>)) and ((<cairo_mask_surface()|URL:http://www.cairographics.org/manual/cairo-cairo-t.html#cairo-mask-surface>)) operations allow transfer according to the transparency/opacity of a second source pattern or surface. Where the pattern or surface is opaque, the current source is transferred to the destination. Where the pattern or surface is transparent, nothing is transferred.
+
+    :Ruby Cairo Library Fails To Support Gradients
+    (12.3.1.2.5.A1){{br}}
+
+        {{br}}{{image_right("1203-p08-mask-in-C.png")}}
+         # Your code goes between the two dashed lines:
+         # -- your code - start ----------------------------------------- -s-
+
+         linearg = Cairo.pattern_create_linear(0, 0, 1, 1)
+         linearg.add_color_stop_rgb(0, 0, 0.3, 0.8)
+         linearg.add_color_stop_rgb(1, 0, 0.8, 0.3)
+     
+         radialg = Cairo.pattern_create_radial(0.5, 0.5, 0.25, 0.5, 0.5, 0.75)
+         radialg.add_color_stop_rgba(0, 0, 0, 0, 1)
+         radialg.add_color_stop_rgba(0.5, 0, 0, 0, 0)
+     
+         cr.set_source(linearg)
+         cr.mask(radialg)
+         # -- your code - end ------------------------------------------- -e-
+
+    The above code in Ruby is completely unsupported. While ((*Cairo.pattern_create_linear*)) and ((*Cairo.pattern_create_radial*)), nor ((*Cairo::Context#add_color_stop_rgb/rgba*)) and ((*Cairo::Context#add_color_stop_rgb/rgba*)) do not exist at all, "Cairo::Context#set_source" and "Cairo::Context#mask" are not adequately documented, most likely because their parameters also are nowhere explained nor mentioned except in error messages. Namely, the line "cr.set_source(linearg)" would produce the following error message: ((*"`set_source': not a cairo pattern"*)), and the line "cr.mask(radialg): ((*"`mask': not a cairo surface".*))
+
+
+
+{{br}}
+{{br}}
+
+== Drawing with Cairo
+(12.3.2){{br}}
+
+
+
+
+
+{{br}}
+
+=== Preparing and Selecting a Source
+(12.3.2.1){{br}}
+{{image_right("1203-p09-setsourcergba-in-C.png")}}
 
 
 {{br}}




ruby-gnome2-cvs メーリングリストの案内
Back to archive index