rubysketch 0.3.14 → 0.3.15

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: 11106527579020a3b5bd37a616605f659099ca5523cb314399850652a647c96f
4
- data.tar.gz: a18591f7c86b38291a11eac844ff6da0a43a3916c79df3f7bf4eff330a5f1ebf
3
+ metadata.gz: 75d494d2c77928d0cac0bd8d6c29f28004098baed821870169a5829673eedb54
4
+ data.tar.gz: 29f153c1caa566e87efc6b3158ff8e17367ef57c78ed981a4e4f5a5a0a410ee1
5
5
  SHA512:
6
- metadata.gz: 91f78963b6a956b4a68194963fb4de22a007ba075aad59d9a69fe752b596615bbf21189e5e404cb4d8346a3f287d6b7b061d027dc5e05bf7598904f99e21342d
7
- data.tar.gz: 4a054bd08ebdaa62e3fab7dd853cad2aa95fa7f9d6ed414992d0d7df8eb6de7d17dd5fc27925d544f3aec9866ad3ccef0c9d5c5e09bdc7ed8703f31801d9dbe3
6
+ metadata.gz: 7076a1988f49df4df59499eeeee4871eee1b1f228fb7f61be118bfd0f8cbe2fd7b77d5ffddb76a2972bb11931a8f07de91b413afedc54896870f41689d03743f
7
+ data.tar.gz: e26017b018da1cf2866ea84479c8b6fa3d246956bf4a2ffd307cf3c34e891fe5b7284017cb32dfed54d8313576742240ef6e9cb282b3f6a3f2876387ce64df76
@@ -1,6 +1,11 @@
1
1
  # RubySketch ChangeLog
2
2
 
3
3
 
4
+ ## [0.3.15] - 2020-12-12
5
+
6
+ - delete temporary directory on launch
7
+
8
+
4
9
  ## [0.3.14] - 2020-12-12
5
10
 
6
11
  - fix loadImage() fails when Encoding.default_internal is not nil
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.14
1
+ 0.3.15
@@ -1764,6 +1764,8 @@ module RubySketch
1764
1764
  def initialize (window)
1765
1765
  @@context__ = self
1766
1766
 
1767
+ tmpdir__.tap {|dir| FileUtils.rm_r dir.to_s if dir.directory?}
1768
+
1767
1769
  @window__ = window
1768
1770
  init__ @window__.canvas, @window__.canvas_painter.paint {background 0.8}
1769
1771
 
@@ -1840,41 +1842,56 @@ module RubySketch
1840
1842
  nil
1841
1843
  end
1842
1844
 
1843
- def key (&block)
1845
+ # @private
1846
+ private def key__ (&block)
1844
1847
  @window__.key = block
1845
1848
  nil
1846
1849
  end
1847
1850
 
1851
+ # Define mousePressed block.
1852
+ #
1848
1853
  def mousePressed (&block)
1849
1854
  @mousePressedBlock__ = block if block
1850
1855
  @mousePressed__
1851
1856
  end
1852
1857
 
1858
+ # Define mouseReleased block.
1859
+ #
1853
1860
  def mouseReleased (&block)
1854
1861
  @mouseReleasedBlock__ = block if block
1855
1862
  nil
1856
1863
  end
1857
1864
 
1865
+ # Define mouseMoved block.
1866
+ #
1858
1867
  def mouseMoved (&block)
1859
1868
  @mouseMovedBlock__ = block if block
1860
1869
  nil
1861
1870
  end
1862
1871
 
1872
+ # Define mouseDragged block.
1873
+ #
1863
1874
  def mouseDragged (&block)
1864
1875
  @mouseDraggedBlock__ = block if block
1865
1876
  nil
1866
1877
  end
1867
1878
 
1879
+ # Define touchStarted block.
1880
+ #
1868
1881
  def touchStarted (&block)
1869
1882
  @touchStartedBlock__ = block if block
1870
1883
  nil
1871
1884
  end
1872
1885
 
1886
+ # Define touchEnded block.
1887
+ #
1873
1888
  def touchEnded (&block)
1874
1889
  @touchEndedBlock__ = block if block
1875
1890
  nil
1876
1891
  end
1877
1892
 
1893
+ # Define touchMoved block.
1894
+ #
1878
1895
  def touchMoved (&block)
1879
1896
  @touchMovedBlock__ = block if block
1880
1897
  nil
@@ -1937,10 +1954,18 @@ module RubySketch
1937
1954
  @window__.painter.pixel_density
1938
1955
  end
1939
1956
 
1957
+ # Returns window width.
1958
+ #
1959
+ # @return [Numeric] window width
1960
+ #
1940
1961
  def windowWidth ()
1941
1962
  @window__.width
1942
1963
  end
1943
1964
 
1965
+ # Returns window height.
1966
+ #
1967
+ # @return [Numeric] window height
1968
+ #
1944
1969
  def windowHeight ()
1945
1970
  @window__.height
1946
1971
  end
@@ -2430,7 +2455,7 @@ module RubySketch
2430
2455
  ext ||= File.extname uri
2431
2456
  raise "unsupported image type -- #{ext}" unless ext =~ /^\.?(png)$/i
2432
2457
 
2433
- tmpdir = Pathname(Dir.tmpdir) + Digest::SHA1.hexdigest(self.class.name)
2458
+ tmpdir = tmpdir__
2434
2459
  path = tmpdir + Digest::SHA1.hexdigest(uri)
2435
2460
  path = path.sub_ext ext
2436
2461
 
@@ -2449,6 +2474,11 @@ module RubySketch
2449
2474
  path.to_s
2450
2475
  end
2451
2476
 
2477
+ # @private
2478
+ private def tmpdir__ ()
2479
+ Pathname(Dir.tmpdir) + Digest::SHA1.hexdigest(self.class.name)
2480
+ end
2481
+
2452
2482
  end# Context
2453
2483
 
2454
2484
 
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.14
4
+ version: 0.3.15
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-11 00:00:00.000000000 Z
11
+ date: 2020-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: reflexion