clipper 2.9.0 → 2.9.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 9503a2dd42f26ed9779590c5778fab8daca0c802
4
+ data.tar.gz: 25c02b3500faa0b61112fc938d5ca89f4809ed9c
5
+ SHA512:
6
+ metadata.gz: f26b54da8ac3b62f6a8a9bf93192a7adea3c1413d41741fc43e1a4d52bd0a6db1cae24262e1cd23479c1d1ec67ba5763daaf74ac6ab3662a41de2716ad31f521
7
+ data.tar.gz: d0646f958d2ef38cbf58d0c42dedbdb03a2e09d91bab99d3d5af6c5012881df683b382ddeee2f9e4ea2b4dbd3d1c478769266692573309592027888e64e634ce
@@ -99,7 +99,7 @@ TDoublePoint GetUnitNormal( const TDoublePoint &pt1, const TDoublePoint &pt2)
99
99
  TPolygon BuildArc(const TDoublePoint &pt,
100
100
  const double a1, const double a2, const double r)
101
101
  {
102
- int steps = max(6, int(sqrt(abs(r)) * abs(a2 - a1)));
102
+ int steps = max(6, int(sqrt(fabs(r)) * fabs(a2 - a1)));
103
103
  TPolygon result(steps);
104
104
  int n = steps - 1;
105
105
  double da = (a2 - a1) / n;
@@ -934,7 +934,7 @@ void Clipper::SetWindingCount(TEdge *edge)
934
934
  //nonZero filling ...
935
935
  if ( e->windCnt * e->windDelta < 0 )
936
936
  {
937
- if (abs(e->windCnt) > 1)
937
+ if (fabs(e->windCnt) > 1)
938
938
  {
939
939
  if (e->windDelta * edge->windDelta < 0) edge->windCnt = e->windCnt;
940
940
  else edge->windCnt = e->windCnt + edge->windDelta;
@@ -942,7 +942,7 @@ void Clipper::SetWindingCount(TEdge *edge)
942
942
  edge->windCnt = e->windCnt + e->windDelta + edge->windDelta;
943
943
  } else
944
944
  {
945
- if ( abs(e->windCnt) > 1 && e->windDelta * edge->windDelta < 0)
945
+ if ( fabs(e->windCnt) > 1 && e->windDelta * edge->windDelta < 0)
946
946
  edge->windCnt = e->windCnt;
947
947
  else if ( e->windCnt + edge->windDelta == 0 )
948
948
  edge->windCnt = e->windCnt;
@@ -1812,8 +1812,8 @@ void Clipper::IntersectEdges(TEdge *e1, TEdge *e2,
1812
1812
 
1813
1813
  if ( e1Contributing && e2contributing )
1814
1814
  {
1815
- if ( e1stops || e2stops || abs(e1->windCnt) > 1 ||
1816
- abs(e2->windCnt) > 1 ||
1815
+ if ( e1stops || e2stops || fabs(e1->windCnt) > 1 ||
1816
+ fabs(e2->windCnt) > 1 ||
1817
1817
  (e1->polyType != e2->polyType && m_ClipType != ctXor) )
1818
1818
  AddLocalMaxPoly(e1, e2, pt); else
1819
1819
  DoBothEdges( e1, e2, pt );
@@ -1823,10 +1823,10 @@ void Clipper::IntersectEdges(TEdge *e1, TEdge *e2,
1823
1823
  switch( m_ClipType ) {
1824
1824
  case ctIntersection:
1825
1825
  if ( (e2->polyType == ptSubject || e2->windCnt2 != 0) &&
1826
- abs(e2->windCnt) < 2 ) DoEdge1( e1, e2, pt);
1826
+ fabs(e2->windCnt) < 2 ) DoEdge1( e1, e2, pt);
1827
1827
  break;
1828
1828
  default:
1829
- if ( abs(e2->windCnt) < 2 ) DoEdge1(e1, e2, pt);
1829
+ if ( fabs(e2->windCnt) < 2 ) DoEdge1(e1, e2, pt);
1830
1830
  }
1831
1831
  }
1832
1832
  else if ( e2contributing )
@@ -1834,22 +1834,22 @@ void Clipper::IntersectEdges(TEdge *e1, TEdge *e2,
1834
1834
  switch( m_ClipType ) {
1835
1835
  case ctIntersection:
1836
1836
  if ( (e1->polyType == ptSubject || e1->windCnt2 != 0) &&
1837
- abs(e1->windCnt) < 2 ) DoEdge2( e1, e2, pt );
1837
+ fabs(e1->windCnt) < 2 ) DoEdge2( e1, e2, pt );
1838
1838
  break;
1839
1839
  default:
1840
- if (abs(e1->windCnt) < 2) DoEdge2( e1, e2, pt );
1840
+ if (fabs(e1->windCnt) < 2) DoEdge2( e1, e2, pt );
1841
1841
  }
1842
1842
  } else
1843
1843
  {
1844
1844
  //neither edge is currently contributing ...
1845
- if ( abs(e1->windCnt) > 1 && abs(e2->windCnt) > 1 ) ;// do nothing
1845
+ if ( fabs(e1->windCnt) > 1 && fabs(e2->windCnt) > 1 ) ;// do nothing
1846
1846
  else if ( e1->polyType != e2->polyType && !e1stops && !e2stops &&
1847
- abs(e1->windCnt) < 2 && abs(e2->windCnt) < 2 )
1847
+ fabs(e1->windCnt) < 2 && fabs(e2->windCnt) < 2 )
1848
1848
  AddLocalMinPoly(e1, e2, pt);
1849
- else if ( abs(e1->windCnt) == 1 && abs(e2->windCnt) == 1 )
1849
+ else if ( fabs(e1->windCnt) == 1 && fabs(e2->windCnt) == 1 )
1850
1850
  switch( m_ClipType ) {
1851
1851
  case ctIntersection:
1852
- if ( abs(e1->windCnt2) > 0 && abs(e2->windCnt2) > 0 )
1852
+ if ( fabs(e1->windCnt2) > 0 && fabs(e2->windCnt2) > 0 )
1853
1853
  AddLocalMinPoly(e1, e2, pt);
1854
1854
  break;
1855
1855
  case ctUnion:
@@ -1866,7 +1866,7 @@ void Clipper::IntersectEdges(TEdge *e1, TEdge *e2,
1866
1866
  case ctXor:
1867
1867
  AddLocalMinPoly(e1, e2, pt);
1868
1868
  }
1869
- else if ( abs(e1->windCnt) < 2 && abs(e2->windCnt) < 2 )
1869
+ else if ( fabs(e1->windCnt) < 2 && fabs(e2->windCnt) < 2 )
1870
1870
  SwapSides( *e1, *e2 );
1871
1871
  }
1872
1872
 
@@ -1952,16 +1952,16 @@ bool Clipper::IsContributing(TEdge *edge)
1952
1952
  switch( m_ClipType ){
1953
1953
  case ctIntersection:
1954
1954
  if ( edge->polyType == ptSubject )
1955
- return abs(edge->windCnt) == 1 && edge->windCnt2 != 0; else
1956
- return abs(edge->windCnt2) > 0 && abs(edge->windCnt) == 1;
1955
+ return fabs(edge->windCnt) == 1 && edge->windCnt2 != 0; else
1956
+ return fabs(edge->windCnt2) > 0 && fabs(edge->windCnt) == 1;
1957
1957
  case ctUnion:
1958
- return abs(edge->windCnt) == 1 && edge->windCnt2 == 0;
1958
+ return fabs(edge->windCnt) == 1 && edge->windCnt2 == 0;
1959
1959
  case ctDifference:
1960
1960
  if ( edge->polyType == ptSubject )
1961
- return abs(edge->windCnt) == 1 && edge->windCnt2 == 0; else
1962
- return abs(edge->windCnt) == 1 && edge->windCnt2 != 0;
1961
+ return fabs(edge->windCnt) == 1 && edge->windCnt2 == 0; else
1962
+ return fabs(edge->windCnt) == 1 && edge->windCnt2 != 0;
1963
1963
  default: //case ctXor:
1964
- return abs(edge->windCnt) == 1;
1964
+ return fabs(edge->windCnt) == 1;
1965
1965
  }
1966
1966
  }
1967
1967
  //------------------------------------------------------------------------------
@@ -3,5 +3,5 @@ module Clipper
3
3
  # Keep first two components sync'd to Clipper's major/minor.
4
4
  # Last is our build number based on that. Hopefully there
5
5
  # won't be too much churn re: Clipper's version vs. the bindings.
6
- VERSION = "2.9.0"
6
+ VERSION = "2.9.1"
7
7
  end
metadata CHANGED
@@ -1,94 +1,75 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: clipper
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 2
7
- - 9
8
- - 0
9
- version: 2.9.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.9.1
10
5
  platform: ruby
11
- authors:
6
+ authors:
12
7
  - Angus Johnson
13
8
  - Mike Owens
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2010-12-08 00:00:00 -05:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2014-01-14 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: bundler
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- segments:
30
- - 1
31
- - 0
32
- - 0
33
- version: 1.0.0
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '1.5'
34
21
  type: :development
35
- version_requirements: *id001
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '1.5'
36
28
  description: Builds a native ruby extension for Clipper
37
- email: []
38
-
29
+ email:
30
+ - mike@filespanker.com
39
31
  executables: []
40
-
41
- extensions:
32
+ extensions:
42
33
  - ext/clipper/extconf.rb
43
- extra_rdoc_files:
34
+ extra_rdoc_files:
44
35
  - README.md
45
36
  - Changelog
46
37
  - ext/clipper/rbclipper.cpp
47
- files:
48
- - lib/clipper/version.rb
49
- - ext/clipper/clipper.cpp
50
- - ext/clipper/clipper.hpp
51
- - ext/clipper/rbclipper.cpp
52
- - ext/clipper/extconf.rb
38
+ files:
39
+ - Changelog
40
+ - Gemfile
53
41
  - LICENSE.bindings
54
42
  - LICENSE.clipper
55
- - Rakefile
56
- - Gemfile
57
- - Changelog
58
43
  - README.md
59
- has_rdoc: true
44
+ - Rakefile
45
+ - ext/clipper/clipper.cpp
46
+ - ext/clipper/clipper.hpp
47
+ - ext/clipper/extconf.rb
48
+ - ext/clipper/rbclipper.cpp
49
+ - lib/clipper/version.rb
60
50
  homepage: http://github.com/mieko/rbclipper
61
- licenses: []
62
-
51
+ licenses:
52
+ - BSL-1.0
53
+ metadata: {}
63
54
  post_install_message:
64
- rdoc_options:
65
- - --main=README.md
66
- require_paths:
55
+ rdoc_options:
56
+ - "--main=README.md"
57
+ require_paths:
67
58
  - lib
68
- required_ruby_version: !ruby/object:Gem::Requirement
69
- none: false
70
- requirements:
59
+ required_ruby_version: !ruby/object:Gem::Requirement
60
+ requirements:
71
61
  - - ">="
72
- - !ruby/object:Gem::Version
73
- segments:
74
- - 0
75
- version: "0"
76
- required_rubygems_version: !ruby/object:Gem::Requirement
77
- none: false
78
- requirements:
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
64
+ required_rubygems_version: !ruby/object:Gem::Requirement
65
+ requirements:
79
66
  - - ">="
80
- - !ruby/object:Gem::Version
81
- segments:
82
- - 1
83
- - 3
84
- - 6
67
+ - !ruby/object:Gem::Version
85
68
  version: 1.3.6
86
69
  requirements: []
87
-
88
70
  rubyforge_project: clipper
89
- rubygems_version: 1.3.7
71
+ rubygems_version: 2.2.0.rc.1
90
72
  signing_key:
91
- specification_version: 3
73
+ specification_version: 4
92
74
  summary: Ruby wrapper for Clipper, Angus Johnson's excellent polygon clipping library
93
75
  test_files: []
94
-