processing 0.5.10 → 0.5.12

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
  SHA256:
3
- metadata.gz: a6f8de5ad0bdc4fa06ebd896bb4ca1d251f110514ae5b829c54860e7cb05e760
4
- data.tar.gz: dc34a861ca6f57b8a7dbeceba4038bf244299519476c81344d384f574584da60
3
+ metadata.gz: cdb98f9abd746cf56051dfd46120cc8bcb3010bb47a7588b28c6419ec9811815
4
+ data.tar.gz: 6f0295c45400eb60ebbd41b9c066e529d25abeffae07410400e4839e313811a9
5
5
  SHA512:
6
- metadata.gz: 8f8d5a50f1986020d2d86ebcca58f35e2973fdc5d3637b8b951ec416e2ac44d8dfd11f7eb5f75e0e336625e969651ba69af1eb5eabe034a033467caba5c4a265
7
- data.tar.gz: 4f66a4794db94888ae7a78b366373c32076ba1f5506fb6915baeb7c7afc98e07df9d1766ecd1228fb89bd979c288cc8a5fdf3ca3cd21314bb5d811abf8f75d21
6
+ metadata.gz: 4da5a73ee018bb2ade02e0ed2517656c1174af64f48e2120eac9b65df5b086995a5d518799beb5141f74eba109908ac74198ad4241c6ed464c78fc7b1d0b806b
7
+ data.tar.gz: 41a845d4c73087296b80d1de72c5f6caee93806e7920b7a9dee9f9bd97e51ffc0abc3de54be8f9fac9e0c959086078bb0f6ac5811e0cf43807de64b5328cbcc8
data/ChangeLog.md CHANGED
@@ -1,6 +1,16 @@
1
1
  # processing ChangeLog
2
2
 
3
3
 
4
+ ## [v0.5.12] - 2023-05-26
5
+
6
+ - pushStyle/popStyle do not manage filter state
7
+
8
+
9
+ ## [v0.5.11] - 2023-05-21
10
+
11
+ - copy() and blend() now work with tint color
12
+
13
+
4
14
  ## [v0.5.10] - 2023-05-19
5
15
 
6
16
  - Vector#array takes parameter for number of dimensions
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.10
1
+ 0.5.12
@@ -0,0 +1,15 @@
1
+ %w[xot rays reflex processing]
2
+ .map {|s| File.expand_path "../../#{s}/lib", __dir__}
3
+ .each {|s| $:.unshift s if !$:.include?(s) && File.directory?(s)}
4
+
5
+ require 'processing'
6
+ using Processing
7
+
8
+
9
+ icon = loadImage 'https://xord.org/rubysketch/images/rubysketch128.png'
10
+
11
+ draw do
12
+ background 0, 10
13
+ image icon, 100, 100
14
+ filter INVERT
15
+ end
@@ -1036,8 +1036,11 @@ module Processing
1036
1036
  #
1037
1037
  def blend(img = nil, sx, sy, sw, sh, dx, dy, dw, dh, mode)
1038
1038
  assertDrawing__
1039
+ tint = @tint__ ? toRGBA__(*@tint__) : 1
1039
1040
  img ||= self
1040
- img.drawImage__ @painter__, sx, sy, sw, sh, dx, dy, dw, dh, blend_mode: mode
1041
+ img.drawImage__(
1042
+ @painter__, sx, sy, sw, sh, dx, dy, dw, dh,
1043
+ fill: tint, stroke: :none, blend_mode: mode)
1041
1044
  end
1042
1045
 
1043
1046
  # Saves screen image to file.
@@ -1153,7 +1156,6 @@ module Processing
1153
1156
  @textAlignH__,
1154
1157
  @textAlignV__,
1155
1158
  @tint__,
1156
- @filter__,
1157
1159
  ]
1158
1160
  block.call if block
1159
1161
  nil
@@ -1185,8 +1187,7 @@ module Processing
1185
1187
  @imageMode__,
1186
1188
  @textAlignH__,
1187
1189
  @textAlignV__,
1188
- @tint__,
1189
- @filter__ = @styleStack__.pop
1190
+ @tint__ = @styleStack__.pop
1190
1191
  nil
1191
1192
  end
1192
1193
 
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.10
4
+ version: 0.5.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - xordog
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-19 00:00:00.000000000 Z
11
+ date: 2023-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xot
@@ -130,6 +130,7 @@ files:
130
130
  - examples/camera.rb
131
131
  - examples/clock.rb
132
132
  - examples/delay_camera.rb
133
+ - examples/filter.rb
133
134
  - examples/hello.rb
134
135
  - examples/image.rb
135
136
  - examples/shake.rb