geomerative 0.4.0-java → 2.0.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +2 -0
  3. data/.mvn/extensions.xml +1 -1
  4. data/.mvn/wrapper/maven-wrapper.properties +1 -1
  5. data/CHANGELOG.md +25 -0
  6. data/COPYING.md +1 -1
  7. data/README.md +4 -2
  8. data/Rakefile +2 -15
  9. data/docs/.gitignore +6 -0
  10. data/docs/_config.yml +30 -0
  11. data/docs/_includes/footer.html +38 -0
  12. data/docs/_includes/head.html +16 -0
  13. data/docs/_includes/header.html +27 -0
  14. data/docs/_includes/icon-github.html +1 -0
  15. data/docs/_includes/icon-github.svg +3 -0
  16. data/docs/_includes/icon-twitter.html +1 -0
  17. data/docs/_includes/icon-twitter.svg +3 -0
  18. data/docs/_includes/navigation.html +24 -0
  19. data/docs/_layouts/default.html +20 -0
  20. data/docs/_layouts/page.html +14 -0
  21. data/docs/_layouts/post.html +15 -0
  22. data/docs/_posts/2015-11-21-getting_started.md +67 -0
  23. data/docs/_posts/2015-11-25-bubbles.md +111 -0
  24. data/docs/_posts/2015-11-26-extra_bright.md +103 -0
  25. data/docs/_posts/2015-11-26-text_merge.md +114 -0
  26. data/docs/_posts/2016-07-06-dymo.md +99 -0
  27. data/docs/_sass/_base.scss +206 -0
  28. data/docs/_sass/_layout.scss +242 -0
  29. data/docs/_sass/_syntax-highlighting.scss +71 -0
  30. data/docs/about.md +12 -0
  31. data/docs/assets/bright.png +0 -0
  32. data/docs/assets/bubbles.png +0 -0
  33. data/docs/assets/design.png +0 -0
  34. data/docs/assets/dymo.png +0 -0
  35. data/docs/assets/favicon.ico +0 -0
  36. data/docs/assets/fred.png +0 -0
  37. data/docs/assets/merge.png +0 -0
  38. data/docs/css/main.scss +38 -0
  39. data/docs/favicon.ico +0 -0
  40. data/docs/feed.xml +30 -0
  41. data/docs/index.html +38 -0
  42. data/examples/README.md +1 -1
  43. data/examples/data/bot1.svg +1 -1
  44. data/examples/data/lion.svg +156 -156
  45. data/examples/data/ruby.svg +1 -1
  46. data/examples/hello_svg_to_pdf.rb +1 -1
  47. data/examples/jruby_merge.rb +1 -1
  48. data/examples/{f_agent.rb → library/f_agent/f_agent.rb} +0 -0
  49. data/examples/{font_agent.rb → library/font_agent/font_agent.rb} +2 -1
  50. data/examples/text_on_geomerative_path.rb +3 -2
  51. data/examples/typo_deform.rb +2 -2
  52. data/examples/typo_extra_bright.rb +1 -1
  53. data/geomerative.gemspec +3 -7
  54. data/lib/geomerative.rb +5 -4
  55. data/lib/geomerative/version.rb +1 -1
  56. data/mvnw +234 -0
  57. data/mvnw.cmd +145 -0
  58. data/pom.rb +19 -18
  59. data/pom.xml +14 -13
  60. data/src/geomerative/FastRClip.java +2050 -2334
  61. data/src/geomerative/RClip.java +2237 -2539
  62. data/src/geomerative/RClosest.java +33 -31
  63. data/src/geomerative/RCommand.java +1750 -1758
  64. data/src/geomerative/RContour.java +290 -292
  65. data/src/geomerative/RFont.java +277 -246
  66. data/src/geomerative/RG.java +722 -727
  67. data/src/geomerative/RGeomElem.java +967 -962
  68. data/src/geomerative/RGroup.java +508 -467
  69. data/src/geomerative/RMatrix.java +304 -289
  70. data/src/geomerative/RMesh.java +241 -229
  71. data/src/geomerative/RPath.java +924 -926
  72. data/src/geomerative/RPoint.java +391 -391
  73. data/src/geomerative/RPolygon.java +1017 -1013
  74. data/src/geomerative/RRectangle.java +43 -52
  75. data/src/geomerative/RSVG.java +480 -516
  76. data/src/geomerative/RShape.java +1767 -1777
  77. data/src/geomerative/RStrip.java +173 -176
  78. data/src/geomerative/RStyle.java +197 -194
  79. data/src/org/apache/batik/svggen/font/Font.java +141 -142
  80. data/src/org/apache/batik/svggen/font/Glyph.java +102 -71
  81. data/src/org/apache/batik/svggen/font/Point.java +12 -12
  82. data/src/org/apache/batik/svggen/font/RandomAccessFileEmulator.java +14 -12
  83. data/src/org/apache/batik/svggen/font/table/ClassDef.java +12 -12
  84. data/src/org/apache/batik/svggen/font/table/ClassDefFormat1.java +27 -24
  85. data/src/org/apache/batik/svggen/font/table/ClassDefFormat2.java +20 -17
  86. data/src/org/apache/batik/svggen/font/table/CmapFormat.java +43 -43
  87. data/src/org/apache/batik/svggen/font/table/CmapFormat0.java +33 -26
  88. data/src/org/apache/batik/svggen/font/table/CmapFormat2.java +25 -20
  89. data/src/org/apache/batik/svggen/font/table/CmapFormat4.java +106 -96
  90. data/src/org/apache/batik/svggen/font/table/CmapFormat6.java +36 -32
  91. data/src/org/apache/batik/svggen/font/table/CmapIndexEntry.java +69 -49
  92. data/src/org/apache/batik/svggen/font/table/CmapTable.java +50 -50
  93. data/src/org/apache/batik/svggen/font/table/Coverage.java +19 -19
  94. data/src/org/apache/batik/svggen/font/table/CoverageFormat1.java +30 -27
  95. data/src/org/apache/batik/svggen/font/table/CoverageFormat2.java +26 -24
  96. data/src/org/apache/batik/svggen/font/table/CvtTable.java +16 -16
  97. data/src/org/apache/batik/svggen/font/table/Device.java +32 -32
  98. data/src/org/apache/batik/svggen/font/table/DirectoryEntry.java +39 -39
  99. data/src/org/apache/batik/svggen/font/table/Feature.java +26 -23
  100. data/src/org/apache/batik/svggen/font/table/FeatureList.java +37 -35
  101. data/src/org/apache/batik/svggen/font/table/FeatureRecord.java +22 -22
  102. data/src/org/apache/batik/svggen/font/table/FeatureTags.java +4 -3
  103. data/src/org/apache/batik/svggen/font/table/FpgmTable.java +9 -9
  104. data/src/org/apache/batik/svggen/font/table/GlyfCompositeComp.java +134 -132
  105. data/src/org/apache/batik/svggen/font/table/GlyfCompositeDescript.java +123 -122
  106. data/src/org/apache/batik/svggen/font/table/GlyfDescript.java +44 -44
  107. data/src/org/apache/batik/svggen/font/table/GlyfSimpleDescript.java +110 -109
  108. data/src/org/apache/batik/svggen/font/table/GlyfTable.java +46 -46
  109. data/src/org/apache/batik/svggen/font/table/GlyphDescription.java +25 -13
  110. data/src/org/apache/batik/svggen/font/table/GposTable.java +26 -23
  111. data/src/org/apache/batik/svggen/font/table/GsubTable.java +85 -82
  112. data/src/org/apache/batik/svggen/font/table/HeadTable.java +131 -131
  113. data/src/org/apache/batik/svggen/font/table/HheaTable.java +80 -80
  114. data/src/org/apache/batik/svggen/font/table/HmtxTable.java +50 -49
  115. data/src/org/apache/batik/svggen/font/table/KernSubtable.java +29 -27
  116. data/src/org/apache/batik/svggen/font/table/KernSubtableFormat0.java +35 -32
  117. data/src/org/apache/batik/svggen/font/table/KernSubtableFormat2.java +28 -26
  118. data/src/org/apache/batik/svggen/font/table/KernTable.java +36 -31
  119. data/src/org/apache/batik/svggen/font/table/KerningPair.java +27 -23
  120. data/src/org/apache/batik/svggen/font/table/LangSys.java +28 -26
  121. data/src/org/apache/batik/svggen/font/table/LangSysRecord.java +22 -22
  122. data/src/org/apache/batik/svggen/font/table/Ligature.java +24 -24
  123. data/src/org/apache/batik/svggen/font/table/LigatureSet.java +24 -24
  124. data/src/org/apache/batik/svggen/font/table/LigatureSubst.java +9 -9
  125. data/src/org/apache/batik/svggen/font/table/LigatureSubstFormat1.java +30 -30
  126. data/src/org/apache/batik/svggen/font/table/LocaTable.java +37 -37
  127. data/src/org/apache/batik/svggen/font/table/Lookup.java +41 -40
  128. data/src/org/apache/batik/svggen/font/table/LookupList.java +34 -34
  129. data/src/org/apache/batik/svggen/font/table/LookupSubtableFactory.java +7 -5
  130. data/src/org/apache/batik/svggen/font/table/MaxpTable.java +96 -96
  131. data/src/org/apache/batik/svggen/font/table/NameRecord.java +64 -65
  132. data/src/org/apache/batik/svggen/font/table/NameTable.java +33 -33
  133. data/src/org/apache/batik/svggen/font/table/Os2Table.java +196 -196
  134. data/src/org/apache/batik/svggen/font/table/Panose.java +14 -12
  135. data/src/org/apache/batik/svggen/font/table/PostTable.java +338 -338
  136. data/src/org/apache/batik/svggen/font/table/PrepTable.java +9 -9
  137. data/src/org/apache/batik/svggen/font/table/Program.java +15 -15
  138. data/src/org/apache/batik/svggen/font/table/RangeRecord.java +26 -25
  139. data/src/org/apache/batik/svggen/font/table/Script.java +38 -38
  140. data/src/org/apache/batik/svggen/font/table/ScriptList.java +42 -42
  141. data/src/org/apache/batik/svggen/font/table/ScriptRecord.java +22 -22
  142. data/src/org/apache/batik/svggen/font/table/ScriptTags.java +2 -1
  143. data/src/org/apache/batik/svggen/font/table/SingleSubst.java +15 -16
  144. data/src/org/apache/batik/svggen/font/table/SingleSubstFormat1.java +33 -33
  145. data/src/org/apache/batik/svggen/font/table/SingleSubstFormat2.java +32 -32
  146. data/src/org/apache/batik/svggen/font/table/Table.java +171 -170
  147. data/src/org/apache/batik/svggen/font/table/TableDirectory.java +55 -55
  148. data/src/org/apache/batik/svggen/font/table/TableFactory.java +92 -93
  149. metadata +47 -30
  150. data/.travis.yml +0 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e1f9b00d8e8b548204c87563bdf4dae9ade679a8
4
- data.tar.gz: 74682d13bb0ce44a59ffd443e8b923dd55800a46
2
+ SHA256:
3
+ metadata.gz: 824ce3125f29427f12f918db67abaf3dfb5a5fa74655a68f6578433008a0d920
4
+ data.tar.gz: abe6dd8f491f622abb0f28cca3cdbf64376d1d004d32ba78e038fd230a1daa21
5
5
  SHA512:
6
- metadata.gz: 723c6a011d0da617a27dfdcab2db17e4d3c3eff38331be24cc897ab6284ba9b5892e6af5f9c38a9fc289212d492b41a04f4ffe12cab4c5c76381bb3fd84f6d34
7
- data.tar.gz: 7c5ef85d8334bd719b2532af5427e86101812cf8292f15e97a5553bbf650983bb39d546d38ed72773df817a20bc1e2a259547701b283f12853afda90083f6428
6
+ metadata.gz: 4e795f9ab417fcc3c8411d7a4c73ad685c090894ed78c3fe7641cb0c99ff39232bb51b7b3f39e2341852cffd1f2ca3a06717ef5451dfef8cace2d3d45d598db3
7
+ data.tar.gz: db4b1c642d340e5776d40f2cb85d1d11593eb713a3021be8fa47bb7c5d1f416fa491533f1cc35b149ec6fb10cff34184e24cd84246c168c59ef0c36b32669adb
data/.gitignore CHANGED
@@ -13,3 +13,5 @@ MANIFEST.MF
13
13
  hs_err_pid*
14
14
  target
15
15
  *~
16
+ /nbproject/
17
+ nb-configuration.xml
@@ -3,6 +3,6 @@
3
3
  <extension>
4
4
  <groupId>io.takari.polyglot</groupId>
5
5
  <artifactId>polyglot-ruby</artifactId>
6
- <version>0.1.18</version>
6
+ <version>0.4.4</version>
7
7
  </extension>
8
8
  </extensions>
@@ -1 +1 @@
1
- distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.3/apache-maven-3.3.3-bin.zip
1
+ distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip
@@ -1,7 +1,32 @@
1
+ ### version-2.0.0
2
+ For jdk11+, for JRubyArt-2.4+, propane-3.6+ and PiCrate-2.1+, remove dependency on PApplet instance method readBytes(String).
3
+
4
+ ### version-1.1
5
+ Bump versions processing-3.4 (changes to smooth) , jruby-9.2.1.0. Fix `contains(RRoints[])` then rename to `containsPoints` and similarly `contains(RGeomElement shp)` to `containsShape(RShape shp)` in this respect we are deviating for original geomerative library that was flawed (and overloading `contains` method way too much).
6
+
7
+ ### version-1.0.2
8
+ Bump versions processing-3.3.7 (changes to smooth) , jruby-9.1.17.0
9
+
10
+ ### version-1.0.1
11
+ Bump versions processing-3.3.6, jruby-9.1.15.0
12
+
13
+ ### version-1.0.0
14
+ Bump versions processing-3.3.4, jruby-9.1.12.0 about time we bumped to a full release version number
15
+
16
+ ### version-0.4.3
17
+ Bump versions processing-3.3.2 removed JRubyArt dependency since can be used with propane as well
18
+
19
+ ### version-0.4.2
20
+ Bump versions processing-3.3, jruby-9.1.8.0
21
+
22
+ ### version-0.4.1
23
+ No particular reason but java, jruby and processing have all been updated since last release
24
+
1
25
  ### version-0.4.0
2
26
  Somewhat arbitarily require JRubyArt-1.2+, but idea is get everyone on same page
3
27
 
4
28
  ### version-0.3.1
5
29
  Submit for travis build
30
+
6
31
  ### version-0.3
7
32
  Further mods to java code, mainly in this case removing PConstants indirection, which is probably harmful (downside if people expect to use the RG prefix it won't work). Still need to run with --nojruby flag, generally a permissions thing.
data/COPYING.md CHANGED
@@ -10,7 +10,7 @@ This product includes software developed by the Solution Engineering, Inc. (http
10
10
  This product includes software developed by the The Apache Software Foundation (http://www.apache.org/).
11
11
 
12
12
  Modifications and variations thereof to be compatible with (take advantage of new syntax etc) jdk8, processing-3.0 and thence JRubyArt
13
- Copyright (c) 2015-2016 Martin Prout
13
+ Copyright (c) 2015-2020 Martin Prout
14
14
 
15
15
  I have not further polluted the headers of the original code so it may not clear that such code has been modified, but if you care you should check the [original][]
16
16
 
data/README.md CHANGED
@@ -1,9 +1,8 @@
1
1
  # geomerative gem
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/geomerative.svg)](https://badge.fury.io/rb/geomerative)
4
- ![travis status](https://travis-ci.org/ruby-processing/geomerativegem.svg)
5
4
 
6
- Gem wrapper for [Ricard Marxer Geomerative library][] for processing-3.1.1+ and JRubyArt-1.2.0+
5
+ Gem wrapper for [Ricard Marxer Geomerative library][] for [JRubyArt][jruby_art], [propane][propane] and [PiCrate][picrate]
7
6
  Create amazing stuff with fonts svg etc.
8
7
 
9
8
  Read more about using the gem on the linked [web pages].
@@ -11,3 +10,6 @@ Read more about using the gem on the linked [web pages].
11
10
  [README.md]:https://github.com/ruby-processing/geomerativegem/blob/master/examples/README.md
12
11
  [web pages]:http://ruby-processing.github.io/geomerativegem
13
12
  [Ricard Marxer Geomerative library]:https://github.com/rikrd/geomerative
13
+ [jruby_art]:https://ruby-processing.github.io/JRubyArt/
14
+ [propane]:https://ruby-processing.github.io/propane/
15
+ [picrate]:https://ruby-processing.github.io/PiCrate/
data/Rakefile CHANGED
@@ -1,24 +1,11 @@
1
1
  require_relative 'lib/geomerative/version'
2
2
 
3
- def create_manifest
4
- title = 'Implementation-Title: geomerative (java extension for geomerative gem)'
5
- version = format('Implementation-Version: %s', Geomerative::VERSION)
6
- file = File.open('MANIFEST.MF', 'w') do |f|
7
- f.puts(title)
8
- f.puts(version)
9
- end
10
- end
11
3
 
12
- task default: [:init, :compile, :gem]
13
-
14
- desc 'Create Manifest'
15
- task :init do
16
- create_manifest
17
- end
4
+ task default: [:compile, :gem]
18
5
 
19
6
  desc 'Build gem'
20
7
  task :gem do
21
- sh "gem build geomerative.gemspec"
8
+ sh "jgem build geomerative.gemspec"
22
9
  end
23
10
 
24
11
  desc 'Compile'
@@ -0,0 +1,6 @@
1
+
2
+ *~
3
+ _site
4
+ .sass-cache
5
+ .jekyll-metadata
6
+ Gemfile.lock
@@ -0,0 +1,30 @@
1
+ # Site settings
2
+ port: 4000
3
+ title: Geomerative gem for JRubyArt and propane
4
+ email: mamba2928@yahoo.co.uk
5
+ description: > # this means to ignore newlines until "baseurl:"
6
+ The geomerative gem is wrapper around the geomerative library by Ricard
7
+ Marxer, that makes it very easy to use with JRubyArt. Do fancy things with
8
+ text, like rotating words, huge font, dissolving font etc.
9
+ baseurl: "" # the subpath of your site, e.g. /blog
10
+ regenerate: true
11
+ url: "https://ruby-processing.github.io/geomerativegem"
12
+
13
+ urls:
14
+ bugs: https://github.com/ruby-processing/geomerativegem/issues
15
+ github: https://github.com/ruby-processing/geomerativegem/
16
+ twitter_username: monkstoneT
17
+ github_username: monkstone
18
+
19
+ syntax-highlighting:
20
+ enabled: true
21
+
22
+ sass:
23
+ sass_dir: _sass
24
+
25
+ # Build settings
26
+ markdown: kramdown
27
+ gems:
28
+ - jekyll-sitemap
29
+ - jekyll-feed
30
+ - jekyll-seo-tag
@@ -0,0 +1,38 @@
1
+ <footer class="site-footer">
2
+
3
+ <div class="wrapper">
4
+
5
+ <h2 class="footer-heading">{{ site.title }}</h2>
6
+
7
+ <div class="footer-col-wrapper">
8
+ <div class="footer-col footer-col-1">
9
+ <ul class="contact-list">
10
+ <li>{{ site.title }}</li>
11
+ <li><a href="mailto:{{ site.email }}">{{ site.email }}</a></li>
12
+ </ul>
13
+ </div>
14
+
15
+ <div class="footer-col footer-col-2">
16
+ <ul class="social-media-list">
17
+ {% if site.github_username %}
18
+ <li>
19
+ {% include icon-github.html username=site.github_username %}
20
+ </li>
21
+ {% endif %}
22
+
23
+ {% if site.twitter_username %}
24
+ <li>
25
+ {% include icon-twitter.html username=site.twitter_username %}
26
+ </li>
27
+ {% endif %}
28
+ </ul>
29
+ </div>
30
+
31
+ <div class="footer-col footer-col-3">
32
+ <p>{{ site.description }}</p>
33
+ </div>
34
+ </div>
35
+
36
+ </div>
37
+
38
+ </footer>
@@ -0,0 +1,16 @@
1
+ <head>
2
+ <meta charset="utf-8">
3
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
4
+ <meta name="viewport" content="width=device-width, initial-scale=1">
5
+ {% if page.keywords %}
6
+ <meta name="keywords" content="{{ page.keywords }}" />
7
+ {% else %}
8
+ <meta name="keywords" content="propane, JRubyArt, processing, geomerative, gem" />
9
+ {% endif %}
10
+ <title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
11
+ <meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
12
+
13
+ <link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
14
+ <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
15
+ <link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" />
16
+ </head>
@@ -0,0 +1,27 @@
1
+ <header class="site-header">
2
+
3
+ <div class="wrapper">
4
+
5
+ <a class="site-title" href="{{ site.baseurl }}/">{{ site.title }}</a>
6
+
7
+ <nav class="site-nav">
8
+ <a href="#" class="menu-icon">
9
+ <svg viewBox="0 0 18 15">
10
+ <path fill="#424242" d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.031C17.335,0,18,0.665,18,1.484L18,1.484z"/>
11
+ <path fill="#424242" d="M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0c0-0.82,0.665-1.484,1.484-1.484 h15.031C17.335,6.031,18,6.696,18,7.516L18,7.516z"/>
12
+ <path fill="#424242" d="M18,13.516C18,14.335,17.335,15,16.516,15H1.484C0.665,15,0,14.335,0,13.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.031C17.335,12.031,18,12.696,18,13.516L18,13.516z"/>
13
+ </svg>
14
+ </a>
15
+
16
+ <div class="trigger">
17
+ {% for my_page in site.pages %}
18
+ {% if my_page.title %}
19
+ <a class="page-link" href="{{ my_page.url | prepend: site.github.url }}">{{ my_page.title }}</a>
20
+ {% endif %}
21
+ {% endfor %}
22
+ </div>
23
+ </nav>
24
+
25
+ </div>
26
+
27
+ </header>
@@ -0,0 +1 @@
1
+ <a href="https://github.com/{{ include.username }}"><span class="icon icon--github">{% include icon-github.svg %}</span><span class="username">{{ include.username }}</span></a>
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 16 16">
2
+ <path fill="#828282" d="M7.999,0.431c-4.285,0-7.76,3.474-7.76,7.761 c0,3.428,2.223,6.337,5.307,7.363c0.388,0.071,0.53-0.168,0.53-0.374c0-0.184-0.007-0.672-0.01-1.32 c-2.159,0.469-2.614-1.04-2.614-1.04c-0.353-0.896-0.862-1.135-0.862-1.135c-0.705-0.481,0.053-0.472,0.053-0.472 c0.779,0.055,1.189,0.8,1.189,0.8c0.692,1.186,1.816,0.843,2.258,0.645c0.071-0.502,0.271-0.843,0.493-1.037 C4.86,11.425,3.049,10.76,3.049,7.786c0-0.847,0.302-1.54,0.799-2.082C3.768,5.507,3.501,4.718,3.924,3.65 c0,0,0.652-0.209,2.134,0.796C6.677,4.273,7.34,4.187,8,4.184c0.659,0.003,1.323,0.089,1.943,0.261 c1.482-1.004,2.132-0.796,2.132-0.796c0.423,1.068,0.157,1.857,0.077,2.054c0.497,0.542,0.798,1.235,0.798,2.082 c0,2.981-1.814,3.637-3.543,3.829c0.279,0.24,0.527,0.713,0.527,1.437c0,1.037-0.01,1.874-0.01,2.129 c0,0.208,0.14,0.449,0.534,0.373c3.081-1.028,5.302-3.935,5.302-7.362C15.76,3.906,12.285,0.431,7.999,0.431z"/>
3
+ </svg>
@@ -0,0 +1 @@
1
+ <a href="https://twitter.com/{{ include.username }}"><span class="icon icon--twitter">{% include icon-twitter.svg %}</span><span class="username">{{ include.username }}</span></a>
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 16 16">
2
+ <path fill="#828282" d="M15.969,3.058c-0.586,0.26-1.217,0.436-1.878,0.515c0.675-0.405,1.194-1.045,1.438-1.809c-0.632,0.375-1.332,0.647-2.076,0.793c-0.596-0.636-1.446-1.033-2.387-1.033c-1.806,0-3.27,1.464-3.27,3.27 c0,0.256,0.029,0.506,0.085,0.745C5.163,5.404,2.753,4.102,1.14,2.124C0.859,2.607,0.698,3.168,0.698,3.767 c0,1.134,0.577,2.135,1.455,2.722C1.616,6.472,1.112,6.325,0.671,6.08c0,0.014,0,0.027,0,0.041c0,1.584,1.127,2.906,2.623,3.206 C3.02,9.402,2.731,9.442,2.433,9.442c-0.211,0-0.416-0.021-0.615-0.059c0.416,1.299,1.624,2.245,3.055,2.271 c-1.119,0.877-2.529,1.4-4.061,1.4c-0.264,0-0.524-0.015-0.78-0.046c1.447,0.928,3.166,1.469,5.013,1.469 c6.015,0,9.304-4.983,9.304-9.304c0-0.142-0.003-0.283-0.009-0.423C14.976,4.29,15.531,3.714,15.969,3.058z"/>
3
+ </svg>
@@ -0,0 +1,24 @@
1
+ {% capture html %}
2
+ <ul>
3
+ {% if include.context == "/" %}
4
+ <li class="{% if page.url == "/" %}active{% endif %}">
5
+ <a href="{{ site.github.url }}/{{ site.title }}"</a>
6
+ </li>
7
+ {% endif %}
8
+
9
+ {% assign entries = site.pages | sort: "path" %}
10
+ {% for entry in entries %}
11
+
12
+ {% capture slug %}{{ entry.url | split: "/" | last }}{% endcapture %}
13
+ {% capture current %}{{ entry.url | remove: slug | remove: "//" | append: "/" }}{% endcapture %}
14
+
15
+ {% if current == include.context %}
16
+ <li class="{% if page.url contains entry.url %}active{% endif %}">
17
+ <a href="{{ site.github.url }}{{ entry.url }}">{{ entry.title }}</a>
18
+ {% include navigation.html context=entry.url %}
19
+ </li>
20
+ {% endif %}
21
+
22
+ {% endfor %}
23
+ </ul>
24
+ {% endcapture %}{{ html | strip_newlines | replace:' ','' | replace:' ','' | replace:' ',' ' }}
@@ -0,0 +1,20 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+
4
+ {% include head.html %}
5
+
6
+ <body>
7
+
8
+ {% include header.html %}
9
+
10
+ <div class="page-content">
11
+ <div class="wrapper">
12
+ {{ content }}
13
+ </div>
14
+ </div>
15
+
16
+ {% include footer.html %}
17
+
18
+ </body>
19
+
20
+ </html>
@@ -0,0 +1,14 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ <article class="post">
5
+
6
+ <header class="post-header">
7
+ <h1 class="post-title">{{ page.title }}</h1>
8
+ </header>
9
+
10
+ <div class="post-content">
11
+ {{ content }}
12
+ </div>
13
+
14
+ </article>
@@ -0,0 +1,15 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ <article class="post" itemscope itemtype="http://schema.org/BlogPosting">
5
+
6
+ <header class="post-header">
7
+ <h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
8
+ <p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}</p>
9
+ </header>
10
+
11
+ <div class="post-content" itemprop="articleBody">
12
+ {{ content }}
13
+ </div>
14
+
15
+ </article>
@@ -0,0 +1,67 @@
1
+ ---
2
+ layout: post
3
+ title: "A first Sketch"
4
+ date: 2015-11-24 07:34:13
5
+ categories: geomerativegem update
6
+ ---
7
+
8
+ ### Requirements
9
+
10
+ Requires JRubyArt-1.3.1+ (hence jruby-9.0.8.0+)
11
+ or propane-2.3.2+
12
+
13
+ ### Install the generative gem
14
+
15
+ ```bash
16
+ jruby -S gem install geomerative # safe way
17
+ gem install geomerative # using rvm rbenv to use jruby instead of MRI
18
+ ```
19
+
20
+ Create basic sketch
21
+
22
+ ```bash
23
+ mkdir 'fred'
24
+ mkdir 'fred/data'
25
+ cp '/usr/share/fonts/TTF/FreeMono.ttf fred/data' # other fonts are available
26
+ # '/usr/share/fonts/TTF/LiberationMono-Bold.ttf' Mac and Windows paths differ
27
+ cd fred
28
+ k9 create fred 600 400
29
+ ```
30
+
31
+ Edit sketch as follows:-
32
+
33
+ ```ruby
34
+ require 'geomerative'
35
+
36
+ # Declare the objects we are going to use, so that they are accessible from
37
+ # setup and from draw (use '@' prefix in declare)
38
+ attr_reader :grp
39
+
40
+ def setup
41
+ sketch_title 'Fred'
42
+ RG.init(self) # important
43
+ fill(255, 102, 0)
44
+ # you could also use absolute path for fonts, then no need to copy
45
+ @grp = RG.get_text('Hello World!', data_path('FreeMono.ttf'), 72, CENTER)
46
+ end
47
+
48
+ def draw
49
+ background(255)
50
+ translate(width / 2, height / 2)
51
+ grp.draw
52
+ end
53
+
54
+ def settings
55
+ size(600, 400)
56
+ end
57
+ ```
58
+
59
+ ![fred.png]({{site.github.url}}/assets/fred.png)
60
+
61
+ See more refined examples [here][examples], and even more [here][amon] including rotating text and text obeying physics.
62
+
63
+ Usage with propane is very similar see [examples here][here]
64
+
65
+ [examples]:https://github.com/ruby-processing/geomerativegem/tree/master/examples/
66
+ [amon]:http://www.creativeapplications.net/processing/generative-typography-processing-tutorial/
67
+ [here]:https://github.com/ruby-processing/propane-examples/tree/master/external_library/gem/geomerative/
@@ -0,0 +1,111 @@
1
+ ---
2
+ layout: post
3
+ title: "A tutorial example"
4
+ date: 2015-11-25 19:59:13
5
+ categories: geomerativegem update
6
+ ---
7
+
8
+ ### Bubble Sketch
9
+
10
+ To use the `RCommand` constant `UNIFORMLENGTH` in JRubyArt (and java constants in general with jruby) you would normally need to address it in the following way:- `Java::Generative::RCommand::UNIFORMLENGTH`. However in the geomerative gem we have done `package_include 'geomerative'` for you so you can get away with the short form `RCommand::UNIFORMLENGTH`, but you do need the `RCommand::` prefix. For processing constants the full form for the `CENTER` constant would be `Java::ProcessingCore::PConstants::CENTER` but because we hate typing we have made the processing constant `CENTER` available without the `PConstants::` prefix. If you have namespace difficulties you can always fall back on the full forms.
11
+
12
+ To make processing methods available in the `FontAgent` class (`font_agent.rb`) we `include` the `Processing::Proxy` module that gives similar access to that of a java inner class as used in vanilla processing.
13
+
14
+ ```ruby
15
+ # --------- GEOMERATIVE EXAMPLES ---------------
16
+ #
17
+ # This sketch deforms the text using noise as the underlying
18
+ # algorithm. mouse_x & mouse_y movement will change the amount
19
+ # & intensity of the noise values.
20
+ # Key 'f' = Switches animation on/off
21
+ # Key '+' & '-' = Changes the diameter of our ellipse.
22
+ #
23
+ # Licensed under GNU General Public License (GPL) version 3.
24
+ # http://www.gnu.org/licenses/gpl.html
25
+ #
26
+ # A series of tutorials for using the Geomerative Library
27
+ # developed by Ricard Marxer.
28
+ # http://www.ricardmarxer.com/geomerative/
29
+ #
30
+ # More info on these tutorials and workshops at :
31
+ # www.freeartbureau.org/blog
32
+ # translated to JRubyArt by Martin Prout
33
+ #
34
+ require 'geomerative'
35
+ require_relative 'font_agent'
36
+
37
+ attr_reader :my_agents, :step, :stop_anime
38
+
39
+ def settings
40
+ size(800, 350)
41
+ smooth
42
+ end
43
+
44
+ def setup
45
+ sketch_title 'Bubbles'
46
+ background(0)
47
+ @step = 3
48
+ my_text = 'BUBBLES'
49
+ RG.init(self)
50
+ my_font = RFont.new(data_path('FreeSans.ttf'), 113, CENTER)
51
+ @stop_anime = false
52
+ RCommand.set_segment_length(10)
53
+ RCommand.set_segmentator(RCommand::UNIFORMLENGTH)
54
+ @my_agents = my_font.to_group(my_text).get_points.map do |point|
55
+ FontAgent.new(loc: Vec2D.new(point.x, point.y))
56
+ end
57
+ end
58
+
59
+ def draw
60
+ translate(400, 205)
61
+ background(0)
62
+ fill(255)
63
+ my_agents.each do |point|
64
+ point.display(step: step)
65
+ point.motion(x: mouse_x, y: mouse_y)
66
+ end
67
+ end
68
+
69
+ def key_pressed
70
+ case key
71
+ when 'f', 'F'
72
+ @stop_anime = !stop_anime
73
+ stop_anime ? no_loop : loop
74
+ when '+'
75
+ @step += 1
76
+ when '-'
77
+ @step -= 1
78
+ end
79
+ end
80
+ ```
81
+
82
+ ### FontAgent class
83
+ ```ruby
84
+ # FontAgent class handles motion and display
85
+ class FontAgent
86
+ include Processing::Proxy # gives java 'inner class like' access to App
87
+ attr_reader :loc, :mot
88
+
89
+ def initialize(loc:)
90
+ @loc = loc
91
+ @mot = 0
92
+ end
93
+
94
+ def motion(x:, y:)
95
+ noise_scale = map1d(x, (0..width), (0.001..0.01))
96
+ noise_z = map1d(y, (0..height), (frame_count * 0.0003..frame_count * 0.02))
97
+ @mot = noise(
98
+ loc.x * noise_scale * noise_z,
99
+ loc.y * noise_scale * noise_z
100
+ ) * 53
101
+ end
102
+
103
+ def display(step:)
104
+ no_stroke
105
+ fill(255, 53)
106
+ ellipse(loc.x, loc.y, mot + step, mot + step)
107
+ end
108
+ end
109
+ ```
110
+
111
+ ![bubbles.png]({{ site.github.url }}/assets/bubbles.png)