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.
- checksums.yaml +5 -5
- data/.gitignore +2 -0
- data/.mvn/extensions.xml +1 -1
- data/.mvn/wrapper/maven-wrapper.properties +1 -1
- data/CHANGELOG.md +25 -0
- data/COPYING.md +1 -1
- data/README.md +4 -2
- data/Rakefile +2 -15
- data/docs/.gitignore +6 -0
- data/docs/_config.yml +30 -0
- data/docs/_includes/footer.html +38 -0
- data/docs/_includes/head.html +16 -0
- data/docs/_includes/header.html +27 -0
- data/docs/_includes/icon-github.html +1 -0
- data/docs/_includes/icon-github.svg +3 -0
- data/docs/_includes/icon-twitter.html +1 -0
- data/docs/_includes/icon-twitter.svg +3 -0
- data/docs/_includes/navigation.html +24 -0
- data/docs/_layouts/default.html +20 -0
- data/docs/_layouts/page.html +14 -0
- data/docs/_layouts/post.html +15 -0
- data/docs/_posts/2015-11-21-getting_started.md +67 -0
- data/docs/_posts/2015-11-25-bubbles.md +111 -0
- data/docs/_posts/2015-11-26-extra_bright.md +103 -0
- data/docs/_posts/2015-11-26-text_merge.md +114 -0
- data/docs/_posts/2016-07-06-dymo.md +99 -0
- data/docs/_sass/_base.scss +206 -0
- data/docs/_sass/_layout.scss +242 -0
- data/docs/_sass/_syntax-highlighting.scss +71 -0
- data/docs/about.md +12 -0
- data/docs/assets/bright.png +0 -0
- data/docs/assets/bubbles.png +0 -0
- data/docs/assets/design.png +0 -0
- data/docs/assets/dymo.png +0 -0
- data/docs/assets/favicon.ico +0 -0
- data/docs/assets/fred.png +0 -0
- data/docs/assets/merge.png +0 -0
- data/docs/css/main.scss +38 -0
- data/docs/favicon.ico +0 -0
- data/docs/feed.xml +30 -0
- data/docs/index.html +38 -0
- data/examples/README.md +1 -1
- data/examples/data/bot1.svg +1 -1
- data/examples/data/lion.svg +156 -156
- data/examples/data/ruby.svg +1 -1
- data/examples/hello_svg_to_pdf.rb +1 -1
- data/examples/jruby_merge.rb +1 -1
- data/examples/{f_agent.rb → library/f_agent/f_agent.rb} +0 -0
- data/examples/{font_agent.rb → library/font_agent/font_agent.rb} +2 -1
- data/examples/text_on_geomerative_path.rb +3 -2
- data/examples/typo_deform.rb +2 -2
- data/examples/typo_extra_bright.rb +1 -1
- data/geomerative.gemspec +3 -7
- data/lib/geomerative.rb +5 -4
- data/lib/geomerative/version.rb +1 -1
- data/mvnw +234 -0
- data/mvnw.cmd +145 -0
- data/pom.rb +19 -18
- data/pom.xml +14 -13
- data/src/geomerative/FastRClip.java +2050 -2334
- data/src/geomerative/RClip.java +2237 -2539
- data/src/geomerative/RClosest.java +33 -31
- data/src/geomerative/RCommand.java +1750 -1758
- data/src/geomerative/RContour.java +290 -292
- data/src/geomerative/RFont.java +277 -246
- data/src/geomerative/RG.java +722 -727
- data/src/geomerative/RGeomElem.java +967 -962
- data/src/geomerative/RGroup.java +508 -467
- data/src/geomerative/RMatrix.java +304 -289
- data/src/geomerative/RMesh.java +241 -229
- data/src/geomerative/RPath.java +924 -926
- data/src/geomerative/RPoint.java +391 -391
- data/src/geomerative/RPolygon.java +1017 -1013
- data/src/geomerative/RRectangle.java +43 -52
- data/src/geomerative/RSVG.java +480 -516
- data/src/geomerative/RShape.java +1767 -1777
- data/src/geomerative/RStrip.java +173 -176
- data/src/geomerative/RStyle.java +197 -194
- data/src/org/apache/batik/svggen/font/Font.java +141 -142
- data/src/org/apache/batik/svggen/font/Glyph.java +102 -71
- data/src/org/apache/batik/svggen/font/Point.java +12 -12
- data/src/org/apache/batik/svggen/font/RandomAccessFileEmulator.java +14 -12
- data/src/org/apache/batik/svggen/font/table/ClassDef.java +12 -12
- data/src/org/apache/batik/svggen/font/table/ClassDefFormat1.java +27 -24
- data/src/org/apache/batik/svggen/font/table/ClassDefFormat2.java +20 -17
- data/src/org/apache/batik/svggen/font/table/CmapFormat.java +43 -43
- data/src/org/apache/batik/svggen/font/table/CmapFormat0.java +33 -26
- data/src/org/apache/batik/svggen/font/table/CmapFormat2.java +25 -20
- data/src/org/apache/batik/svggen/font/table/CmapFormat4.java +106 -96
- data/src/org/apache/batik/svggen/font/table/CmapFormat6.java +36 -32
- data/src/org/apache/batik/svggen/font/table/CmapIndexEntry.java +69 -49
- data/src/org/apache/batik/svggen/font/table/CmapTable.java +50 -50
- data/src/org/apache/batik/svggen/font/table/Coverage.java +19 -19
- data/src/org/apache/batik/svggen/font/table/CoverageFormat1.java +30 -27
- data/src/org/apache/batik/svggen/font/table/CoverageFormat2.java +26 -24
- data/src/org/apache/batik/svggen/font/table/CvtTable.java +16 -16
- data/src/org/apache/batik/svggen/font/table/Device.java +32 -32
- data/src/org/apache/batik/svggen/font/table/DirectoryEntry.java +39 -39
- data/src/org/apache/batik/svggen/font/table/Feature.java +26 -23
- data/src/org/apache/batik/svggen/font/table/FeatureList.java +37 -35
- data/src/org/apache/batik/svggen/font/table/FeatureRecord.java +22 -22
- data/src/org/apache/batik/svggen/font/table/FeatureTags.java +4 -3
- data/src/org/apache/batik/svggen/font/table/FpgmTable.java +9 -9
- data/src/org/apache/batik/svggen/font/table/GlyfCompositeComp.java +134 -132
- data/src/org/apache/batik/svggen/font/table/GlyfCompositeDescript.java +123 -122
- data/src/org/apache/batik/svggen/font/table/GlyfDescript.java +44 -44
- data/src/org/apache/batik/svggen/font/table/GlyfSimpleDescript.java +110 -109
- data/src/org/apache/batik/svggen/font/table/GlyfTable.java +46 -46
- data/src/org/apache/batik/svggen/font/table/GlyphDescription.java +25 -13
- data/src/org/apache/batik/svggen/font/table/GposTable.java +26 -23
- data/src/org/apache/batik/svggen/font/table/GsubTable.java +85 -82
- data/src/org/apache/batik/svggen/font/table/HeadTable.java +131 -131
- data/src/org/apache/batik/svggen/font/table/HheaTable.java +80 -80
- data/src/org/apache/batik/svggen/font/table/HmtxTable.java +50 -49
- data/src/org/apache/batik/svggen/font/table/KernSubtable.java +29 -27
- data/src/org/apache/batik/svggen/font/table/KernSubtableFormat0.java +35 -32
- data/src/org/apache/batik/svggen/font/table/KernSubtableFormat2.java +28 -26
- data/src/org/apache/batik/svggen/font/table/KernTable.java +36 -31
- data/src/org/apache/batik/svggen/font/table/KerningPair.java +27 -23
- data/src/org/apache/batik/svggen/font/table/LangSys.java +28 -26
- data/src/org/apache/batik/svggen/font/table/LangSysRecord.java +22 -22
- data/src/org/apache/batik/svggen/font/table/Ligature.java +24 -24
- data/src/org/apache/batik/svggen/font/table/LigatureSet.java +24 -24
- data/src/org/apache/batik/svggen/font/table/LigatureSubst.java +9 -9
- data/src/org/apache/batik/svggen/font/table/LigatureSubstFormat1.java +30 -30
- data/src/org/apache/batik/svggen/font/table/LocaTable.java +37 -37
- data/src/org/apache/batik/svggen/font/table/Lookup.java +41 -40
- data/src/org/apache/batik/svggen/font/table/LookupList.java +34 -34
- data/src/org/apache/batik/svggen/font/table/LookupSubtableFactory.java +7 -5
- data/src/org/apache/batik/svggen/font/table/MaxpTable.java +96 -96
- data/src/org/apache/batik/svggen/font/table/NameRecord.java +64 -65
- data/src/org/apache/batik/svggen/font/table/NameTable.java +33 -33
- data/src/org/apache/batik/svggen/font/table/Os2Table.java +196 -196
- data/src/org/apache/batik/svggen/font/table/Panose.java +14 -12
- data/src/org/apache/batik/svggen/font/table/PostTable.java +338 -338
- data/src/org/apache/batik/svggen/font/table/PrepTable.java +9 -9
- data/src/org/apache/batik/svggen/font/table/Program.java +15 -15
- data/src/org/apache/batik/svggen/font/table/RangeRecord.java +26 -25
- data/src/org/apache/batik/svggen/font/table/Script.java +38 -38
- data/src/org/apache/batik/svggen/font/table/ScriptList.java +42 -42
- data/src/org/apache/batik/svggen/font/table/ScriptRecord.java +22 -22
- data/src/org/apache/batik/svggen/font/table/ScriptTags.java +2 -1
- data/src/org/apache/batik/svggen/font/table/SingleSubst.java +15 -16
- data/src/org/apache/batik/svggen/font/table/SingleSubstFormat1.java +33 -33
- data/src/org/apache/batik/svggen/font/table/SingleSubstFormat2.java +32 -32
- data/src/org/apache/batik/svggen/font/table/Table.java +171 -170
- data/src/org/apache/batik/svggen/font/table/TableDirectory.java +55 -55
- data/src/org/apache/batik/svggen/font/table/TableFactory.java +92 -93
- metadata +47 -30
- data/.travis.yml +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 824ce3125f29427f12f918db67abaf3dfb5a5fa74655a68f6578433008a0d920
|
4
|
+
data.tar.gz: abe6dd8f491f622abb0f28cca3cdbf64376d1d004d32ba78e038fd230a1daa21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e795f9ab417fcc3c8411d7a4c73ad685c090894ed78c3fe7641cb0c99ff39232bb51b7b3f39e2341852cffd1f2ca3a06717ef5451dfef8cace2d3d45d598db3
|
7
|
+
data.tar.gz: db4b1c642d340e5776d40f2cb85d1d11593eb713a3021be8fa47bb7c5d1f416fa491533f1cc35b149ec6fb10cff34184e24cd84246c168c59ef0c36b32669adb
|
data/.gitignore
CHANGED
data/.mvn/extensions.xml
CHANGED
@@ -1 +1 @@
|
|
1
|
-
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.
|
1
|
+
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip
|
data/CHANGELOG.md
CHANGED
@@ -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-
|
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
|
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: [:
|
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 "
|
8
|
+
sh "jgem build geomerative.gemspec"
|
22
9
|
end
|
23
10
|
|
24
11
|
desc 'Compile'
|
data/docs/.gitignore
ADDED
data/docs/_config.yml
ADDED
@@ -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,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)
|