processing 0.5.25 → 0.5.26

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: f3b60eada02e0893ac99a0284c1d8c8063d0bb4cc9999447e79cf2c372459bb4
4
- data.tar.gz: b52fb442274a706d06bf74a1c1a09c4eb08a8d513ede7991f34400a0a40753e9
3
+ metadata.gz: b23f276afb978da023d28bafdb1d4fecdebe056cb9c0e99b34eeb4439cb3267c
4
+ data.tar.gz: 9f5416685952e8ad4d0cd0282ddffcd0e7c379baba882ab0a5b75f5d56b560f6
5
5
  SHA512:
6
- metadata.gz: 9e44c2c202ca95de52b5b60f18f095f6c48a44d1c391191d9737daa526ae6055e1f7c68834702e6e4204287f2ebb922a8641e9a831bcdfe20fc22038c65d0f99
7
- data.tar.gz: def47542188f549983cb05df41b24a568a149c7f791bea5048ed75852649e836f1dd3913f6ee5ae7976623f12f3887ae477f149b293abe32f284725fc93daa8a
6
+ metadata.gz: 3e5a0f5f9ebda260cbad860d9d5f44ca964f8f1cb1b54c290e3c8237d325745fee3a74aaae921c0b237d3c1a991cbf041428f49d04bb2342492dae7058ced727
7
+ data.tar.gz: 8f1da0d936ba3c8d1d57307700a04c685eb90bb6b0b37b5820ad176250de43a2a39a8d7acfdc1cf302f1a28a5acac8daa9c8449473e4c109b3fa1c6ce70c77b1
data/ChangeLog.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # processing ChangeLog
2
2
 
3
3
 
4
+ ## [v0.5.26] - 2023-07-30
5
+
6
+ - add windowOrientation()
7
+
8
+
4
9
  ## [v0.5.25] - 2023-07-21
5
10
 
6
11
  - Timer block can call drawing methods
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.25
1
+ 0.5.26
@@ -17,6 +17,14 @@ module Processing
17
17
  Touch = Processing::Touch
18
18
  Vector = Processing::Vector
19
19
 
20
+ # Portrait for windowOrientation
21
+ #
22
+ PORTRAIT = :portrait
23
+
24
+ # Landscape for windowOrientation
25
+ #
26
+ LANDSCAPE = :landscape
27
+
20
28
  # @private
21
29
  @@context__ = nil
22
30
 
@@ -53,11 +61,11 @@ module Processing
53
61
  @window__.after_draw = proc {endDraw__}
54
62
  @window__.update_canvas = proc {|i, p| updateCanvas__ i, p}
55
63
 
56
- @window__.instance_variable_set :@context, self
64
+ @window__.instance_variable_set :@context__, self
57
65
 
58
66
  # @private
59
67
  def @window__.draw_screen(painter)
60
- @context.drawImage__ painter
68
+ @context__.drawImage__ painter
61
69
  end
62
70
 
63
71
  drawFrame = -> {
@@ -441,6 +449,16 @@ module Processing
441
449
  nil
442
450
  end
443
451
 
452
+ # Sets window orientation mask
453
+ #
454
+ # @param [PORTRAIT, LANDSCAPE] orientations orientations that window can rotate to
455
+ #
456
+ # @return [nil] nil
457
+ #
458
+ def windowOrientation (*orientations)
459
+ @window__.orientations = orientations.flatten.uniq
460
+ end
461
+
444
462
  # Returns the x position of the window.
445
463
  #
446
464
  # @return [Numeric] horizontal position of the window
data/processing.gemspec CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |s|
28
28
  s.add_runtime_dependency 'xot', '~> 0.1.39'
29
29
  s.add_runtime_dependency 'rucy', '~> 0.1.39'
30
30
  s.add_runtime_dependency 'rays', '~> 0.1.43'
31
- s.add_runtime_dependency 'reflexion', '~> 0.1.49'
31
+ s.add_runtime_dependency 'reflexion', '~> 0.1.50'
32
32
 
33
33
  s.add_development_dependency 'rake'
34
34
  s.add_development_dependency 'test-unit'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: processing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.25
4
+ version: 0.5.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - xordog
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-21 00:00:00.000000000 Z
11
+ date: 2023-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xot
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.1.49
61
+ version: 0.1.50
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.1.49
68
+ version: 0.1.50
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement