rubysketch 0.3.12 → 0.3.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb34f91483c8d24fb65c537455d808c3f0f9ac337eed9199440623ba564ef710
4
- data.tar.gz: 2c7dd117d90a04210d256dd36185f599ca7527abbaad4dd48757cb83b49edfe8
3
+ metadata.gz: b0b393d392765c48e644231ab449ba437ab05bc61a3369c18b634dcdd7b156bc
4
+ data.tar.gz: 01444dfbf328a526dd607b125bfc03d1ae274b11e13817b5090442258843e63d
5
5
  SHA512:
6
- metadata.gz: 50ef4e1473605388da623a0e252061c4cd611969d9665bd5cf2212ed9a7930dd313915f2fb27879939a9ef0bea4e1d84bcc70349c6757a931dbfcd7fb30fa240
7
- data.tar.gz: 818c2ffc497f2f4f044832e702799ba005f826f03dcf626e8862dd1127b7061f6d1e4653dfe0ffcf07e3fc7a7b7579655387452a77f421a289de2660b2344a48
6
+ metadata.gz: c768f5c5948a8433d2e5b3317aecad587fb55dea24e45894bbf2c229acc8d61108804835c029ec10cfa5f59cb294bc2817db2f843782ea852274f2d4609b36c3
7
+ data.tar.gz: f638eb0330dd4bb4851375eb2b50b64dfbc7cee366b9d109162381fc7ebfcdb82f663d8457fbea80650a509e89223ced77825c087e45413d10131599c6d13688
@@ -1,6 +1,11 @@
1
1
  # RubySketch ChangeLog
2
2
 
3
3
 
4
+ ## [0.3.13] - 2020-12-12
5
+
6
+ - size(), createCanvas(): default pixelDensity is same as current value
7
+
8
+
4
9
  ## [0.3.12] - 2020-12-10
5
10
 
6
11
  - size() and createCanvas() take 'pixelDensity' parameter and default value is 1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.12
1
+ 0.3.13
@@ -1882,24 +1882,26 @@ module RubySketch
1882
1882
 
1883
1883
  # Changes canvas size.
1884
1884
  #
1885
- # @param width [Integer] new width
1886
- # @param height [Integer] new height
1885
+ # @param width [Integer] new width
1886
+ # @param height [Integer] new height
1887
+ # @param pixelDensity [Numeric] new pixel density
1887
1888
  #
1888
1889
  # @return [nil] nil
1889
1890
  #
1890
- def size (width, height, pixelDensity: 1)
1891
+ def size (width, height, pixelDensity: self.pixelDensity)
1891
1892
  resizeCanvas__ :size, width, height, pixelDensity
1892
1893
  nil
1893
1894
  end
1894
1895
 
1895
1896
  # Changes canvas size.
1896
1897
  #
1897
- # @param width [Integer] new width
1898
- # @param height [Integer] new height
1898
+ # @param width [Integer] new width
1899
+ # @param height [Integer] new height
1900
+ # @param pixelDensity [Numeric] new pixel density
1899
1901
  #
1900
1902
  # @return [nil] nil
1901
1903
  #
1902
- def createCanvas (width, height, pixelDensity: 1)
1904
+ def createCanvas (width, height, pixelDensity: self.pixelDensity)
1903
1905
  resizeCanvas__ :createCanvas, width, height, pixelDensity
1904
1906
  nil
1905
1907
  end
@@ -87,9 +87,11 @@ module RubySketch
87
87
 
88
88
  old_canvas = @canvas
89
89
  old_painter = @canvas_painter
90
+ cs = old_canvas&.color_space || Rays::RGBA
91
+ pd = pixel_density ||
92
+ old_painter&.pixel_density ||
93
+ painter .pixel_density
90
94
 
91
- cs = old_canvas&.color_space || Rays::RGBA
92
- pd = pixel_density || painter.pixel_density
93
95
  @canvas = Rays::Image.new width, height, cs, pd
94
96
  @canvas_painter = @canvas.painter
95
97
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubysketch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.12
4
+ version: 0.3.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - xordog
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-10 00:00:00.000000000 Z
11
+ date: 2020-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: reflexion