gmagick 0.0.1

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.
@@ -0,0 +1,40 @@
1
+ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
+ require 'gmagick'
3
+ FILES_PATH = File.dirname(__FILE__) + '/files'
4
+ SRC_PATH = FILES_PATH + '/src'
5
+ DICE_PATH = SRC_PATH + '/dice.png'
6
+ FLOWER_PATH = SRC_PATH + '/flower.jpg'
7
+ EARTH_PATH = SRC_PATH + '/earth.gif'
8
+ DST_PATH = FILES_PATH + '/dst'
9
+ DICE2_PATH = DST_PATH + '/dice2.png'
10
+ DICE_ROTATE_PATH = DST_PATH + '/dice_rotate.png'
11
+ DICE_ROTATE2_PATH = DST_PATH + '/dice_rotate2.png'
12
+ DICE_DRAW_PATH = DST_PATH + '/dice_draw.png'
13
+ DICE_RESAMPLE_PATH = DST_PATH + '/dice_resample.png'
14
+ DICE_FLIP_PATH = DST_PATH + '/dice_flip.png'
15
+ DICE_FLOP_PATH = DST_PATH + '/dice_flop.png'
16
+ DICE_CROP_PATH = DST_PATH + '/dice_crop.png'
17
+ DICE_BORDER_PATH = DST_PATH + '/dice_border.png'
18
+ DICE_FRAME_PATH = DST_PATH + '/dice_frame.png'
19
+ DICE_BLUR_PATH = DST_PATH + '/dice_blur.png'
20
+ DICE_SWIRL_PATH = DST_PATH + '/dice_swirl.png'
21
+ DICE_CHARCOAL_PATH = DST_PATH + '/dice_charcoal.png'
22
+ DICE_OIL_PAINT_PATH = DST_PATH + '/dice_oil_paint.png'
23
+ DICE_CYCLE_COLORMAP_PATH = DST_PATH + '/dice_cycle_colormap.png'
24
+ DICE_SOLARIZE_PATH = DST_PATH + '/dice_solarize.png'
25
+ DICE_SHEAR_PATH = DST_PATH + '/dice_shear.png'
26
+ DRAW_ANNOTATION_PATH = DST_PATH + '/dice_draw_annotation.png'
27
+ DRAW_ARC_PATH = DST_PATH + '/dice_draw_arc.png'
28
+ DRAW_CIRCLE_PATH = DST_PATH + '/dice_draw_circle.png'
29
+ DRAW_ELLIPSE_PATH = DST_PATH + '/dice_draw_ellipse.png'
30
+ DRAW_LINE_PATH = DST_PATH + '/dice_draw_line.png'
31
+ DRAW_POINT_PATH = DST_PATH + '/dice_draw_point.png'
32
+ DRAW_RECTANGLE_PATH = DST_PATH + '/dice_draw_rectangle.png'
33
+
34
+ def execute_draw(path)
35
+ image = Gmagick::Image.new(DICE_PATH)
36
+ drawing = Gmagick::Drawing.new
37
+ yield drawing
38
+ image.draw(drawing)
39
+ image.write(path)
40
+ end
metadata ADDED
@@ -0,0 +1,115 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gmagick
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - aoyagikouhei
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-07-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: GraphicsMagick C extension
56
+ email:
57
+ - aoyagi.kouhei@gmail.com
58
+ executables: []
59
+ extensions:
60
+ - ext/gmagick/extconf.rb
61
+ extra_rdoc_files: []
62
+ files:
63
+ - ".gitignore"
64
+ - ".rspec"
65
+ - ".travis.yml"
66
+ - Gemfile
67
+ - LICENSE.txt
68
+ - README.md
69
+ - Rakefile
70
+ - ext/gmagick/depend
71
+ - ext/gmagick/extconf.rb
72
+ - ext/gmagick/gmagick.h
73
+ - ext/gmagick/gmdrawing.c
74
+ - ext/gmagick/gmimage.c
75
+ - ext/gmagick/gminit.c
76
+ - ext/gmagick/gmpixel.c
77
+ - ext/gmagick/gmutil.c
78
+ - gmagick.gemspec
79
+ - lib/gmagick.rb
80
+ - lib/gmagick/version.rb
81
+ - spec/files/src/dice.png
82
+ - spec/files/src/earth.gif
83
+ - spec/files/src/flower.jpg
84
+ - spec/gmagick_spec.rb
85
+ - spec/spec_helper.rb
86
+ homepage: ''
87
+ licenses:
88
+ - MIT
89
+ metadata: {}
90
+ post_install_message:
91
+ rdoc_options: []
92
+ require_paths:
93
+ - lib
94
+ required_ruby_version: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ required_rubygems_version: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ requirements: []
105
+ rubyforge_project:
106
+ rubygems_version: 2.3.0
107
+ signing_key:
108
+ specification_version: 4
109
+ summary: GraphicsMagick C extension
110
+ test_files:
111
+ - spec/files/src/dice.png
112
+ - spec/files/src/earth.gif
113
+ - spec/files/src/flower.jpg
114
+ - spec/gmagick_spec.rb
115
+ - spec/spec_helper.rb