glimmer-dsl-libui 0.5.2 → 0.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
  SHA256:
3
- metadata.gz: e5fd4f6d3b6fcc780223f17cd51767f153a77c73472434fdc8d13995ba8ddc00
4
- data.tar.gz: 965a9726bf24afe64ac5e5288e60e9b9a2f1dd2e7ae6f81e49fbfead40bc07ed
3
+ metadata.gz: '08fe50ceac6ad2e11ec6599ba592d0a040cd4b7158a788dd8d001fddfa7e337e'
4
+ data.tar.gz: b10af93758d8b4141962c9b73c87f16419f302785b29b84cf62befe86181d507
5
5
  SHA512:
6
- metadata.gz: 9f3e4b130032060d4ea47528c6b6f80c8080917a9d50fcb3f0d4d11718594f1913e6a417c83d25a7e8c74136a7ce3597bf501f29339f48aa3ea577532f0af5e2
7
- data.tar.gz: 66f8aa203283d3a4ef570690573c6344b0024f57164abfd16502153efa9ad49b1eaedf8d204a9723882fd86068bf2be44f30eb3b890b4e1d20ba73189677ca2e
6
+ metadata.gz: ffcf60fe7615eaac2109035a3ce64510ca2f76c5726c2c1c48fe0adba98ad1780c5f599fc9cb154ed789571710e5e2239f950e8dc16ec041f4727e5d0bfcef53
7
+ data.tar.gz: 4bb634aec81f105cd2de9aa9b2e0e3b4bd9c0eb1e715b8309cbdb4f7cd42113631e2f9d51e3db14ea9362bde930d6602ee23d7df6bb987edaf337a0d94f2756d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.5.3
4
+
5
+ - Support `polyline` `bounding_box` (minx, miny, width, height), `contain?` method (checking if shape contains point inside) and `include?` method (checking on outline if stroked and inside if filled?)
6
+ - Support `polygon` `bounding_box` (minx, miny, width, height), `contain?` method (checking if shape contains point inside) and `include?` method (checking on outline if stroked and inside if filled?)
7
+ - Support `polybezier` `bounding_box` (minx, miny, width, height), `contain?` method (checking if shape contains point inside) and `include?` method (checking on outline if stroked and inside if filled?)
8
+
3
9
  ## 0.5.2
4
10
 
5
11
  - Support `line` `bounding_box` (minx, miny, width, height), `contain?` method (checking if shape contains point inside) and `include?` method (checking on outline if stroked and inside if filled?)
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for LibUI 0.5.2
1
+ # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for LibUI 0.5.3
2
2
  ## Prerequisite-Free Ruby Desktop Development GUI Library
3
3
  [![Gem Version](https://badge.fury.io/rb/glimmer-dsl-libui.svg)](http://badge.fury.io/rb/glimmer-dsl-libui)
4
4
  [![Join the chat at https://gitter.im/AndyObtiva/glimmer](https://badges.gitter.im/AndyObtiva/glimmer.svg)](https://gitter.im/AndyObtiva/glimmer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
@@ -519,7 +519,7 @@ gem install glimmer-dsl-libui
519
519
  Or install via Bundler `Gemfile`:
520
520
 
521
521
  ```ruby
522
- gem 'glimmer-dsl-libui', '~> 0.5.2'
522
+ gem 'glimmer-dsl-libui', '~> 0.5.3'
523
523
  ```
524
524
 
525
525
  Test that installation worked by running the [Meta-Example](#examples):
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.2
1
+ 0.5.3
Binary file
@@ -39,6 +39,18 @@ module Glimmer
39
39
  end
40
40
  super
41
41
  end
42
+
43
+ def perfect_shape
44
+ perfect_shape_dependencies = PerfectShape::MultiPoint.normalize_point_array(point_array)
45
+ if perfect_shape_dependencies != @perfect_shape_dependencies
46
+ point_array = @perfect_shape_dependencies = perfect_shape_dependencies
47
+ path_shapes = [point_array.first]
48
+ bezier_shape_points = point_array.drop(1).each.with_index.to_a.group_by {|pair| pair.last/3}.values.map {|arr| arr.map(&:first)}
49
+ path_shapes += bezier_shape_points.map { |points| PerfectShape::CubicBezierCurve.new(points: points) }
50
+ @perfect_shape = PerfectShape::Path.new(closed: false, shapes: path_shapes)
51
+ end
52
+ @perfect_shape
53
+ end
42
54
  end
43
55
  end
44
56
  end
@@ -40,6 +40,17 @@ module Glimmer
40
40
  end
41
41
  super
42
42
  end
43
+
44
+ def perfect_shape
45
+ perfect_shape_dependencies = PerfectShape::MultiPoint.normalize_point_array(point_array)
46
+ if perfect_shape_dependencies != @perfect_shape_dependencies
47
+ point_array = @perfect_shape_dependencies = perfect_shape_dependencies
48
+ path_shapes = [point_array.first]
49
+ path_shapes += point_array.drop(1).map { |point| PerfectShape::Line.new(points: [point]) }
50
+ @perfect_shape = PerfectShape::Path.new(closed: true, shapes: path_shapes)
51
+ end
52
+ @perfect_shape
53
+ end
43
54
  end
44
55
  end
45
56
  end
@@ -39,6 +39,17 @@ module Glimmer
39
39
  end
40
40
  super
41
41
  end
42
+
43
+ def perfect_shape
44
+ perfect_shape_dependencies = PerfectShape::MultiPoint.normalize_point_array(point_array)
45
+ if perfect_shape_dependencies != @perfect_shape_dependencies
46
+ point_array = @perfect_shape_dependencies = perfect_shape_dependencies
47
+ path_shapes = [point_array.first]
48
+ path_shapes += point_array.drop(1).map { |point| PerfectShape::Line.new(points: [point]) }
49
+ @perfect_shape = PerfectShape::Path.new(closed: false, shapes: path_shapes)
50
+ end
51
+ @perfect_shape
52
+ end
42
53
  end
43
54
  end
44
55
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer-dsl-libui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Maleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-18 00:00:00.000000000 Z
11
+ date: 2022-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: glimmer