rainbow_gradient 0.0.6 → 0.0.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cb79c41b47fd5c4ef9c145bcf5fca9c22b7542f9
4
- data.tar.gz: 18be4286ebceea937cbdfca2f9b336cbcde0adb0
3
+ metadata.gz: f6551c5f236fcc474c4c139ccf7e22dbc5c9a335
4
+ data.tar.gz: 0ef61723ad371ba224e9a5139f2d12aac3e2efbc
5
5
  SHA512:
6
- metadata.gz: 7df48a93150dcd667c8dfbbc89fbc4ac8f310928477b9feda1da2fb0c9db786ebc3b430beecea02f2b16386e59e26a9b60d5cf6f97bbeb494136f2387ffb87b1
7
- data.tar.gz: 4f026e45176d9845f664ca63a6610b7e0a11a77a2c12c9a8c92cb9ca6648e5c97c643798b5c84b79f8abeeb04b0ab2cf48a25cf0ee58c54048bd2491cf52e6bd
6
+ metadata.gz: 8c5dc7c77e7c85ce02f4808278ec5b4691f9fbc12842f9f216f202a107e197504c19c8abecb57a58f2c568246848621fa0f28e79e76ab02e41d3bc118870a2e9
7
+ data.tar.gz: ef1e31c554fe6ac4b7666deb7c1f4d32ab2b89be99bb29ff8b46ee72bc303976de7532fd37e57ccaac436ad7195bf084900c7131fb599800d3e4fae697f9f7c3
@@ -14,8 +14,8 @@ module Rainbow
14
14
  @to_color = to_color
15
15
  @mid_point = mid_point
16
16
 
17
- @current_x = nil
18
- @previous = nil
17
+ @current_x = nil
18
+ @previous = nil
19
19
  end
20
20
 
21
21
  def gradient=(gradient)
@@ -144,8 +144,8 @@ module Rainbow
144
144
 
145
145
  color_ranges.each_with_index do |color_range, index|
146
146
  color_range.previous = previous_color_range
147
- color_range.gradient = self
148
147
  color_range.opacity_ranges = opacity_ranges
148
+ color_range.gradient = self
149
149
 
150
150
  # When the first color location is not 0
151
151
  x_coverred += paint_prefix(canvas, color_range, x_coverred) if index == 0
@@ -34,7 +34,9 @@ module Rainbow
34
34
  elsif last_range.to_opacity.location < 100 && x > last_range.to_location_in_pixel
35
35
  ranges.last
36
36
  else
37
- raise "Cannot find current opacity range! .(#{first_range.from_location_in_pixel} - #{last_range.to_location_in_pixel}); (#{x})"
37
+ ranges.last
38
+ # err_msg = "(#{x}) (#{first_range.from_location_in_pixel} - #{last_range.to_location_in_pixel})"
39
+ # raise "Cannot find current opacity range! #{err_msg}"
38
40
  end
39
41
  end
40
42
  end
@@ -1,3 +1,3 @@
1
1
  module Rainbow
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rainbow_gradient
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sophy Eung
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-05 00:00:00.000000000 Z
11
+ date: 2014-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chunky_png