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.
- data/ChangeLog +22 -0
- data/README.html +11 -63
- data/README.txt +8 -56
- data/configure +214 -787
- data/configure.ac +22 -24
- data/doc/comtasks.html +2 -2
- data/doc/constants.html +5 -6
- data/doc/draw.html +33 -14
- data/doc/ex/clip_path.rb +3 -0
- data/doc/ex/path.rb +1 -1
- data/doc/ex/polaroid.rb +23 -0
- data/doc/ex/tspan01.rb +2 -2
- data/doc/ex/tspan02.rb +2 -2
- data/doc/ex/tspan03.rb +3 -3
- data/doc/ex/wet_floor.rb +54 -0
- data/doc/ilist.html +83 -4
- data/doc/image1.html +4 -5
- data/doc/image2.html +395 -266
- data/doc/image3.html +104 -8
- data/doc/imageattrs.html +2 -2
- data/doc/imusage.html +2 -2
- data/doc/index.html +22 -18
- data/doc/info.html +28 -6
- data/doc/magick.html +125 -4
- data/doc/optequiv.html +196 -21
- data/doc/rvg.html +2 -2
- data/doc/rvgclip.html +2 -2
- data/doc/rvggroup.html +2 -2
- data/doc/rvgimage.html +2 -2
- data/doc/rvgpattern.html +2 -2
- data/doc/rvgshape.html +2 -2
- data/doc/rvgstyle.html +2 -2
- data/doc/rvgtext.html +2 -2
- data/doc/rvgtspan.html +2 -2
- data/doc/rvgtut.html +3 -3
- data/doc/rvguse.html +2 -2
- data/doc/rvgxform.html +2 -2
- data/doc/struct.html +2 -2
- data/doc/usage.html +26 -5
- data/ext/RMagick/MANIFEST +3 -1
- data/ext/RMagick/rmagick.h +46 -12
- data/ext/RMagick/rmagick_config.h.in +12 -2
- data/ext/RMagick/rmdraw.c +202 -62
- data/ext/RMagick/rmfill.c +36 -36
- data/ext/RMagick/rmilist.c +75 -31
- data/ext/RMagick/rmimage.c +640 -323
- data/ext/RMagick/rminfo.c +76 -15
- data/ext/RMagick/rmmain.c +107 -30
- data/ext/RMagick/rmutil.c +97 -68
- data/lib/RMagick.rb +11 -11
- data/lib/rvg/clippath.rb +38 -36
- data/lib/rvg/container.rb +120 -118
- data/lib/rvg/deep_equal.rb +44 -42
- data/lib/rvg/describable.rb +49 -47
- data/lib/rvg/embellishable.rb +399 -397
- data/lib/rvg/misc.rb +613 -603
- data/lib/rvg/paint.rb +38 -36
- data/lib/rvg/pathdata.rb +124 -122
- data/lib/rvg/rvg.rb +202 -198
- data/lib/rvg/stretchable.rb +132 -130
- data/lib/rvg/stylable.rb +101 -99
- data/lib/rvg/text.rb +173 -171
- data/lib/rvg/transformable.rb +120 -118
- data/lib/rvg/units.rb +60 -58
- data/rmagick.gemspec +1 -1
- metadata +5 -3
data/lib/rvg/text.rb
CHANGED
@@ -1,185 +1,187 @@
|
|
1
1
|
#--
|
2
|
-
# $Id: text.rb,v 1.
|
3
|
-
# Copyright (C)
|
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
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
tspan
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
tspan
|
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
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
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
|
-
|
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
|
-
|
172
|
-
|
99
|
+
def cy=(y)
|
100
|
+
@parent.cy = y
|
101
|
+
end
|
173
102
|
|
174
|
-
#
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
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
|
-
|
184
|
+
end # module TextConstructors
|
184
185
|
|
185
|
-
end
|
186
|
+
end # class RVG
|
187
|
+
end # module Magick
|
data/lib/rvg/transformable.rb
CHANGED
@@ -1,131 +1,133 @@
|
|
1
1
|
#--
|
2
|
-
# $Id: transformable.rb,v 1.
|
3
|
-
# Copyright (C)
|
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
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
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
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
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
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
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
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
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
|
-
|
100
|
-
|
103
|
+
yield(self) if block_given?
|
104
|
+
self
|
101
105
|
end
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
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
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
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
|
-
|
129
|
+
end # module Transformable
|
129
130
|
|
130
|
-
end
|
131
|
+
end # class RVG
|
132
|
+
end # module Magick
|
131
133
|
|