ruby-****@sourc*****
ruby-****@sourc*****
2013年 4月 6日 (土) 00:22:43 JST
------------------------- REMOTE_ADDR = 70.49.48.128 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-dancr-rbcatut-dwc ------------------------- @@ -276,16 +276,18 @@ linpat = Cairo::LinearPattern.new(0.25, 0.35, 0.75, 0.65) - On the image on the right you can see the line defined by end points (x1=0.25, y1=0.35) and (x2=0.75, y2=0.65). If you change the constructor parameters to define the extension axis from the top left to the bottom right corner, i.e. (x1=0, y1=0) and (x2=1, y2=1), you'd have the following change: + On the image on the right you can see the line defined by end points (x1=0.25, y1=0.35) and (x2=0.75, y2=0.65) (do not be misled by the appearance that the line ends in (x2=1,y2=1), apparently x2 and y2 act as units here.) But, if you do change the constructor parameters to define the extension axis from the top left to the bottom right corner, i.e. (x1=0, y1=0) and (x2=1, y2=1), you'd have the following change, this time a true diagonal with a different angle than on the above image: {{image_right("1203-p10-82-LinearPattern-axis-x0y1-s2.png")}} linpat = Cairo::LinearPattern.new(0, 0, 1, 1) - However, neither of these two images reveal very much about the extensions of cairo gradients, particularly, if you are interested to understand what the cairo extend mode constants defined in ((<Cairo:_:Extend module|URL:http://cairo.rubyforge.org/doc/en/cairo-extend.html#label-0>)), and explained in ((<enum cairo_extend_t|URL:http://www.cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-extend-t>)), do. As the title of this subsection (Extension Axis Of Cairo Gradients) announces we are concerned with the extension of the cairo gradient pattern. + + :Caveat + To be perfectly honest, the extension axis line behaves a bit mysterious, and I also have a few questions about it. Nevertheless, we can ignore the mystery, without jeopardizing our overall understanding of cairo gradients. {{br}} {{image_right("1203-p10-83-diff-CrExtends-4-diff-lin-patts-axis-s2.png")}}