glimmer-dsl-libui 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +2 -2
- data/VERSION +1 -1
- data/glimmer-dsl-libui.gemspec +0 -0
- data/lib/glimmer/libui/shape/polybezier.rb +12 -0
- data/lib/glimmer/libui/shape/polygon.rb +11 -0
- data/lib/glimmer/libui/shape/polyline.rb +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08fe50ceac6ad2e11ec6599ba592d0a040cd4b7158a788dd8d001fddfa7e337e'
|
4
|
+
data.tar.gz: b10af93758d8b4141962c9b73c87f16419f302785b29b84cf62befe86181d507
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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.
|
1
|
+
0.5.3
|
data/glimmer-dsl-libui.gemspec
CHANGED
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.
|
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-
|
11
|
+
date: 2022-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: glimmer
|