Skip to content

Commit d2d5eee

Browse files
committed
get ready for release
1 parent ff3dd84 commit d2d5eee

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
### version-0.4.2
2-
Bump versions
2+
Bump versions processing-3.3, jruby-9.1.8.0
33

44
### version-0.4.1
55
No particular reason but java, jruby and processing have all been updated since last release

examples/hello_svg_to_pdf.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def setup
1212
sketch_title 'SVG to PDF sketch'
1313
RG.init(self)
1414
@grp = RG.load_shape(data_path('bot1.svg'))
15-
@pdf = create_graphics(width, height, PDF, 'bot1.pdf')
15+
@pdf = create_graphics(width, height, PDF, data_path('bot1.pdf'))
1616
end
1717

1818
def draw

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ DO NOT MODIFIY - GENERATED CODE
1111
<modelVersion>4.0.0</modelVersion>
1212
<groupId>ruby-processing</groupId>
1313
<artifactId>geomerative</artifactId>
14-
<version>0.4.1</version>
14+
<version>0.4.2</version>
1515
<name>geomerative</name>
1616
<description>geomerative-library for JRubyArt</description>
1717
<organization>
@@ -53,7 +53,7 @@ DO NOT MODIFIY - GENERATED CODE
5353
<dependency>
5454
<groupId>org.processing</groupId>
5555
<artifactId>core</artifactId>
56-
<version>3.2.1</version>
56+
<version>3.3.0</version>
5757
</dependency>
5858
</dependencies>
5959
<build>

src/geomerative/RCommand.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ public class RCommand extends RGeomElem {
7373
public static int segmentType = UNIFORMLENGTH;
7474

7575
/* Parameters for ADAPTATIVE (dependent of the PGraphics on which drawing) */
76-
static final int segmentRecursionLimit = 32;
77-
static final float segmentDistanceEpsilon = 1.192092896e-07F;
78-
static final float segmentCollinearityEpsilon = 1.192092896e-07F;
79-
static final float segmentAngleTolEpsilon = 0.01F;
76+
static final int SEGMENT_RECURSION_LIMIT = 32;
77+
static final float SEGMENT_DISTANCE_EPSILON = 1.192092896e-07F;
78+
static final float SEGMENT_COLLINEARITY_EPSILON = 1.192092896e-07F;
79+
static final float SEGMENT_ANGLE_TOL_EPSILON = 0.01F;
8080

8181
static float segmentGfxStrokeWeight = 1.0F;
8282
static float segmentGfxScale = 1.0F;
@@ -1057,7 +1057,7 @@ private void quadBezierAdaptative() {
10571057

10581058
private void quadBezierAdaptativeRecursive(float x1, float y1, float x2, float y2, float x3, float y3, int level) {
10591059

1060-
if (level > segmentRecursionLimit) {
1060+
if (level > SEGMENT_RECURSION_LIMIT) {
10611061
return;
10621062
}
10631063

@@ -1074,14 +1074,14 @@ private void quadBezierAdaptativeRecursive(float x1, float y1, float x2, float y
10741074
float dy = y3 - y1;
10751075
float d = Math.abs(((x2 - x3) * dy - (y2 - y3) * dx));
10761076

1077-
if (d > segmentCollinearityEpsilon) {
1077+
if (d > SEGMENT_COLLINEARITY_EPSILON) {
10781078
// Regular care
10791079
//-----------------
10801080
if (d * d <= segmentDistTolSqr * (dx * dx + dy * dy)) {
10811081
// If the curvature doesn't exceed the distance_tolerance value
10821082
// we tend to finish subdivisions.
10831083
//----------------------
1084-
if (segmentAngleTol < segmentAngleTolEpsilon) {
1084+
if (segmentAngleTol < SEGMENT_ANGLE_TOL_EPSILON) {
10851085
addCurvePoint(new RPoint(x123, y123));
10861086
return;
10871087
}
@@ -1120,7 +1120,7 @@ private void cubicBezierAdaptative() {
11201120
}
11211121

11221122
private void cubicBezierAdaptativeRecursive(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, int level) {
1123-
if (level > segmentRecursionLimit) {
1123+
if (level > SEGMENT_RECURSION_LIMIT) {
11241124
return;
11251125
}
11261126

@@ -1148,8 +1148,8 @@ private void cubicBezierAdaptativeRecursive(float x1, float y1, float x2, float
11481148
float d3 = Math.abs(((x3 - x4) * dy - (y3 - y4) * dx));
11491149
float da1, da2;
11501150

1151-
int d2b = (d2 > segmentCollinearityEpsilon) ? 1 : 0;
1152-
int d3b = (d3 > segmentCollinearityEpsilon) ? 1 : 0;
1151+
int d2b = (d2 > SEGMENT_COLLINEARITY_EPSILON) ? 1 : 0;
1152+
int d3b = (d3 > SEGMENT_COLLINEARITY_EPSILON) ? 1 : 0;
11531153
switch ((d2b << 1) + d3b) {
11541154
case 0:
11551155
// All collinear OR p1==p4
@@ -1167,7 +1167,7 @@ private void cubicBezierAdaptativeRecursive(float x1, float y1, float x2, float
11671167
// p1,p2,p4 are collinear, p3 is considerable
11681168
//----------------------
11691169
if (d3 * d3 <= segmentDistTolSqr * (dx * dx + dy * dy)) {
1170-
if (segmentAngleTol < segmentAngleTolEpsilon) {
1170+
if (segmentAngleTol < SEGMENT_ANGLE_TOL_EPSILON) {
11711171
addCurvePoint(new RPoint(x23, y23));
11721172
return;
11731173
}
@@ -1198,7 +1198,7 @@ private void cubicBezierAdaptativeRecursive(float x1, float y1, float x2, float
11981198
// p1,p3,p4 are collinear, p2 is considerable
11991199
//----------------------
12001200
if (d2 * d2 <= segmentDistTolSqr * (dx * dx + dy * dy)) {
1201-
if (segmentAngleTol < segmentAngleTolEpsilon) {
1201+
if (segmentAngleTol < SEGMENT_ANGLE_TOL_EPSILON) {
12021202
addCurvePoint(new RPoint(x23, y23));
12031203
return;
12041204
}
@@ -1232,7 +1232,7 @@ private void cubicBezierAdaptativeRecursive(float x1, float y1, float x2, float
12321232
// If the curvature doesn't exceed the distance_tolerance value
12331233
// we tend to finish subdivisions.
12341234
//----------------------
1235-
if (segmentAngleTol < segmentAngleTolEpsilon) {
1235+
if (segmentAngleTol < SEGMENT_ANGLE_TOL_EPSILON) {
12361236
addCurvePoint(new RPoint(x23, y23));
12371237
return;
12381238
}

0 commit comments

Comments
 (0)