rmagick 1.7.4 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rmagick might be problematic. Click here for more details.
- data/ChangeLog +10 -2
- data/README.html +284 -290
- data/README.txt +298 -307
- data/configure +180 -11
- data/configure.ac +18 -2
- data/doc/comtasks.html +1 -1
- data/doc/constants.html +15 -10
- data/doc/css/ref.css +67 -0
- data/doc/draw.html +1 -1
- data/doc/ex/InitialCoords.rb +24 -0
- data/doc/ex/NewCoordSys.rb +33 -0
- data/doc/ex/OrigCoordSys.rb +19 -0
- data/doc/ex/PreserveAspectRatio.rb +206 -0
- data/doc/ex/RotateScale.rb +38 -0
- data/doc/ex/Skew.rb +39 -0
- data/doc/ex/Use01.rb +17 -0
- data/doc/ex/Use02.rb +22 -0
- data/doc/ex/Use03.rb +17 -0
- data/doc/ex/ViewBox.rb +34 -0
- data/doc/ex/arcs01.rb +29 -0
- data/doc/ex/arcs02.rb +62 -0
- data/doc/ex/baseline_shift01.rb +19 -0
- data/doc/ex/bounding_box.rb +31 -37
- data/doc/ex/circle01.rb +18 -0
- data/doc/ex/cubic01.rb +46 -0
- data/doc/ex/cubic02.rb +95 -0
- data/doc/ex/drop_shadow.rb +1 -1
- data/doc/ex/ellipse01.rb +23 -0
- data/doc/ex/evenodd.rb +44 -0
- data/doc/ex/font_styles.rb +29 -0
- data/doc/ex/group.rb +27 -0
- data/doc/ex/image.rb +47 -0
- data/doc/ex/images/big-duck.gif +0 -0
- data/doc/ex/images/duck.gif +0 -0
- data/doc/ex/images/duck0.gif +0 -0
- data/doc/ex/images/duck1.gif +0 -0
- data/doc/ex/images/duck10.gif +0 -0
- data/doc/ex/images/duck11.gif +0 -0
- data/doc/ex/images/duck12.gif +0 -0
- data/doc/ex/images/duck13.gif +0 -0
- data/doc/ex/images/duck14.gif +0 -0
- data/doc/ex/images/duck15.gif +0 -0
- data/doc/ex/images/duck2.gif +0 -0
- data/doc/ex/images/duck3.gif +0 -0
- data/doc/ex/images/duck4.gif +0 -0
- data/doc/ex/images/duck5.gif +0 -0
- data/doc/ex/images/duck6.gif +0 -0
- data/doc/ex/images/duck7.gif +0 -0
- data/doc/ex/images/duck8.gif +0 -0
- data/doc/ex/images/duck9.gif +0 -0
- data/doc/ex/line01.rb +24 -0
- data/doc/ex/nested_rvg.rb +22 -0
- data/doc/ex/nonzero.rb +44 -0
- data/doc/ex/polygon01.rb +24 -0
- data/doc/ex/polyline01.rb +24 -0
- data/doc/ex/quad01.rb +37 -0
- data/doc/ex/rect01.rb +16 -0
- data/doc/ex/rect02.rb +23 -0
- data/doc/ex/rvg_clippath.rb +15 -0
- data/doc/ex/rvg_linecap.rb +44 -0
- data/doc/ex/rvg_linejoin.rb +42 -0
- data/doc/ex/rvg_opacity.rb +20 -0
- data/doc/ex/rvg_pattern.rb +27 -0
- data/doc/ex/rvg_stroke_dasharray.rb +13 -0
- data/doc/ex/sepiatone.rb +15 -0
- data/doc/ex/shadow.rb +37 -0
- data/doc/ex/smile.rb +9 -9
- data/doc/ex/stroke_fill.rb +12 -0
- data/doc/ex/text01.rb +18 -0
- data/doc/ex/text_styles.rb +22 -0
- data/doc/ex/texture_fill_to_border.rb +3 -3
- data/doc/ex/texture_floodfill.rb +3 -2
- data/doc/ex/tref01.rb +26 -0
- data/doc/ex/triangle01.rb +17 -0
- data/doc/ex/tspan01.rb +19 -0
- data/doc/ex/tspan02.rb +20 -0
- data/doc/ex/tspan03.rb +22 -0
- data/doc/ex/writing_mode01.rb +28 -0
- data/doc/ex/writing_mode02.rb +27 -0
- data/doc/ilist.html +1 -1
- data/doc/image1.html +66 -30
- data/doc/image2.html +1 -1
- data/doc/image3.html +274 -49
- data/doc/imageattrs.html +87 -10
- data/doc/imusage.html +1 -1
- data/doc/index.html +80 -39
- data/doc/info.html +149 -13
- data/doc/magick.html +1 -1
- data/doc/rvg.html +890 -0
- data/doc/rvgclip.html +249 -0
- data/doc/rvggroup.html +305 -0
- data/doc/rvgimage.html +288 -0
- data/doc/rvgpattern.html +456 -0
- data/doc/rvgshape.html +376 -0
- data/doc/rvgstyle.html +269 -0
- data/doc/rvgtext.html +464 -0
- data/doc/rvgtspan.html +237 -0
- data/doc/rvgtut.html +512 -0
- data/doc/rvguse.html +145 -0
- data/doc/rvgxform.html +294 -0
- data/doc/struct.html +9 -71
- data/doc/usage.html +22 -7
- data/ext/RMagick/MANIFEST +94 -2
- data/ext/RMagick/rmagick.h +10 -4
- data/ext/RMagick/rmagick_config.h.in +8 -2
- data/ext/RMagick/rmdraw.c +2 -2
- data/ext/RMagick/rmfill.c +2 -2
- data/ext/RMagick/rmilist.c +3 -3
- data/ext/RMagick/rmimage.c +152 -5
- data/ext/RMagick/rminfo.c +208 -2
- data/ext/RMagick/rmmain.c +14 -5
- data/ext/RMagick/rmutil.c +83 -22
- data/lib/RMagick.rb +2 -2
- data/lib/rvg/clippath.rb +46 -0
- data/lib/rvg/container.rb +129 -0
- data/lib/rvg/deep_equal.rb +54 -0
- data/lib/rvg/describable.rb +51 -0
- data/lib/rvg/embellishable.rb +395 -0
- data/lib/rvg/misc.rb +729 -0
- data/lib/rvg/paint.rb +48 -0
- data/lib/rvg/pathdata.rb +129 -0
- data/lib/rvg/rvg.rb +279 -0
- data/lib/rvg/stretchable.rb +150 -0
- data/lib/rvg/stylable.rb +116 -0
- data/lib/rvg/text.rb +185 -0
- data/lib/rvg/transformable.rb +131 -0
- data/lib/rvg/units.rb +64 -0
- data/rmagick.gemspec +1 -1
- data/uninstall.rb +3 -2
- metadata +96 -3
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'rvg/rvg'
|
2
|
+
include Magick
|
3
|
+
|
4
|
+
rvg = RVG.new(300, 300) do |canvas|
|
5
|
+
canvas.background_fill = 'white'
|
6
|
+
triangles = RVG::Pattern.new(16, 16).viewbox(0,0, 50,50) do |pat|
|
7
|
+
pat.rect(50, 50).styles(:fill=>'darkblue')
|
8
|
+
pat.polygon(0,0, 25,50, 50,0, 0,0).styles(:fill=>'yellow', :stroke=>'red')
|
9
|
+
end
|
10
|
+
|
11
|
+
canvas.ellipse(130, 60, 150, 75).styles(:stroke_width=>16, :fill=>'none', :stroke=>triangles)
|
12
|
+
|
13
|
+
hat = Magick::Image.read('images/Flower_Hat.jpg').first
|
14
|
+
|
15
|
+
hats = RVG::Pattern.new(hat.columns/4.0, hat.rows/4.0) do |pat|
|
16
|
+
pat.image(hat, hat.columns/4.0, hat.rows/4.0)
|
17
|
+
end
|
18
|
+
|
19
|
+
canvas.g.translate(0, 150) do |grp|
|
20
|
+
grp.ellipse(130, 60, 150, 75).styles(:fill=>hats)
|
21
|
+
end
|
22
|
+
|
23
|
+
canvas.rect(299, 299, 0, 0).styles(:fill=>'none', :stroke=>'blue')
|
24
|
+
canvas.line(1, 150, 299, 150)
|
25
|
+
end
|
26
|
+
|
27
|
+
rvg.draw.write('rvg_pattern.gif')
|
@@ -0,0 +1,13 @@
|
|
1
|
+
#! /usr/local/bin/ruby -w
|
2
|
+
require 'rvg/rvg'
|
3
|
+
include Magick
|
4
|
+
|
5
|
+
rvg = RVG.new(200, 100) do |canvas|
|
6
|
+
canvas.background_fill = 'white'
|
7
|
+
canvas.rect(150, 50, 25, 25).round(6).
|
8
|
+
styles(:fill=>'none', :stroke=>'purple', :stroke_width=>10, :stroke_dasharray=>[10,5])
|
9
|
+
canvas.rect(199, 99).styles(:fill=>'none', :stroke=>'blue')
|
10
|
+
end
|
11
|
+
|
12
|
+
rvg.draw.write('rvg_stroke_dasharray.gif')
|
13
|
+
|
data/doc/ex/sepiatone.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#! /usr/local/bin/ruby -w
|
2
|
+
|
3
|
+
require 'RMagick'
|
4
|
+
include Magick
|
5
|
+
|
6
|
+
img = Image.read('images/Flower_Hat.jpg').first
|
7
|
+
|
8
|
+
begin
|
9
|
+
sepiatone = img.sepiatone(MaxRGB * 0.8)
|
10
|
+
rescue NotImplementedError
|
11
|
+
sepiatone = Image.read('images/notimplemented.gif').first
|
12
|
+
end
|
13
|
+
|
14
|
+
sepiatone.write('sepiatone.jpg')
|
15
|
+
|
data/doc/ex/shadow.rb
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'RMagick'
|
2
|
+
include Magick
|
3
|
+
|
4
|
+
# Draw a big red Bezier curve on a transparent background.
|
5
|
+
img = Image.new(340, 120) {self.background_color = 'none'}
|
6
|
+
gc = Draw.new
|
7
|
+
gc.fill('none')
|
8
|
+
gc.stroke('red')
|
9
|
+
gc.stroke_linecap('round')
|
10
|
+
gc.stroke_width(10)
|
11
|
+
gc.bezier(20, 60, 20,-90, 320,210, 320,60)
|
12
|
+
gc.draw(img)
|
13
|
+
|
14
|
+
# Composite it onto a white background, draw a border around the result,
|
15
|
+
# write it to the "before" file.
|
16
|
+
before = img.copy
|
17
|
+
bg = Image.new(before.columns, before.rows) {self.background_color='white'}
|
18
|
+
before = bg.composite(before, CenterGravity, OverCompositeOp)
|
19
|
+
before.border!(1,1,'gray80')
|
20
|
+
before.write('shadow_before.gif')
|
21
|
+
|
22
|
+
begin
|
23
|
+
# Create the shadow.
|
24
|
+
shadow = img.shadow()
|
25
|
+
# Composite the original image over the shadow, composite the result
|
26
|
+
# onto a white background, add a border, write it to the "after" file.
|
27
|
+
shadow = shadow.composite(img, NorthWestGravity, OverCompositeOp)
|
28
|
+
bg = Image.new(shadow.columns, shadow.rows) {self.background_color='white'}
|
29
|
+
after = bg.composite(shadow, CenterGravity, OverCompositeOp)
|
30
|
+
after.border!(1,1,'gray80')
|
31
|
+
rescue NotImplementedError
|
32
|
+
after = Image.read('images/notimplemented.gif').first
|
33
|
+
after.resize!(before.columns, before.rows)
|
34
|
+
end
|
35
|
+
|
36
|
+
after.write('shadow_after.gif')
|
37
|
+
|
data/doc/ex/smile.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
# RMagick version of ImageMagick's "smile.c" example program.
|
3
3
|
|
4
4
|
require 'RMagick'
|
5
|
+
include Magick
|
5
6
|
|
6
7
|
SmileWidth = 48
|
7
8
|
SmileHeight = 48
|
@@ -100,9 +101,8 @@ SmileBits = [
|
|
100
101
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
101
102
|
0, 0, 0, 0 ]
|
102
103
|
|
103
|
-
|
104
|
-
|
105
|
-
|
104
|
+
img = Image.new(SmileWidth, SmileHeight)
|
105
|
+
|
106
106
|
q = Array.new # Create an array of pixels one
|
107
107
|
SmileWidth.times do # row long
|
108
108
|
q << Magick::Pixel.new(0,0,0,0)
|
@@ -110,15 +110,15 @@ SmileBits = [
|
|
110
110
|
|
111
111
|
SmileHeight.times do |y| # Store pixels a row at a time
|
112
112
|
SmileWidth.times do |x| # Build a row of pixels
|
113
|
-
q[x].red =
|
114
|
-
q[x].green =
|
115
|
-
q[x].blue =
|
113
|
+
q[x].red = MaxRGB * SmileBits.first
|
114
|
+
q[x].green = MaxRGB * SmileBits.first
|
115
|
+
q[x].blue = MaxRGB * SmileBits.first
|
116
116
|
SmileBits.shift
|
117
117
|
end
|
118
118
|
# Store the row of pixels
|
119
|
-
|
119
|
+
img.store_pixels(0, y, SmileWidth, 1, q)
|
120
120
|
end
|
121
121
|
|
122
|
-
#
|
123
|
-
|
122
|
+
# img.display # Now display the result
|
123
|
+
img.write('smile.gif')
|
124
124
|
exit
|
@@ -0,0 +1,12 @@
|
|
1
|
+
#! /usr/local/bin/ruby -w
|
2
|
+
require 'rvg/rvg'
|
3
|
+
include Magick
|
4
|
+
|
5
|
+
rvg = RVG.new(150, 150) do |canvas|
|
6
|
+
canvas.background_fill = ''
|
7
|
+
canvas.circle(40, 75, 75).styles(:stroke=>'blue', :fill=>'#00ff00',:stroke_width=>8)
|
8
|
+
canvas.rect(149,149).styles(:fill=>'none',:stroke=>'blue')
|
9
|
+
end
|
10
|
+
|
11
|
+
rvg.draw.write('stroke_fill.gif')
|
12
|
+
|
data/doc/ex/text01.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'rvg/rvg'
|
2
|
+
include Magick
|
3
|
+
|
4
|
+
RVG.dpi = 90
|
5
|
+
|
6
|
+
rvg = RVG.new(10.cm, 3.cm).viewbox(0,0,1000,300) do |canvas|
|
7
|
+
canvas.background_fill = 'white'
|
8
|
+
canvas.desc = "Example text01 - 'Hello, out there' in blue"
|
9
|
+
canvas.text(250, 150, "Hello, out there").
|
10
|
+
styles(:font_family=>'Verdana', :font_size=>55, :fill=>'blue')
|
11
|
+
canvas.circle(5, 250, 150).styles(:fill=>'red')
|
12
|
+
|
13
|
+
# Show outline of canvas using 'rect' element
|
14
|
+
canvas.rect(997, 297).styles(:fill=>'none', :stroke=>'blue')
|
15
|
+
end
|
16
|
+
|
17
|
+
rvg.draw.write('text01.gif')
|
18
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
#! /usr/local/bin/ruby -w
|
2
|
+
require 'rvg/rvg'
|
3
|
+
include Magick
|
4
|
+
|
5
|
+
|
6
|
+
rvg = RVG.new(200, 100) do |canvas|
|
7
|
+
canvas.background_fill = 'white'
|
8
|
+
|
9
|
+
canvas.g.styles(:font_size=>16) do |grp|
|
10
|
+
grp.text( 30, 30, ":text_anchor=>'start'").styles(:text_anchor=>'start')
|
11
|
+
grp.circle(1, 30, 30).styles(:stroke=>'red')
|
12
|
+
grp.text(100, 50, ":text_anchor=>'middle'").styles(:text_anchor=>'middle')
|
13
|
+
grp.circle(1, 100, 50).styles(:stroke=>'red')
|
14
|
+
grp.text(170, 70, ":text_anchor=>'end'").styles(:text_anchor=>'end')
|
15
|
+
grp.circle(1, 170, 70).styles(:stroke=>'red')
|
16
|
+
end
|
17
|
+
|
18
|
+
canvas.rect(199, 99).styles(:fill=>'none', :stroke=>'blue')
|
19
|
+
end
|
20
|
+
|
21
|
+
rvg.draw.write('text_styles.gif')
|
22
|
+
|
@@ -26,9 +26,9 @@ circle.draw(before)
|
|
26
26
|
before.compression = Magick::LZWCompression
|
27
27
|
before.write('texture_fill_to_border_before.gif')
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
after = before.texture_fill_to_border(100,100,
|
29
|
+
hat = Magick::Image.read('images/Flower_Hat.jpg').first
|
30
|
+
hat.resize!(0.3)
|
31
|
+
after = before.texture_fill_to_border(100,100, hat)
|
32
32
|
|
33
33
|
after.write('texture_fill_to_border_after.gif')
|
34
34
|
exit
|
data/doc/ex/texture_floodfill.rb
CHANGED
@@ -23,9 +23,10 @@ circle.draw(before)
|
|
23
23
|
before.compression = Magick::LZWCompression
|
24
24
|
before.write('texture_floodfill_before.gif')
|
25
25
|
|
26
|
-
|
26
|
+
hat = Magick::Image.read('images/Flower_Hat.jpg').first
|
27
|
+
hat.resize!(0.3)
|
27
28
|
before.fuzz = 25
|
28
|
-
after = before.texture_floodfill(100,100,
|
29
|
+
after = before.texture_floodfill(100,100, hat)
|
29
30
|
|
30
31
|
after.write('texture_floodfill_after.gif')
|
31
32
|
exit
|
data/doc/ex/tref01.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'rvg/rvg'
|
2
|
+
include Magick
|
3
|
+
|
4
|
+
RVG.dpi = 90
|
5
|
+
Fill = %w{yellow pink green blue cyan red purple brown}
|
6
|
+
|
7
|
+
rvg = RVG.new(6.cm, 6.cm).viewbox(0,0,600,600) do |canvas|
|
8
|
+
canvas.background_fill = 'white'
|
9
|
+
|
10
|
+
ref_text = RVG::Tspan.new("Referenced").styles(:font_size=>52, :font_weight=>'bold')
|
11
|
+
|
12
|
+
canvas.g.translate(300,270) do |grp|
|
13
|
+
angle = 0
|
14
|
+
8.times do |n|
|
15
|
+
grp.text do |txt|
|
16
|
+
txt.tref(ref_text).d(0,30).rotate(angle).styles(:fill=>Fill[n])
|
17
|
+
angle += 45
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
canvas.rect(596,596).styles(:fill=>'none',:stroke=>'blue')
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
rvg.draw.write('tref01.gif')
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'rvg/rvg'
|
2
|
+
include Magick
|
3
|
+
|
4
|
+
RVG.dpi = 90
|
5
|
+
|
6
|
+
rvg = RVG.new(4.cm, 4.cm).viewbox(0, 0, 400, 400) do |canvas|
|
7
|
+
canvas.title = "Example triangle01 - simple example of a 'path'"
|
8
|
+
canvas.desc = 'A path that draws a triangle'
|
9
|
+
|
10
|
+
canvas.background_fill = 'white'
|
11
|
+
canvas.rect(395, 395, 1, 1).styles(:fill=>'none', :stroke=>'blue')
|
12
|
+
|
13
|
+
canvas.path('M 100 100 L 300 100 L 200 300 z').styles(:fill=>'red', :stroke=>'blue', :stroke_width=>3)
|
14
|
+
end
|
15
|
+
|
16
|
+
rvg.draw.write('triangle01.gif')
|
17
|
+
|
data/doc/ex/tspan01.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'rvg/rvg'
|
2
|
+
include Magick
|
3
|
+
|
4
|
+
RVG.dpi = 90
|
5
|
+
|
6
|
+
rvg = RVG.new(10.cm, 3.cm).viewbox(0,0,1000,300) do |canvas|
|
7
|
+
canvas.background_fill = 'white'
|
8
|
+
canvas.desc = "Example tspan01 - using tspan to change visual attributes"
|
9
|
+
canvas.g.styles(:font_family=>'Verdana', :font_size=>45) do |grp|
|
10
|
+
grp.text(200, 150, "You are ").styles(:fill=>'blue') do |txt|
|
11
|
+
txt.tspan("not").styles(:font_weight=>'bold', :fill=>'red')
|
12
|
+
txt.tspan(" a banana")
|
13
|
+
end
|
14
|
+
end
|
15
|
+
canvas.rect(997, 297).styles(:fill=>'none', :stroke=>'blue')
|
16
|
+
end
|
17
|
+
|
18
|
+
rvg.draw.write('tspan01.gif')
|
19
|
+
|
data/doc/ex/tspan02.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'rvg/rvg'
|
2
|
+
include Magick
|
3
|
+
|
4
|
+
RVG::dpi = 90
|
5
|
+
|
6
|
+
|
7
|
+
rvg = RVG.new(10.cm, 3.cm).viewbox(0,0,1000,300) do |canvas|
|
8
|
+
canvas.background_fill = 'white'
|
9
|
+
canvas.desc = "Example tspan02 - using tspan's dx and dy attributes for incremental positioning adjustments"
|
10
|
+
canvas.g.styles(:font_family=>'Verdana', :font_size=>45) do |_g|
|
11
|
+
_g.text(200, 150, "But you").styles(:fill=>'blue') do |txt|
|
12
|
+
txt.tspan("are ").d(100, -50).styles(:font_weight=>'bold', :fill=>'red')
|
13
|
+
txt.tspan("a peach!").d(0, 100)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
canvas.rect(996, 296, 1, 1).styles(:fill=>'none', :stroke=>'blue')
|
17
|
+
end
|
18
|
+
|
19
|
+
rvg.draw.write('tspan02.gif')
|
20
|
+
|
data/doc/ex/tspan03.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'rvg/rvg'
|
2
|
+
include Magick
|
3
|
+
|
4
|
+
RVG.dpi = 90
|
5
|
+
|
6
|
+
rvg = RVG.new(10.cm, 3.cm).viewbox(0,0,1000,300) do |canvas|
|
7
|
+
canvas.background_fill = 'white'
|
8
|
+
|
9
|
+
canvas.g.translate(100, 60) do |grp|
|
10
|
+
grp.text.styles(:font_family=>'Verdana', :font_size=>45) do |txt|
|
11
|
+
txt.tspan("Rotation ")
|
12
|
+
txt.tspan("propogates ").rotate(20).styles(:fill=>'red') do |tsp|
|
13
|
+
tsp.tspan("to descendents").styles(:fill=>'green')
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
canvas.rect(997, 297).styles(:fill=>'none', :stroke=>'blue')
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
rvg.draw.write('tspan03.gif')
|
22
|
+
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'rvg/rvg'
|
2
|
+
include Magick
|
3
|
+
|
4
|
+
RVG.dpi = 90
|
5
|
+
|
6
|
+
TEXT_STYLES = {:writing_mode=>'tb',
|
7
|
+
:glyph_orientation_vertical=>0,
|
8
|
+
:fill=>'red4',
|
9
|
+
:font_weight=>'bold',
|
10
|
+
:font_size=>16}
|
11
|
+
|
12
|
+
TEXT_STYLES2 = {:writing_mode=>'tb',
|
13
|
+
:glyph_orientation_vertical=>90,
|
14
|
+
:fill=>'green',
|
15
|
+
:font_weight=>'bold',
|
16
|
+
:font_size=>16}
|
17
|
+
|
18
|
+
rvg = RVG.new(1.25.in, 6.in).viewbox(0,0,125,600) do |canvas|
|
19
|
+
canvas.background_fill = 'white'
|
20
|
+
|
21
|
+
canvas.text(40, 15, ":glyph_orientation_vertical=0").styles(TEXT_STYLES)
|
22
|
+
canvas.text(80, 25, ":glyph_orientation_vertical=90").styles(TEXT_STYLES2)
|
23
|
+
|
24
|
+
canvas.rect(124, 598).styles(:fill=>'none',:stroke=>'blue')
|
25
|
+
end
|
26
|
+
|
27
|
+
rvg.draw.write('writing_mode01.gif')
|
28
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'rvg/rvg'
|
2
|
+
include Magick
|
3
|
+
|
4
|
+
RVG.dpi = 90
|
5
|
+
|
6
|
+
TEXT_STYLES = {:writing_mode=>'lr',
|
7
|
+
:glyph_orientation_horizontal=>0,
|
8
|
+
:fill=>'red4',
|
9
|
+
:font_weight=>'bold',
|
10
|
+
:font_size=>16}
|
11
|
+
|
12
|
+
TEXT_STYLES2 = {:writing_mode=>'lr',
|
13
|
+
:glyph_orientation_horizontal=>180,
|
14
|
+
:fill=>'green',
|
15
|
+
:font_weight=>'bold',
|
16
|
+
:font_size=>16}
|
17
|
+
|
18
|
+
rvg = RVG.new(3.in, 1.in).viewbox(0,0,300,100) do |canvas|
|
19
|
+
canvas.background_fill = 'white'
|
20
|
+
|
21
|
+
canvas.text(15, 40, ":glyph_orientation_horizontal=0").styles(TEXT_STYLES)
|
22
|
+
canvas.text(15, 80, ":glyph_orientation_horizontal=180").styles(TEXT_STYLES2)
|
23
|
+
|
24
|
+
canvas.rect(299, 99).styles(:fill=>'none',:stroke=>'blue')
|
25
|
+
end
|
26
|
+
|
27
|
+
rvg.draw.write('writing_mode02.gif')
|
data/doc/ilist.html
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
"text/html; charset=us-ascii" />
|
12
12
|
<meta name="GENERATOR" content="Quanta Plus" />
|
13
13
|
<meta name="Copyright" content=
|
14
|
-
"Copyright (C)
|
14
|
+
"Copyright (C) 2005 by Timothy P. Hunter" />
|
15
15
|
<link rel="stylesheet" type="text/css" href="css/doc.css" />
|
16
16
|
<script type="text/javascript" src="scripts/doc.js">
|
17
17
|
</script>
|
data/doc/image1.html
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
3
|
|
4
4
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
5
5
|
<head>
|
6
6
|
<meta name="generator" content=
|
7
|
-
"HTML Tidy for Linux/x86 (vers 1st
|
7
|
+
"HTML Tidy for Linux/x86 (vers 1st March 2005), see www.w3.org" />
|
8
8
|
|
9
9
|
<title>RMagick: class Image (class and instance methods, part
|
10
10
|
1)</title>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
"text/html; charset=us-ascii" />
|
13
13
|
<meta name="GENERATOR" content="Quanta Plus" />
|
14
14
|
<meta name="Copyright" content=
|
15
|
-
"Copyright (C)
|
15
|
+
"Copyright (C) 2005 by Timothy P. Hunter" />
|
16
16
|
<link rel="stylesheet" type="text/css" href="css/doc.css" />
|
17
17
|
<script type="text/javascript" src="scripts/doc.js">
|
18
18
|
</script>
|
@@ -437,7 +437,9 @@ img = Magick::Image.new(256, 64) {
|
|
437
437
|
}
|
438
438
|
</pre>
|
439
439
|
|
440
|
-
<h4>See also</h4
|
440
|
+
<h4>See also</h4>
|
441
|
+
|
442
|
+
<p><a href=
|
441
443
|
"ilist.html#new_image"><code>ImageList.new_image</code></a></p>
|
442
444
|
|
443
445
|
<h4>Magick API</h4>
|
@@ -609,8 +611,10 @@ img = Magick::Image.read_inline(content)
|
|
609
611
|
mom['Label'] = 'My Mother'
|
610
612
|
</pre>
|
611
613
|
|
612
|
-
<h4>See also</h4
|
613
|
-
|
614
|
+
<h4>See also</h4>
|
615
|
+
|
616
|
+
<p><a href="#aset"><code>[ ]=</code></a>, <a href=
|
617
|
+
"image2.html#properties"><code>properties</code></a></p>
|
614
618
|
|
615
619
|
<h4>Magick API</h4>
|
616
620
|
|
@@ -862,8 +866,10 @@ img = Magick::Image.read_inline(content)
|
|
862
866
|
"ex/images/spin.gif" alt="" class="spin" style="left:237px;"
|
863
867
|
title="Mouse over the example to see the original image" /></p>
|
864
868
|
|
865
|
-
<h4>See also</h4
|
866
|
-
|
869
|
+
<h4>See also</h4>
|
870
|
+
|
871
|
+
<p><a href="image3.html#rotate">rotate</a>, <a href=
|
872
|
+
"#shear">shear</a></p>
|
867
873
|
|
868
874
|
<h4>Magick API</h4>
|
869
875
|
|
@@ -1080,9 +1086,10 @@ img = Magick::Image.read_inline(content)
|
|
1080
1086
|
|
1081
1087
|
<p>A new image</p>
|
1082
1088
|
|
1083
|
-
<h4>See also</h4
|
1084
|
-
|
1085
|
-
"#
|
1089
|
+
<h4>See also</h4>
|
1090
|
+
|
1091
|
+
<p><a href="image3.html#white_threshold">white_threshold</a>,
|
1092
|
+
<a href="#channel_threshold">channel_threshold</a></p>
|
1086
1093
|
|
1087
1094
|
<h4>Magick API</h4>
|
1088
1095
|
|
@@ -1140,7 +1147,9 @@ img = Magick::Image.read_inline(content)
|
|
1140
1147
|
"left: 224px;" title=
|
1141
1148
|
"Mouse over the example to see the original image" /></p>
|
1142
1149
|
|
1143
|
-
<h4>See also</h4
|
1150
|
+
<h4>See also</h4>
|
1151
|
+
|
1152
|
+
<p><a href="#border_bang">border!</a>, <a href=
|
1144
1153
|
"image2.html#frame">frame</a></p>
|
1145
1154
|
|
1146
1155
|
<h4>Magick API</h4>
|
@@ -1305,7 +1314,9 @@ mona.change_geometry!('320x240') { |cols, rows, img|
|
|
1305
1314
|
|
1306
1315
|
<p>The maximum depth</p>
|
1307
1316
|
|
1308
|
-
<h4>See also</h4
|
1317
|
+
<h4>See also</h4>
|
1318
|
+
|
1319
|
+
<p><a href=
|
1309
1320
|
"image3.html#set_channel_depth">set_channel_depth</a></p>
|
1310
1321
|
|
1311
1322
|
<h4>Magick API</h4>
|
@@ -1439,9 +1450,10 @@ mona.change_geometry!('320x240') { |cols, rows, img|
|
|
1439
1450
|
"ex/images/spin.gif" alt="" class="spin" style="left: 446px"
|
1440
1451
|
title="Mouse over the example to see the original image" /></p>
|
1441
1452
|
|
1442
|
-
<h4>See also</h4
|
1443
|
-
|
1444
|
-
"#
|
1453
|
+
<h4>See also</h4>
|
1454
|
+
|
1455
|
+
<p><a href="#adaptive_threshold">adaptive_threshold</a>,
|
1456
|
+
<a href="#black_threshold">black_threshold</a>, <a href=
|
1445
1457
|
"image3.html#random_channel_threshold">random_channel_threshold</a>,
|
1446
1458
|
<a href="image3.html#threshold">threshold</a>, <a href=
|
1447
1459
|
"image3.html#white_threshold">white_threshold</a></p>
|
@@ -1637,7 +1649,9 @@ mona.change_geometry!('320x240') { |cols, rows, img|
|
|
1637
1649
|
"margin-bottom: 182px; margin-left: 4px;" title=
|
1638
1650
|
"Mouse over the example to see the original image" /></p>
|
1639
1651
|
|
1640
|
-
<h4>See also</h4
|
1652
|
+
<h4>See also</h4>
|
1653
|
+
|
1654
|
+
<p><a href="#color_floodfill">color_floodfill</a></p>
|
1641
1655
|
|
1642
1656
|
<h4>Magick API</h4>
|
1643
1657
|
|
@@ -1692,9 +1706,10 @@ mona.change_geometry!('320x240') { |cols, rows, img|
|
|
1692
1706
|
"margin-bottom: 182px;" title=
|
1693
1707
|
"Mouse over the example to see the original image" /></p>
|
1694
1708
|
|
1695
|
-
<h4>See also</h4
|
1696
|
-
|
1697
|
-
"
|
1709
|
+
<h4>See also</h4>
|
1710
|
+
|
1711
|
+
<p><a href="#color_fill_to_border">color_fill_to_border</a>,
|
1712
|
+
<a href="image2.html#opaque">opaque</a></p>
|
1698
1713
|
|
1699
1714
|
<h4>Magick API</h4>
|
1700
1715
|
|
@@ -1792,6 +1807,10 @@ mona.change_geometry!('320x240') { |cols, rows, img|
|
|
1792
1807
|
"ex/images/spin.gif" alt="" class="spin" title=
|
1793
1808
|
"Mouse over the example to see the original image" /></p>
|
1794
1809
|
|
1810
|
+
<h4>See also</h4>
|
1811
|
+
|
1812
|
+
<p><a href="image3.html#sepiatone">sepiatone</a></p>
|
1813
|
+
|
1795
1814
|
<h4>Magick API</h4>
|
1796
1815
|
|
1797
1816
|
<p>ColorizeImage</p>
|
@@ -1879,8 +1898,9 @@ mona.change_geometry!('320x240') { |cols, rows, img|
|
|
1879
1898
|
f.color_point(50,50, 'red')
|
1880
1899
|
</pre>
|
1881
1900
|
|
1882
|
-
<h4>See also</h4
|
1883
|
-
|
1901
|
+
<h4>See also</h4>
|
1902
|
+
|
1903
|
+
<p><a href="image3.html#pixel_color">pixel_color</a>, <a href=
|
1884
1904
|
"draw.html#point">Draw#point</a></p>
|
1885
1905
|
|
1886
1906
|
<h4>Magick API</h4>
|
@@ -1911,7 +1931,9 @@ f.color_point(50,50, 'red')
|
|
1911
1931
|
f.color_reset!(red)
|
1912
1932
|
</pre>
|
1913
1933
|
|
1914
|
-
<h4>See also</h4
|
1934
|
+
<h4>See also</h4>
|
1935
|
+
|
1936
|
+
<p><a href="image2.html#erase_bang">erase!</a></p>
|
1915
1937
|
|
1916
1938
|
<h4>Magick API</h4>SetImage
|
1917
1939
|
</div>
|
@@ -1972,7 +1994,9 @@ f.color_reset!(red)
|
|
1972
1994
|
second is a the value of the computed distortion represented as
|
1973
1995
|
a <code>Float</code>.</p>
|
1974
1996
|
|
1975
|
-
<h4>See also</h4
|
1997
|
+
<h4>See also</h4>
|
1998
|
+
|
1999
|
+
<p><a href="#difference">difference</a>, <a href=
|
1976
2000
|
"#spaceship"><=></a></p>
|
1977
2001
|
|
1978
2002
|
<h4>Magick API</h4>
|
@@ -2224,7 +2248,9 @@ f.color_reset!(red)
|
|
2224
2248
|
|
2225
2249
|
<p>A new image</p>
|
2226
2250
|
|
2227
|
-
<h4>See also</h4
|
2251
|
+
<h4>See also</h4>
|
2252
|
+
|
2253
|
+
<p><a href="#composite">composite</a>, <a href=
|
2228
2254
|
"#affine_transform">affine_transform</a></p>
|
2229
2255
|
|
2230
2256
|
<h4>Magick API</h4>
|
@@ -2294,6 +2320,11 @@ f.colors » 108
|
|
2294
2320
|
"ex/contrast.jpg" alt="contrast example" title=
|
2295
2321
|
"Click the image to see the example script" /></a>
|
2296
2322
|
|
2323
|
+
<h4>See also</h4>
|
2324
|
+
|
2325
|
+
<p><a href=
|
2326
|
+
"image3.html#sigmoidal_contrast_channel">sigmoidal_contrast_channel</a></p>
|
2327
|
+
|
2297
2328
|
<h4>Magick API</h4>
|
2298
2329
|
|
2299
2330
|
<p>ContrastImage</p>
|
@@ -2588,8 +2619,9 @@ f2 = f.copy
|
|
2588
2619
|
<p><a href=
|
2589
2620
|
"javascript:popup('crop_with_gravity.rb.html')">crop_with_gravity.rb</a></p>
|
2590
2621
|
|
2591
|
-
<h4>See also</h4
|
2592
|
-
|
2622
|
+
<h4>See also</h4>
|
2623
|
+
|
2624
|
+
<p><a href="#crop_bang">crop!</a>, <a href="#chop">chop</a></p>
|
2593
2625
|
|
2594
2626
|
<h4>Notes</h4>
|
2595
2627
|
|
@@ -2752,7 +2784,9 @@ f2 = f.copy
|
|
2752
2784
|
"imageattrs.html#normalized_maximum_error">normalized_maximum_error</a>
|
2753
2785
|
attributes.</p>
|
2754
2786
|
|
2755
|
-
<h4>See also</h4
|
2787
|
+
<h4>See also</h4>
|
2788
|
+
|
2789
|
+
<p><a href="#spaceship"><=></a></p>
|
2756
2790
|
|
2757
2791
|
<h4>Magick API</h4>IsImagesEqual
|
2758
2792
|
</div>
|
@@ -2875,7 +2909,9 @@ exit
|
|
2875
2909
|
<p>self</p>
|
2876
2910
|
|
2877
2911
|
<h4>Note</h4>
|
2878
|
-
|
2912
|
+
|
2913
|
+
<p>The display method is not supported on native MS
|
2914
|
+
Windows.</p>
|
2879
2915
|
|
2880
2916
|
<h4>Magick API</h4>
|
2881
2917
|
|