sugarcube 1.5.2 → 1.5.3

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: bcbd6cc3b891a5629f4076ad76609dd7c5dbc77d
4
- data.tar.gz: 58279eb857e9af976a24349e1d61d1f1f0e6f392
3
+ metadata.gz: 5c97e80c9fbc0c25b20886461e3e5aa41d48df97
4
+ data.tar.gz: c380e00cb3e5ebf62e8a22a362382013c8f3a08c
5
5
  SHA512:
6
- metadata.gz: 684329a0721adf33fcc0b5c8fee70af989e1fc3a7cc07607335a8766f6b93ee5e44aa7331fb2ed19ae2b050b6f09066fc51389c0b6e2a1b8d0a3dd414fd2504f
7
- data.tar.gz: 14fc25bc8e77d8580442921ef792ba40311aa761ff75c26d191514abcfe16cc396a187ca62b6886c97d8474d697f3b588cd18d8cf04a5837a9c98d15439e5073
6
+ metadata.gz: e0f45b6a1954c134c693dbaca76453223c5c3be81ca9567072a06078d55da35f29beaa4361ee04e4de02f73b4eb3a92f87c92daf3a19eb2b24b33c9941469016
7
+ data.tar.gz: cc81fb3b7dbf13739cec164203069062afc2d196c381e14edefe2ecc8fe18053a1bd60723861005bf155c9efa221612ff3bebcefee813e60e4b5f11cbedc1e5a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sugarcube (1.5.2)
4
+ sugarcube (1.5.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -483,10 +483,16 @@ image_ab = image_a << image_b
483
483
  UIImage.canvas([100, 100]) do |context| # opaque: false, scale: UIScreen.mainScreen.scale
484
484
  # draw here!
485
485
  end
486
+
486
487
  # use an image as a background to draw on
487
488
  image.draw do |context|
488
489
  # draw here!
489
490
  end
491
+
492
+ # size
493
+ image = Image.canvas(size: [10, 20])
494
+ image.width # => 10
495
+ image.height # => 20
490
496
  ```
491
497
 
492
498
  ###### CIFilter additions
@@ -1,3 +1,3 @@
1
1
  module SugarCube
2
- Version = '1.5.2'
2
+ Version = '1.5.3'
3
3
  end
@@ -6,4 +6,12 @@ class UIImage
6
6
  UIImageView.alloc.initWithImage(self)
7
7
  end
8
8
 
9
+ def width
10
+ self.size.width
11
+ end
12
+
13
+ def height
14
+ self.size.height
15
+ end
16
+
9
17
  end
data/spec/uiimage_spec.rb CHANGED
@@ -10,6 +10,16 @@ describe 'UIImage' do
10
10
  CGSizeEqualToSize(UIImage.canvas(size: [10, 10]).size, [10, 10]).should == true
11
11
  end
12
12
 
13
+ it 'should return width' do
14
+ image = UIImage.canvas(size: [10, 10])
15
+ image.width.should == 10
16
+ end
17
+
18
+ it 'should return height' do
19
+ image = UIImage.canvas(size: [10, 10])
20
+ image.height.should == 10
21
+ end
22
+
13
23
  it 'should have the right scale' do
14
24
  UIImage.canvas(size: [10, 10], scale: 2).scale.should == 2
15
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sugarcube
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Colin T.A. Gray
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2014-03-04 00:00:00.000000000 Z
14
+ date: 2014-03-05 00:00:00.000000000 Z
15
15
  dependencies: []
16
16
  description: |
17
17
  == Description