rmagick 1.14.1 → 1.15.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rmagick might be problematic. Click here for more details.

Files changed (66) hide show
  1. data/ChangeLog +22 -0
  2. data/README.html +11 -63
  3. data/README.txt +8 -56
  4. data/configure +214 -787
  5. data/configure.ac +22 -24
  6. data/doc/comtasks.html +2 -2
  7. data/doc/constants.html +5 -6
  8. data/doc/draw.html +33 -14
  9. data/doc/ex/clip_path.rb +3 -0
  10. data/doc/ex/path.rb +1 -1
  11. data/doc/ex/polaroid.rb +23 -0
  12. data/doc/ex/tspan01.rb +2 -2
  13. data/doc/ex/tspan02.rb +2 -2
  14. data/doc/ex/tspan03.rb +3 -3
  15. data/doc/ex/wet_floor.rb +54 -0
  16. data/doc/ilist.html +83 -4
  17. data/doc/image1.html +4 -5
  18. data/doc/image2.html +395 -266
  19. data/doc/image3.html +104 -8
  20. data/doc/imageattrs.html +2 -2
  21. data/doc/imusage.html +2 -2
  22. data/doc/index.html +22 -18
  23. data/doc/info.html +28 -6
  24. data/doc/magick.html +125 -4
  25. data/doc/optequiv.html +196 -21
  26. data/doc/rvg.html +2 -2
  27. data/doc/rvgclip.html +2 -2
  28. data/doc/rvggroup.html +2 -2
  29. data/doc/rvgimage.html +2 -2
  30. data/doc/rvgpattern.html +2 -2
  31. data/doc/rvgshape.html +2 -2
  32. data/doc/rvgstyle.html +2 -2
  33. data/doc/rvgtext.html +2 -2
  34. data/doc/rvgtspan.html +2 -2
  35. data/doc/rvgtut.html +3 -3
  36. data/doc/rvguse.html +2 -2
  37. data/doc/rvgxform.html +2 -2
  38. data/doc/struct.html +2 -2
  39. data/doc/usage.html +26 -5
  40. data/ext/RMagick/MANIFEST +3 -1
  41. data/ext/RMagick/rmagick.h +46 -12
  42. data/ext/RMagick/rmagick_config.h.in +12 -2
  43. data/ext/RMagick/rmdraw.c +202 -62
  44. data/ext/RMagick/rmfill.c +36 -36
  45. data/ext/RMagick/rmilist.c +75 -31
  46. data/ext/RMagick/rmimage.c +640 -323
  47. data/ext/RMagick/rminfo.c +76 -15
  48. data/ext/RMagick/rmmain.c +107 -30
  49. data/ext/RMagick/rmutil.c +97 -68
  50. data/lib/RMagick.rb +11 -11
  51. data/lib/rvg/clippath.rb +38 -36
  52. data/lib/rvg/container.rb +120 -118
  53. data/lib/rvg/deep_equal.rb +44 -42
  54. data/lib/rvg/describable.rb +49 -47
  55. data/lib/rvg/embellishable.rb +399 -397
  56. data/lib/rvg/misc.rb +613 -603
  57. data/lib/rvg/paint.rb +38 -36
  58. data/lib/rvg/pathdata.rb +124 -122
  59. data/lib/rvg/rvg.rb +202 -198
  60. data/lib/rvg/stretchable.rb +132 -130
  61. data/lib/rvg/stylable.rb +101 -99
  62. data/lib/rvg/text.rb +173 -171
  63. data/lib/rvg/transformable.rb +120 -118
  64. data/lib/rvg/units.rb +60 -58
  65. data/rmagick.gemspec +1 -1
  66. metadata +5 -3
@@ -1,185 +1,187 @@
1
1
  #--
2
- # $Id: text.rb,v 1.4 2005/12/31 14:41:04 rmagick Exp $
3
- # Copyright (C) 2006 Timothy P. Hunter
2
+ # $Id: text.rb,v 1.5 2007/01/20 17:39:50 rmagick Exp $
3
+ # Copyright (C) 2007 Timothy P. Hunter
4
4
  #++
5
5
  # Text-related classes
6
6
 
7
- class Magick::RVG
8
-
9
- # Base class for Tspan, Tref and Text.
10
- class TextBase
11
- include Stylable
12
- include Duplicatable
13
-
14
- private
15
-
16
- def initialize(text, &block) #:nodoc:
17
- super()
18
- @text = text.to_s if text
19
- @dx = @dy = 0
20
- @rotation = 0
21
- @tspans = Content.new
22
- yield(self) if block_given?
23
- end
24
-
25
- public
26
-
27
- # Create a new text chunk. Each chunk can have its own initial position and styles.
28
- # If <tt>x</tt> and <tt>y</tt> are omitted the text starts at the current text
29
- # position.
30
- def tspan(text, x=nil, y=nil)
31
- tspan = Tspan.new(text, x, y)
32
- tspan.parent = self
33
- @tspans << tspan
34
- return tspan
35
- end
36
-
37
- # Add <tt>x</tt> and <tt>y</tt> to the current text position.
38
- def d(x, y=0)
39
- @dx, @dy = Magick::RVG.convert_to_float(x, y)
40
- yield(self) if block_given?
41
- self
42
- end
43
-
44
- # Rotate the text about the current text position.
45
- def rotate(degrees)
46
- @rotation = Magick::RVG.convert_to_float(degrees)[0]
47
- yield(self) if block_given?
48
- self
49
- end
50
-
51
- # We do our own transformations.
52
- def add_primitives(gc) #:nodoc:
53
- if @text || @tspans.length > 0
54
- gc.push
55
- x = self.cx + @dx
56
- y = self.cy + @dy
57
- if @rotation != 0
58
- gc.translate(x, y)
59
- gc.rotate(@rotation)
60
- gc.translate(-x, -y)
61
- end
62
- add_style_primitives(gc)
63
- if @text
64
- x2, y2 = gc.text(x, y, @text)
65
- self.cx = x + x2
66
- self.cy = y + y2
67
- end
68
- @tspans.each do |tspan|
69
- tspan.add_primitives(gc)
7
+ module Magick
8
+ class RVG
9
+
10
+ # Base class for Tspan, Tref and Text.
11
+ class TextBase
12
+ include Stylable
13
+ include Duplicatable
14
+
15
+ private
16
+
17
+ def initialize(text, &block) #:nodoc:
18
+ super()
19
+ @text = text.to_s if text
20
+ @dx = @dy = 0
21
+ @rotation = 0
22
+ @tspans = Content.new
23
+ yield(self) if block_given?
24
+ end
25
+
26
+ public
27
+
28
+ # Create a new text chunk. Each chunk can have its own initial position and styles.
29
+ # If <tt>x</tt> and <tt>y</tt> are omitted the text starts at the current text
30
+ # position.
31
+ def tspan(text, x=nil, y=nil)
32
+ tspan = Tspan.new(text, x, y)
33
+ tspan.parent = self
34
+ @tspans << tspan
35
+ return tspan
36
+ end
37
+
38
+ # Add <tt>x</tt> and <tt>y</tt> to the current text position.
39
+ def d(x, y=0)
40
+ @dx, @dy = Magick::RVG.convert_to_float(x, y)
41
+ yield(self) if block_given?
42
+ self
43
+ end
44
+
45
+ # Rotate the text about the current text position.
46
+ def rotate(degrees)
47
+ @rotation = Magick::RVG.convert_to_float(degrees)[0]
48
+ yield(self) if block_given?
49
+ self
50
+ end
51
+
52
+ # We do our own transformations.
53
+ def add_primitives(gc) #:nodoc:
54
+ if @text || @tspans.length > 0
55
+ gc.push
56
+ x = self.cx + @dx
57
+ y = self.cy + @dy
58
+ if @rotation != 0
59
+ gc.translate(x, y)
60
+ gc.rotate(@rotation)
61
+ gc.translate(-x, -y)
62
+ end
63
+ add_style_primitives(gc)
64
+ if @text
65
+ x2, y2 = gc.text(x, y, @text)
66
+ self.cx = x + x2
67
+ self.cy = y + y2
68
+ end
69
+ @tspans.each do |tspan|
70
+ tspan.add_primitives(gc)
71
+ end
72
+ gc.pop
70
73
  end
71
- gc.pop
72
74
  end
73
- end
74
-
75
- end # class TextBase
76
-
77
- # Tspan and Tref shared methods - read/update @cx, @cy in parent Text object.
78
- module TextLink #:nodoc:
79
-
80
- def add_primitives(gc)
81
- @parent.cx = @x if @x
82
- @parent.cy = @y if @y
83
- super
84
- end
85
-
86
- def cx()
87
- @parent.cx
88
- end
89
-
90
- def cy()
91
- @parent.cy
92
- end
93
-
94
- def cx=(x)
95
- @parent.cx = x
96
- end
97
-
98
- def cy=(y)
99
- @parent.cy = y
100
- end
101
-
102
- end # module TextLink
103
-
104
-
105
- class Tref < TextBase #:nodoc:
106
- include TextLink
107
-
108
- def initialize(obj, x, y, parent)
109
- @x, @y = Magick::RVG.convert_to_float(x, y, :allow_nil)
110
- super(nil)
111
- @tspans << obj
112
- @parent = parent
113
- end
114
-
115
- end # class Tref
116
-
117
- class Tspan < TextBase #:nodoc:
118
- include TextLink
119
-
120
- attr_accessor :parent
121
-
122
- # Define a text segment starting at (<tt>x</tt>, <tt>y</tt>).
123
- # If <tt>x</tt> and <tt>y</tt> are omitted the segment starts
124
- # at the current text position.
125
- #
126
- # Tspan objects can contain Tspan objects.
127
- def initialize(text=nil, x=nil, y=nil, &block)
128
- @x, @y = Magick::RVG.convert_to_float(x, y, :allow_nil)
129
- super(text, &block)
130
- end
131
-
132
- end # class Tspan
133
-
134
- class Text < TextBase
135
-
136
- attr_accessor :cx, :cy #:nodoc:
137
-
138
- # Define a text string starting at [<tt>x</tt>, <tt>y</tt>].
139
- # Use the RVG::TextConstructors#text method to create Text objects in a container.
140
- #
141
- # container.text(100, 100, "Simple text").styles(:font=>'Arial')
142
- #
143
- # Text objects can contain Tspan objects.
144
- #
145
- # container.text(100, 100).styles(:font=>'Arial') do |t|
146
- # t.tspan("Red text").styles(:fill=>'red')
147
- # t.tspan("Blue text").styles(:fill=>'blue')
148
- # end
149
- def initialize(x=0, y=0, text=nil, &block)
150
- @cx, @cy = Magick::RVG.convert_to_float(x, y)
151
- super(text, &block)
152
- end
153
-
154
- # Reference a Tspan object. <tt>x</tt> and <tt>y</tt> are just
155
- # like <tt>x</tt> and <tt>y</tt> in RVG::TextBase#tspan
156
- def tref(obj, x=nil, y=nil)
157
- if ! obj.kind_of?(Tspan)
158
- raise ArgumentError, "wrong argument type #{obj.class} (expected Tspan)"
75
+
76
+ end # class TextBase
77
+
78
+ # Tspan and Tref shared methods - read/update @cx, @cy in parent Text object.
79
+ module TextLink #:nodoc:
80
+
81
+ def add_primitives(gc)
82
+ @parent.cx = @x if @x
83
+ @parent.cy = @y if @y
84
+ super
159
85
  end
160
- obj = obj.deep_copy
161
- obj.parent = self
162
- tref = Tref.new(obj, x, y, self)
163
- @tspans << tref
164
- return tref
165
- end
166
86
 
167
- end # class Text
87
+ def cx()
88
+ @parent.cx
89
+ end
168
90
 
91
+ def cy()
92
+ @parent.cy
93
+ end
169
94
 
95
+ def cx=(x)
96
+ @parent.cx = x
97
+ end
170
98
 
171
- # Methods that construct text objects within a container
172
- module TextConstructors
99
+ def cy=(y)
100
+ @parent.cy = y
101
+ end
173
102
 
174
- # Draw a text string at (<tt>x</tt>,<tt>y</tt>). The string can
175
- # be omitted. Optionally, define text chunks within the associated
176
- # block.
177
- def text(x=0, y=0, text=nil, &block)
178
- t = Text.new(x, y, text, &block)
179
- @content << t
180
- return t
181
- end
103
+ end # module TextLink
104
+
105
+
106
+ class Tref < TextBase #:nodoc:
107
+ include TextLink
108
+
109
+ def initialize(obj, x, y, parent)
110
+ @x, @y = Magick::RVG.convert_to_float(x, y, :allow_nil)
111
+ super(nil)
112
+ @tspans << obj
113
+ @parent = parent
114
+ end
115
+
116
+ end # class Tref
117
+
118
+ class Tspan < TextBase #:nodoc:
119
+ include TextLink
120
+
121
+ attr_accessor :parent
122
+
123
+ # Define a text segment starting at (<tt>x</tt>, <tt>y</tt>).
124
+ # If <tt>x</tt> and <tt>y</tt> are omitted the segment starts
125
+ # at the current text position.
126
+ #
127
+ # Tspan objects can contain Tspan objects.
128
+ def initialize(text=nil, x=nil, y=nil, &block)
129
+ @x, @y = Magick::RVG.convert_to_float(x, y, :allow_nil)
130
+ super(text, &block)
131
+ end
132
+
133
+ end # class Tspan
134
+
135
+ class Text < TextBase
136
+
137
+ attr_accessor :cx, :cy #:nodoc:
138
+
139
+ # Define a text string starting at [<tt>x</tt>, <tt>y</tt>].
140
+ # Use the RVG::TextConstructors#text method to create Text objects in a container.
141
+ #
142
+ # container.text(100, 100, "Simple text").styles(:font=>'Arial')
143
+ #
144
+ # Text objects can contain Tspan objects.
145
+ #
146
+ # container.text(100, 100).styles(:font=>'Arial') do |t|
147
+ # t.tspan("Red text").styles(:fill=>'red')
148
+ # t.tspan("Blue text").styles(:fill=>'blue')
149
+ # end
150
+ def initialize(x=0, y=0, text=nil, &block)
151
+ @cx, @cy = Magick::RVG.convert_to_float(x, y)
152
+ super(text, &block)
153
+ end
154
+
155
+ # Reference a Tspan object. <tt>x</tt> and <tt>y</tt> are just
156
+ # like <tt>x</tt> and <tt>y</tt> in RVG::TextBase#tspan
157
+ def tref(obj, x=nil, y=nil)
158
+ if ! obj.kind_of?(Tspan)
159
+ raise ArgumentError, "wrong argument type #{obj.class} (expected Tspan)"
160
+ end
161
+ obj = obj.deep_copy
162
+ obj.parent = self
163
+ tref = Tref.new(obj, x, y, self)
164
+ @tspans << tref
165
+ return tref
166
+ end
167
+
168
+ end # class Text
169
+
170
+
171
+
172
+ # Methods that construct text objects within a container
173
+ module TextConstructors
174
+
175
+ # Draw a text string at (<tt>x</tt>,<tt>y</tt>). The string can
176
+ # be omitted. Optionally, define text chunks within the associated
177
+ # block.
178
+ def text(x=0, y=0, text=nil, &block)
179
+ t = Text.new(x, y, text, &block)
180
+ @content << t
181
+ return t
182
+ end
182
183
 
183
- end # module TextConstructors
184
+ end # module TextConstructors
184
185
 
185
- end
186
+ end # class RVG
187
+ end # module Magick
@@ -1,131 +1,133 @@
1
1
  #--
2
- # $Id: transformable.rb,v 1.2 2005/12/31 14:41:04 rmagick Exp $
3
- # Copyright (C) 2006 Timothy P. Hunter
2
+ # $Id: transformable.rb,v 1.3 2007/01/20 17:39:50 rmagick Exp $
3
+ # Copyright (C) 2007 Timothy P. Hunter
4
4
  #++
5
5
 
6
- class Magick::RVG
7
-
8
- # Transforms is an Array with a deep_copy method.
9
- # During unit-testing it also has a deep_equal method.
10
- class Transforms < Array #:nodoc:
11
-
12
- def deep_copy(h=nil)
13
- copy = self.class.new
14
- each { |transform| copy << [transform[0], transform[1].dup] }
15
- return copy
16
- end
17
-
18
- end # class Transform
19
-
20
- # Transformations are operations on the coordinate system.
21
- # All the transformations defined within a container (an RVG object
22
- # or a group) are applied before drawing any shapes or text.
23
- # All transformations are applied in the order they were
24
- # defined. <em>Note:</em> This means that
25
- # g.translate(10,20).scale(2)
26
- # is not the same as
27
- # g.scale(2).translate(10,20)
28
- module Transformable
29
-
30
- private
31
-
32
- # Apply transforms in the same order they were specified!
33
- def add_transform_primitives(gc)
34
- @transforms.each { |transform| gc.__send__(transform[0], *transform[1]) }
35
- end
36
-
37
- def initialize(*args, &block)
38
- super()
39
- @transforms = Transforms.new
40
- end
41
-
42
- public
43
-
44
- # Applies the transformation matrix [sx, rx, ry, sy, tx, ty]
45
- def matrix(sx, rx, ry, sy, tx, ty)
46
- begin
47
- @transforms << [:affine, [Float(sx), Float(rx), Float(ry), Float(sy), Float(tx), Float(ty)]]
48
- rescue ArgumentError
49
- raise ArgumentError, "arguments must be convertable to float (got #{sx.class}, #{rx.class}, #{ry.class}, #{sy.class}, #{sx.class}, #{sx.class}, #{tx.class}, #{ty.class})"
6
+ module Magick
7
+ class RVG
8
+
9
+ # Transforms is an Array with a deep_copy method.
10
+ # During unit-testing it also has a deep_equal method.
11
+ class Transforms < Array #:nodoc:
12
+
13
+ def deep_copy(h=nil)
14
+ copy = self.class.new
15
+ each { |transform| copy << [transform[0], transform[1].dup] }
16
+ return copy
17
+ end
18
+
19
+ end # class Transform
20
+
21
+ # Transformations are operations on the coordinate system.
22
+ # All the transformations defined within a container (an RVG object
23
+ # or a group) are applied before drawing any shapes or text.
24
+ # All transformations are applied in the order they were
25
+ # defined. <em>Note:</em> This means that
26
+ # g.translate(10,20).scale(2)
27
+ # is not the same as
28
+ # g.scale(2).translate(10,20)
29
+ module Transformable
30
+
31
+ private
32
+
33
+ # Apply transforms in the same order they were specified!
34
+ def add_transform_primitives(gc)
35
+ @transforms.each { |transform| gc.__send__(transform[0], *transform[1]) }
36
+ end
37
+
38
+ def initialize(*args, &block)
39
+ super()
40
+ @transforms = Transforms.new
41
+ end
42
+
43
+ public
44
+
45
+ # Applies the transformation matrix [sx, rx, ry, sy, tx, ty]
46
+ def matrix(sx, rx, ry, sy, tx, ty)
47
+ begin
48
+ @transforms << [:affine, [Float(sx), Float(rx), Float(ry), Float(sy), Float(tx), Float(ty)]]
49
+ rescue ArgumentError
50
+ raise ArgumentError, "arguments must be convertable to float (got #{sx.class}, #{rx.class}, #{ry.class}, #{sy.class}, #{sx.class}, #{sx.class}, #{tx.class}, #{ty.class})"
51
+ end
52
+ yield(self) if block_given?
53
+ self
50
54
  end
51
- yield(self) if block_given?
52
- self
53
- end
54
-
55
- # Add <tt>tx</tt> to all x-coordinates and <tt>ty</tt>
56
- # to all y-coordinates. If <tt>ty</tt> is omitted it defaults
57
- # to <tt>tx</tt>.
58
- def translate(tx, ty=nil)
59
- ty ||= tx
60
- begin
61
- @transforms << [:translate, [Float(tx), Float(ty)]]
62
- rescue ArgumentError
63
- raise ArgumentError, "arguments must be convertable to float (got #{tx.class}, #{ty.class})"
55
+
56
+ # Add <tt>tx</tt> to all x-coordinates and <tt>ty</tt>
57
+ # to all y-coordinates. If <tt>ty</tt> is omitted it defaults
58
+ # to <tt>tx</tt>.
59
+ def translate(tx, ty=nil)
60
+ ty ||= tx
61
+ begin
62
+ @transforms << [:translate, [Float(tx), Float(ty)]]
63
+ rescue ArgumentError
64
+ raise ArgumentError, "arguments must be convertable to float (got #{tx.class}, #{ty.class})"
65
+ end
66
+ yield(self) if block_given?
67
+ self
64
68
  end
65
- yield(self) if block_given?
66
- self
67
- end
68
-
69
- # Multiply the x-coordinates by <tt>sx</tt> and the y-coordinates
70
- # by <tt>sy</tt>. If <tt>sy</tt> is omitted it defaults to <tt>sx</tt>.
71
- def scale(sx, sy=nil)
72
- sy ||= sx
73
- begin
74
- @transforms << [:scale, [Float(sx), Float(sy)]]
75
- rescue ArgumentError
76
- raise ArgumentError, "arguments must be convertable to float (got #{sx.class}, #{sy.class})"
69
+
70
+ # Multiply the x-coordinates by <tt>sx</tt> and the y-coordinates
71
+ # by <tt>sy</tt>. If <tt>sy</tt> is omitted it defaults to <tt>sx</tt>.
72
+ def scale(sx, sy=nil)
73
+ sy ||= sx
74
+ begin
75
+ @transforms << [:scale, [Float(sx), Float(sy)]]
76
+ rescue ArgumentError
77
+ raise ArgumentError, "arguments must be convertable to float (got #{sx.class}, #{sy.class})"
78
+ end
79
+ yield(self) if block_given?
80
+ self
77
81
  end
78
- yield(self) if block_given?
79
- self
80
- end
81
-
82
- # This method can take either of two argument lists:
83
- # [rotate(angle)] rotate by <tt>angle</tt> degrees
84
- # [rotate(angle, cx, cy)] rotate by <tt>angle</tt> degrees about
85
- # the point [<tt>cx</tt>, <tt>cy</tt>].
86
- def rotate(angle, *args)
87
- begin
88
- case args.length
89
- when 0
90
- @transforms << [:rotate, [Float(angle)]]
91
- when 2
92
- cx, cy = Float(args[0]), Float(args[1])
93
- @transforms << [:translate, [cx, cy]]
94
- @transforms << [:rotate, [angle]]
95
- @transforms << [:translate, [-cx, -cy]]
96
- else
97
- raise ArgumentError, "wrong number of arguments (#{args.length} for 1 or 3)"
82
+
83
+ # This method can take either of two argument lists:
84
+ # [rotate(angle)] rotate by <tt>angle</tt> degrees
85
+ # [rotate(angle, cx, cy)] rotate by <tt>angle</tt> degrees about
86
+ # the point [<tt>cx</tt>, <tt>cy</tt>].
87
+ def rotate(angle, *args)
88
+ begin
89
+ case args.length
90
+ when 0
91
+ @transforms << [:rotate, [Float(angle)]]
92
+ when 2
93
+ cx, cy = Float(args[0]), Float(args[1])
94
+ @transforms << [:translate, [cx, cy]]
95
+ @transforms << [:rotate, [angle]]
96
+ @transforms << [:translate, [-cx, -cy]]
97
+ else
98
+ raise ArgumentError, "wrong number of arguments (#{args.length} for 1 or 3)"
99
+ end
100
+ rescue ArgumentError
101
+ raise ArgumentError, "arguments must be convertable to float (got #{[angle, *args].collect {|a| a.class}.join(', ')})"
98
102
  end
99
- rescue ArgumentError
100
- raise ArgumentError, "arguments must be convertable to float (got #{[angle, *args].collect {|a| a.class}.join(', ')})"
103
+ yield(self) if block_given?
104
+ self
101
105
  end
102
- yield(self) if block_given?
103
- self
104
- end
105
-
106
- # Skew the X-axis by <tt>angle</tt> degrees.
107
- def skewX(angle)
108
- begin
109
- @transforms << [:skewx, [Float(angle)]]
110
- rescue ArgumentError
111
- raise ArgumentError, "argument must be convertable to float (got #{angle.class})"
106
+
107
+ # Skew the X-axis by <tt>angle</tt> degrees.
108
+ def skewX(angle)
109
+ begin
110
+ @transforms << [:skewx, [Float(angle)]]
111
+ rescue ArgumentError
112
+ raise ArgumentError, "argument must be convertable to float (got #{angle.class})"
113
+ end
114
+ yield(self) if block_given?
115
+ self
112
116
  end
113
- yield(self) if block_given?
114
- self
115
- end
116
-
117
- # Skew the Y-axis by <tt>angle</tt> degrees.
118
- def skewY(angle)
119
- begin
120
- @transforms << [:skewy, [Float(angle)]]
121
- rescue ArgumentError
122
- raise ArgumentError, "argument must be convertable to float (got #{angle.class})"
117
+
118
+ # Skew the Y-axis by <tt>angle</tt> degrees.
119
+ def skewY(angle)
120
+ begin
121
+ @transforms << [:skewy, [Float(angle)]]
122
+ rescue ArgumentError
123
+ raise ArgumentError, "argument must be convertable to float (got #{angle.class})"
124
+ end
125
+ yield(self) if block_given?
126
+ self
123
127
  end
124
- yield(self) if block_given?
125
- self
126
- end
127
128
 
128
- end # module Transformable
129
+ end # module Transformable
129
130
 
130
- end # class Magick::RVG
131
+ end # class RVG
132
+ end # module Magick
131
133