rmagick4j 0.3.7 → 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,165 +0,0 @@
1
- History.txt
2
- Manifest.txt
3
- README.txt
4
- Rakefile
5
- LICENSE.txt
6
- lib/RMagick.rb
7
- lib/rvg/stylable.rb
8
- lib/rvg/deep_equal.rb
9
- lib/rvg/pathdata.rb
10
- lib/rvg/units.rb
11
- lib/rvg/container.rb
12
- lib/rvg/misc.rb
13
- lib/rvg/paint.rb
14
- lib/rvg/embellishable.rb
15
- lib/rvg/describable.rb
16
- lib/rvg/text.rb
17
- lib/rvg/transformable.rb
18
- lib/rvg/rvg.rb
19
- lib/rvg/clippath.rb
20
- lib/rvg/stretchable.rb
21
- lib/rmagick4j/constants.rb
22
- lib/rmagick4j/gradient_fill.rb
23
- lib/rmagick4j/draw.rb
24
- lib/rmagick4j/pixel.rb
25
- lib/rmagick4j/rmagick4j.rb
26
- lib/rmagick4j/image.rb
27
- lib/rmagick4j/image_list.rb
28
- lib/rmagick4j/version.rb
29
- lib/rmagick4j/enum.rb
30
- lib/rmagick4j/type_metric.rb
31
- lib/rmagick4j/texture_fill.rb
32
- lib/svgsalamander.jar
33
- lib/magick4j.jar
34
- test/implemented_methods.rb
35
- test/RMagickTestSuite.rb
36
- test/eyetests/bullseye.rb
37
- test/eyetests/doc.rb
38
- test/eyetests/tests/path_c_command_01.rb
39
- test/eyetests/tests/draw_line_basic.rb
40
- test/eyetests/tests/gruff_stacked_bar_2.rb
41
- test/eyetests/tests/effect_blur.rb
42
- test/eyetests/tests/draw_clip_path.rb
43
- test/eyetests/tests/gruff_sidestacked_bar_1.rb
44
- test/eyetests/tests/store_pixel_smiley.rb
45
- test/eyetests/tests/gruff_bar_1.rb
46
- test/eyetests/tests/draw_polyline_affine.rb
47
- test/eyetests/tests/effect_charcoal.rb
48
- test/eyetests/tests/draw_rmagick_test_02.rb
49
- test/eyetests/tests/path_m_command_02.rb
50
- test/eyetests/tests/draw_circle_affine.rb
51
- test/eyetests/tests/gruff_pie_2.rb
52
- test/eyetests/tests/effect_negate_true.rb
53
- test/eyetests/tests/draw_pattern_1.rb
54
- test/eyetests/tests/draw_arc_basic.rb
55
- test/eyetests/tests/gruff_net_1.rb
56
- test/eyetests/tests/path_h_command_01.rb
57
- test/eyetests/tests/path_a_command_02.rb
58
- test/eyetests/tests/path_m_command_03.rb
59
- test/eyetests/tests/effect_implode.rb
60
- test/eyetests/tests/draw_rmagick_test_03.rb
61
- test/eyetests/tests/gruff_scene_2.rb
62
- test/eyetests/tests/path_h_command_02.rb
63
- test/eyetests/tests/draw_roundrectangle_affine.rb
64
- test/eyetests/tests/gruff_bar_2.rb
65
- test/eyetests/tests/gruff_area_1.rb
66
- test/eyetests/tests/path_c_command_02.rb
67
- test/eyetests/tests/hatch_fill.rb
68
- test/eyetests/tests/gruff_line_1.rb
69
- test/eyetests/tests/path_complex_01.rb
70
- test/eyetests/tests/path_l_command_02.rb
71
- test/eyetests/tests/path_q_command_03.rb
72
- test/eyetests/tests/path_star_01.rb
73
- test/eyetests/tests/gruff_stacked_area_1.rb
74
- test/eyetests/tests/effect_normalize.rb
75
- test/eyetests/tests/path_espiral_01.rb
76
- test/eyetests/tests/effect_solarize.rb
77
- test/eyetests/tests/draw_rotate_01.rb
78
- test/eyetests/tests/gruff_area_2.rb
79
- test/eyetests/tests/gruff_net_2.rb
80
- test/eyetests/tests/draw_ellipse_affine.rb
81
- test/eyetests/tests/draw_rectangle_affine.rb
82
- test/eyetests/tests/gruff_spider_1.rb
83
- test/eyetests/tests/gruff_pie_1.rb
84
- test/eyetests/tests/path_t_command_01.rb
85
- test/eyetests/tests/gruff_sidebar.rb
86
- test/eyetests/tests/gruff_scene_1.rb
87
- test/eyetests/tests/draw_pop_push.rb
88
- test/eyetests/tests/draw_ellipse_basic.rb
89
- test/eyetests/tests/draw_rmagick_test_01.rb
90
- test/eyetests/tests/gruff_dot_1.rb
91
- test/eyetests/tests/gradient_fill_horizontal_fill.rb
92
- test/eyetests/tests/path_t_command_02.rb
93
- test/eyetests/tests/path_v_command_02.rb
94
- test/eyetests/tests/gruff_accumulator_bar.rb
95
- test/eyetests/tests/path_l_command_01.rb
96
- test/eyetests/tests/gruff_line_2.rb
97
- test/eyetests/tests/path_s_command_02.rb
98
- test/eyetests/tests/draw_multiline_type_metrics.rb
99
- test/eyetests/tests/effect_wave.rb
100
- test/eyetests/tests/path_q_command_01.rb
101
- test/eyetests/tests/draw_rmagick_test_04.rb
102
- test/eyetests/tests/draw_stroke_miterlimit.rb
103
- test/eyetests/tests/draw_roundrectangle_basic.rb
104
- test/eyetests/tests/gruff_spider_2.rb
105
- test/eyetests/tests/gradient_fill_horizontal_diagonal_fill.rb
106
- test/eyetests/tests/path_s_command_01.rb
107
- test/eyetests/tests/image_list_flatten_images.rb
108
- test/eyetests/tests/effect_shade.rb
109
- test/eyetests/tests/draw_pop_push_translate.rb
110
- test/eyetests/tests/draw_polygon_basic.rb
111
- test/eyetests/tests/path_q_command_02.rb
112
- test/eyetests/tests/draw_polyline_basic.rb
113
- test/eyetests/tests/path_v_command_01.rb
114
- test/eyetests/tests/draw_skewy_01.rb
115
- test/eyetests/tests/gradient_fill_vertical_diagonal_fill.rb
116
- test/eyetests/tests/gruff_sidestacked_bar_2.rb
117
- test/eyetests/tests/path_m_command_01.rb
118
- test/eyetests/tests/effect_edge.rb
119
- test/eyetests/tests/draw_skewx_01.rb
120
- test/eyetests/tests/gradient_fill_vertical_fill.rb
121
- test/eyetests/tests/gruff_stacked_bar_1.rb
122
- test/eyetests/tests/draw_polygon_affine.rb
123
- test/eyetests/tests/draw_circle_basic.rb
124
- test/eyetests/tests/new_image.rb
125
- test/eyetests/tests/effect_negate.rb
126
- test/eyetests/tests/texture_fill.rb
127
- test/eyetests/tests/draw_rectangle_basic.rb
128
- test/eyetests/tests/path_a_command_01.rb
129
- test/eyetests/tests/draw_scale_01.rb
130
- test/eyetests/tests/gradient_fill_point_fill.rb
131
- test/eyetests/tests/draw_line_affine.rb
132
- test/gruff_tests/test/test_base.rb
133
- test/gruff_tests/test/test_scene.rb
134
- test/gruff_tests/test/test_photo.rb
135
- test/gruff_tests/test/test_legend.rb
136
- test/gruff_tests/test/test_dot.rb
137
- test/gruff_tests/test/test_bullet.rb
138
- test/gruff_tests/test/test_area.rb
139
- test/gruff_tests/test/test_bar.rb
140
- test/gruff_tests/test/test_pie.rb
141
- test/gruff_tests/test/test_net.rb
142
- test/gruff_tests/test/test_mini_bar.rb
143
- test/gruff_tests/test/test_stacked_bar.rb
144
- test/gruff_tests/test/monkey_gruff.rb
145
- test/gruff_tests/test/test_accumulator_bar.rb
146
- test/gruff_tests/test/test_stacked_area.rb
147
- test/gruff_tests/test/test_sidestacked_bar.rb
148
- test/gruff_tests/test/test_line.rb
149
- test/gruff_tests/test/test_side_bar.rb
150
- test/gruff_tests/test/test_mini_side_bar.rb
151
- test/gruff_tests/test/gruff_test_case.rb
152
- test/gruff_tests/test/test_mini_pie.rb
153
- test/gruff_tests/test/test_spider.rb
154
- test/spec/draw_spec.rb
155
- test/spec/pixel_spec.rb
156
- test/spec/image_constants.rb
157
- test/spec/image_spec.rb
158
- test/spec/stories/image_filling_steps.rb
159
- test/spec/stories/geometry_story.rb
160
- test/spec/stories/image_filling_story.rb
161
- test/spec/stories/geometry_runner.rb
162
- test/spec/stories/geometry_steps.rb
163
- test/spec/stories/image_filling_runner.rb
164
- test/images/clown.jpg
165
- test/images/texture.jpg
@@ -1,13 +0,0 @@
1
- require "rubygems"
2
- require 'spec/story'
3
-
4
- require File.join(File.dirname(__FILE__), '..', '..', '..','lib','RMagick')
5
-
6
- include Magick
7
-
8
- require File.join(File.dirname(__FILE__), 'geometry_steps.rb')
9
-
10
-
11
- with_steps_for(:geometry) do
12
- run File.join(File.dirname(__FILE__), 'geometry_story.rb')
13
- end
@@ -1,24 +0,0 @@
1
- steps_for(:geometry) do
2
- Given("a new Image sized $width x $height") do |width, height|
3
- @image = Image.new(width.to_i, height.to_i)
4
- end
5
-
6
- Given("a new Geometry from string $geometry") do |geometry|
7
- @geometry = Geometry.from_s(geometry)
8
- end
9
-
10
- When("changing geometry") do
11
- @image.change_geometry(@geometry) do |cols, rows, image|
12
- @new_width = cols
13
- @new_height = rows
14
- end
15
- end
16
-
17
- Then("the new width should be $value") do |value|
18
- @new_width.should eql(value.to_f)
19
- end
20
-
21
- Then("the new height should be $value") do |value|
22
- @new_height.should eql(value.to_f)
23
- end
24
- end
@@ -1,116 +0,0 @@
1
- Story: changing geometry
2
- As a developer
3
- I want to resize an image using a geometry
4
- So that I can do some cool stuff.
5
-
6
- Scenario: the geometry is a simple one, and the ratios are both >1
7
- Given a new Image sized 600 x 300
8
- And a new Geometry from string 300x200
9
- When changing geometry
10
- Then the new width should be 300
11
- And the new height should be 150
12
-
13
- Scenario: the geometry is a PercentGeometry, and the ratios are both >1
14
- Given a new Image sized 600 x 300
15
- And a new Geometry from string 100x70%
16
- When changing geometry
17
- Then the new width should be 600
18
- And the new height should be 210
19
-
20
- Scenario: the geometry is a AspectGeometry, and the ratios are both >1
21
- Given a new Image sized 600 x 300
22
- And a new Geometry from string 100x70!
23
- When changing geometry
24
- Then the new width should be 100
25
- And the new height should be 70
26
-
27
- Scenario: the geometry is a LessGeometry, and the ratios are both >1, (smaller)
28
- Given a new Image sized 150 x 125
29
- And a new Geometry from string 300x200<
30
- When changing geometry
31
- Then the new width should be 240
32
- And the new height should be 200
33
-
34
- Scenario: the geometry is a LessGeometry, and the ratios are both >1, (bigger)
35
- Given a new Image sized 600 x 300
36
- And a new Geometry from string 300x200<
37
- When changing geometry
38
- Then the new width should be 600
39
- And the new height should be 300
40
-
41
- Scenario: the geometry is a GreaterGeometry, and the ratios are both >1, (smaller)
42
- Given a new Image sized 150 x 125
43
- And a new Geometry from string 300x200>
44
- When changing geometry
45
- Then the new width should be 150
46
- And the new height should be 125
47
-
48
- Scenario: the geometry is a GreaterGeometry, and the ratios are both >1, (bigger)
49
- Given a new Image sized 600 x 300
50
- And a new Geometry from string 300x200>
51
- When changing geometry
52
- Then the new width should be 300
53
- And the new height should be 150
54
-
55
- Scenario: the geometry is a AreaGeometry, and the ratio is >1
56
- Given a new Image sized 600 x 300
57
- And a new Geometry from string 300@
58
- When changing geometry
59
- Then the new width should be 24
60
- And the new height should be 12
61
-
62
- Scenario: the geometry is a simple one, and the ratios are mixed
63
- Given a new Image sized 300 x 600
64
- And a new Geometry from string 300x200
65
- When changing geometry
66
- Then the new width should be 100
67
- And the new height should be 200
68
-
69
- Scenario: the geometry is a PercentGeometry, and the ratios are mixed
70
- Given a new Image sized 300 x 600
71
- And a new Geometry from string 100x70%
72
- When changing geometry
73
- Then the new width should be 300
74
- And the new height should be 420
75
-
76
- Scenario: the geometry is a AspectGeometry, and the ratios are mixed
77
- Given a new Image sized 300 x 600
78
- And a new Geometry from string 100x70!
79
- When changing geometry
80
- Then the new width should be 100
81
- And the new height should be 70
82
-
83
- Scenario: the geometry is a LessGeometry, and the ratios are mixed, (smaller)
84
- Given a new Image sized 125 x 150
85
- And a new Geometry from string 300x200<
86
- When changing geometry
87
- Then the new width should be 167
88
- And the new height should be 200
89
-
90
- Scenario: the geometry is a LessGeometry, and the ratios are mixed, (bigger)
91
- Given a new Image sized 400 x 600
92
- And a new Geometry from string 300x200<
93
- When changing geometry
94
- Then the new width should be 400
95
- And the new height should be 600
96
-
97
- Scenario: the geometry is a GreaterGeometry, and the ratios are mixed, (smaller)
98
- Given a new Image sized 125 x 150
99
- And a new Geometry from string 300x200>
100
- When changing geometry
101
- Then the new width should be 125
102
- And the new height should be 150
103
-
104
- Scenario: the geometry is a GreaterGeometry, and the ratios are mixed, (bigger)
105
- Given a new Image sized 400 x 600
106
- And a new Geometry from string 300x200>
107
- When changing geometry
108
- Then the new width should be 133
109
- And the new height should be 200
110
-
111
- Scenario: the geometry is a AreaGeometry, and the ratio is <1
112
- Given a new Image sized 300 x 600
113
- And a new Geometry from string 300@
114
- When changing geometry
115
- Then the new width should be 12
116
- And the new height should be 24
@@ -1,13 +0,0 @@
1
- require "rubygems"
2
- require 'spec/story'
3
-
4
- require File.join(File.dirname(__FILE__), '..', '..', '..','lib','RMagick')
5
-
6
- include Magick
7
-
8
- require File.join(File.dirname(__FILE__), 'image_filling_steps.rb')
9
-
10
-
11
- with_steps_for(:image) do
12
- run File.join(File.dirname(__FILE__), 'image_filling_story.rb')
13
- end
@@ -1,64 +0,0 @@
1
- steps_for(:image) do
2
- Given("a new GradientFill with starting line $x1 $y1 $x2 $y2 with start color: $start_color and end color: $end_color") do |x1, y1, x2, y2, start_color, end_color|
3
- @fill = GradientFill.new(x1.to_i, y1.to_i, x2.to_i, y2.to_i, '#'+start_color, '#'+end_color)
4
- end
5
-
6
- Given("a new GradientFill with starting point $x $y with start color: $start_color and end color: $end_color") do |x, y, start_color, end_color|
7
- @fill = GradientFill.new(x.to_i, y.to_i, x.to_i, y.to_i, '#'+start_color, '#'+end_color)
8
- end
9
-
10
- Given("a new Image $image_name with extension $extension") do |image_name, extension|
11
- @image = Image.read(File.join(File.dirname(__FILE__), '..', '..', 'images', image_name+'.'+extension))
12
- end
13
-
14
- Given("a new TextureFill from image") do
15
- @fill = TextureFill.new(@image.first)
16
- end
17
-
18
- When("filling a new image sized $columns $rows with the Fill object") do |columns, rows|
19
- begin
20
- @image = Image.new(columns.to_i, rows.to_i, @fill)
21
- rescue
22
- @image = nil
23
- end
24
- end
25
-
26
- Then("the new image should not be $value") do |value|
27
- expected_value = case value
28
- when 'nil': nil
29
- when 'false': false
30
- when 'true': true
31
- when value.to_i.to_s: value.to_i
32
- when value.to_f.to_s: value.to_f
33
- else
34
- value
35
- end
36
- @image.should_not be expected_value
37
- end
38
-
39
- Then("the new image should be $value") do |value|
40
- expected_value = case value
41
- when 'nil': nil
42
- when 'false': false
43
- when 'true': true
44
- when value.to_i.to_s: value.to_i
45
- when value.to_f.to_s: value.to_f
46
- else
47
- value
48
- end
49
- @image.should be expected_value
50
- end
51
-
52
- # TODO: Refactor... but how?
53
- def parse_value(value)
54
- case value
55
- when 'nil': nil
56
- when 'false': false
57
- when 'true': true
58
- when value.to_i.to_s: value.to_i
59
- when value.to_f.to_s: value.to_f
60
- else
61
- value
62
- end
63
- end
64
- end
@@ -1,41 +0,0 @@
1
- Story: filling a background
2
- As a developer
3
- I want to fill an empty image with a GradientFill
4
- So that I can have a beautiful gradient in it.
5
-
6
- # Vertical line (GradientFill)
7
- Scenario: the starting line is the left border
8
- Given a new GradientFill with starting line 0 0 0 100 with start color: 900 and end color: 000
9
- When filling a new image sized 300 100 with the Fill object
10
- Then the new image should not be nil
11
-
12
- # Radial gradient (GradientFill)
13
- Scenario: the starting point is the 0 0
14
- Given a new GradientFill with starting point 0 0 with start color: 900 and end color: 000
15
- When filling a new image sized 300 100 with the Fill object
16
- Then the new image should not be nil
17
-
18
- # Horizontal line (GradientFill)
19
- Scenario: the starting line is an horizontal one
20
- Given a new GradientFill with starting line 0 150 200 150 with start color: 900 and end color: 000
21
- When filling a new image sized 300 300 with the Fill object
22
- Then the new image should not be nil
23
-
24
- # Horizontal_diagonal line (GradientFill)
25
- Scenario: the starting line is a horizontal_diagonal one.
26
- Given a new GradientFill with starting line 100 0 200 300 with start color: 900 and end color: 000
27
- When filling a new image sized 300 300 with the Fill object
28
- Then the new image should not be nil
29
-
30
- # Vertical_diagonal line (GradientFill)
31
- Scenario: the starting line is a vertical_diagonal one.
32
- Given a new GradientFill with starting line 0 100 300 200 with start color: 900 and end color: 000
33
- When filling a new image sized 300 300 with the Fill object
34
- Then the new image should not be nil
35
-
36
- # Texture filling (TextureFill)
37
- Scenario: filling an image with a texture.
38
- Given a new Image texture with extension jpg
39
- And a new TextureFill from image
40
- When filling a new image sized 300 300 with the Fill object
41
- Then the new image should not be nil