perfect-shape 1.0.3 → 1.0.4

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: 4e9d2cae407980abba8c58b3a38979723ffbb95bd7b0cc832d33fbc6a60e1700
4
- data.tar.gz: fce964dcf5e15a9f4de977a70d6f95c31cd02ad5674b5ee546328be9c606e8a4
3
+ metadata.gz: d98187ae023d5501ed920790105a46340127a38a7a1b83143b9c69d4695dc60e
4
+ data.tar.gz: 4654765dbb6cf6f091677e95551f632cb65c2e739874d5cbe105c6dcd8a70645
5
5
  SHA512:
6
- metadata.gz: 27da7756bb313e2499c1aebd25ba92691140763bc8a41402e3202be4d9d80feab95392dd6cb1c655dc104cd9ab98c09cea22a9e7bf19fa5a8266a017d935212b
7
- data.tar.gz: 663348a23058f6e88f3e1bf28441692684fa6df9abd3579a5444e84609808a829c05d2b57742b3646094998c8725ec73fb35a733767117f811196ba191c0d05f
6
+ metadata.gz: e8b1217796e01a1325934ab73f90ef6edeeb392eeb74c83b21ed468cde9658b2cb0ff1cff42d7c79a62f1c978829584815910b8d5cc31df2a35c06704bd92ff7
7
+ data.tar.gz: c0a7be7c454bd95cb2a520ec9cd6db231ec51ab1fb7d1b106c1c19526052d37988c8269d96b594c75fa14b523c1222e90d73f237e60627d23c005336368edffa
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 1.0.4
4
+
5
+ - Add missing shapes (`Rectangle` and `Square`) to `Path::SHAPE_TYPES`
6
+
3
7
  ## 1.0.3
4
8
 
5
9
  - `Rectangle` and `Square` `#to_path_shapes` method, which decomposes them into `Point`s and `Line`s to be added to a `Path`
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Perfect Shape 1.0.3
1
+ # Perfect Shape 1.0.4
2
2
  ## Geometric Algorithms
3
3
  [![Gem Version](https://badge.fury.io/rb/perfect-shape.svg)](http://badge.fury.io/rb/perfect-shape)
4
4
  [![Test](https://github.com/AndyObtiva/perfect-shape/actions/workflows/ruby.yml/badge.svg)](https://github.com/AndyObtiva/perfect-shape/actions/workflows/ruby.yml)
@@ -7,20 +7,20 @@
7
7
 
8
8
  Additionally, [`PerfectShape::Math`](#perfectshapemath) contains some purely mathematical algorithms, like [IEEE 754-1985 Remainder](https://en.wikipedia.org/wiki/IEEE_754-1985).
9
9
 
10
- To ensure high accuracy, this library does all its mathematical operations with [`BigDecimal`](https://ruby-doc.org/stdlib-3.0.2/libdoc/bigdecimal/rdoc/BigDecimal.html) numbers.
10
+ To ensure accuracy and preciseness, this library does all its mathematical operations with [`BigDecimal`](https://ruby-doc.org/stdlib-3.0.2/libdoc/bigdecimal/rdoc/BigDecimal.html) numbers.
11
11
 
12
12
  ## Setup
13
13
 
14
14
  Run:
15
15
 
16
16
  ```
17
- gem install perfect-shape -v 1.0.3
17
+ gem install perfect-shape -v 1.0.4
18
18
  ```
19
19
 
20
20
  Or include in Bundler `Gemfile`:
21
21
 
22
22
  ```ruby
23
- gem 'perfect-shape', '~> 1.0.3'
23
+ gem 'perfect-shape', '~> 1.0.4'
24
24
  ```
25
25
 
26
26
  And, run:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.3
1
+ 1.0.4
@@ -24,6 +24,11 @@ require 'perfect_shape/point'
24
24
  require 'perfect_shape/line'
25
25
  require 'perfect_shape/quadratic_bezier_curve'
26
26
  require 'perfect_shape/cubic_bezier_curve'
27
+ require 'perfect_shape/arc'
28
+ require 'perfect_shape/ellipse'
29
+ require 'perfect_shape/circle'
30
+ require 'perfect_shape/rectangle'
31
+ require 'perfect_shape/square'
27
32
  require 'perfect_shape/multi_point'
28
33
 
29
34
  module PerfectShape
@@ -32,7 +37,7 @@ module PerfectShape
32
37
  include Equalizer.new(:shapes, :closed, :winding_rule)
33
38
 
34
39
  # Available class types for path shapes
35
- SHAPE_TYPES = [Array, PerfectShape::Point, PerfectShape::Line, PerfectShape::QuadraticBezierCurve, PerfectShape::CubicBezierCurve, PerfectShape::Arc, PerfectShape::Ellipse, PerfectShape::Circle]
40
+ SHAPE_TYPES = [Array, PerfectShape::Point, PerfectShape::Line, PerfectShape::QuadraticBezierCurve, PerfectShape::CubicBezierCurve, PerfectShape::Arc, PerfectShape::Ellipse, PerfectShape::Circle, PerfectShape::Rectangle, PerfectShape::Square]
36
41
 
37
42
  # Available winding rules
38
43
  WINDING_RULES = [:wind_even_odd, :wind_non_zero]
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: perfect-shape 1.0.3 ruby lib
5
+ # stub: perfect-shape 1.0.4 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "perfect-shape".freeze
9
- s.version = "1.0.3"
9
+ s.version = "1.0.4"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Andy Maleh".freeze]
14
- s.date = "2022-04-26"
14
+ s.date = "2022-05-15"
15
15
  s.description = "Perfect Shape is a collection of pure Ruby geometric algorithms that are mostly useful for GUI manipulation like checking viewport rectangle intersection or containment of a mouse click point in popular geometry shapes such as rectangle, square, arc (open, chord, and pie), ellipse, circle, polygon, and paths containing lines, quadratic b\u00E9zier curves, and cubic bezier curves, potentially with affine transforms applied like translation, scale, rotation, shear/skew, and inversion (including both the Ray Casting Algorithm, aka Even-odd Rule, and the Winding Number Algorithm, aka Nonzero Rule). Additionally, it contains some purely mathematical algorithms like IEEEremainder (also known as IEEE-754 remainder).".freeze
16
16
  s.email = "andy.am@gmail.com".freeze
17
17
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: perfect-shape
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
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-04-26 00:00:00.000000000 Z
11
+ date: 2022-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equalizer