ruby-****@sourc*****
ruby-****@sourc*****
2013年 4月 5日 (金) 22:23:45 JST
------------------------- REMOTE_ADDR = 70.49.48.128 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-dancr-rbcatut-dwc ------------------------- @@ -267,7 +267,7 @@ :Extension Axis Of Cairo Gradients (12.3.2.1.2.A1){{br}} - The API documentation for cairo pattern constructors tell us that "a new linear gradient cairo pattern will be created along the line defined by (x0, y0) and (x1, y1)", and that "a new radial gradient pattern will be created between the two circles defined by (cx0, cy0, radius0) and (cx1, cy1, radius1)". What do these two statements actually mean one can only be sure, after some practical experimenting is done. This subsection is designed to speed up your understanding. Here, we will base our investigation of this issue, by looking only at the ((<Cairo:_:LinearPattern.new(x0,y0,x1,y1)|URL:http://cairo.rubyforge.org/doc/en/cairo-linear-pattern.html#label-3>)) constructor (for which unfortunately the only reasonable documentation can currently be found on ((<cairo_pattern_create_linear ()|URL:http://www.cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-create-linear>)).) After that you should have no trouble understanding the documentation for ((<cairo_ pattern_create_radial ()|URL:http://www.cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-create-radial>)) which too, applies to its Ruby counterpart found and also, hopefully soon, documented at ((<Cairo:_:RadialPattern.new(cx1,cy1,r1,cx2,cy2,r2)|URL:http://cairo.rubyforge.org/doc/en/cairo-radial-pattern.html#label-3>)). + The API documentation for cairo pattern constructors tell us that "a new linear gradient cairo pattern will be created along the line defined by (x0, y0) and (x1, y1)", and that "a new radial gradient pattern will be created between the two circles defined by (cx0, cy0, radius0) and (cx1, cy1, radius1)". What do these two statements actually mean one can only be sure, after some practical experimenting is done. This subsection is designed to speed up your understanding. Here, we will base our investigation of this issue, by looking only at the ((<Cairo:_:LinearPattern.new(x0,y0,x1,y1)|URL:http://cairo.rubyforge.org/doc/en/cairo-linear-pattern.html#label-3>)) constructor (for which unfortunately the only reasonable documentation can currently be found on ((<cairo_pattern_create_linear ()|URL:http://www.cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-create-linear>)).) After that you should have no trouble understanding the documentation for ((<cairo_ pattern_create_radial ()|URL:http://www.cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-create-radial>)) which too, applies to its Ruby counterpart found and also, hopefully soon, documented at ((<Cairo:_:RadialPattern.new(x1,y1,r1,x2,y2,r2)|URL:http://cairo.rubyforge.org/doc/en/cairo-radial-pattern.html#label-3>)). As you can see, in the above program example, the following "Cairo: :LinearPattern.new(x1,y1,x2,y2)" constructor is used. Obviously, the four parameters to the constructor define the line (or as I prefer to call it((*the extension axis*)) of cairo gradients) along which, the API documentation tells us, the 'linear gradient cairo pattern' will be created. This 'extension axis' is shown on the image below, on the right side next to the code segment with the constructor, as the black line: