MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / byInsetting

Method byInsetting

src/main/java/field/graphics/FLine.java:1191–1202  ·  view source on GitHub ↗

returns a new line by insetting this shape. This is equivalent to stroking the shape with a line with a certain thickness and then removing that shape from this shape. Setting `amount` to a negative number 'outset's the shape.

(float amount)

Source from the content-addressed store, hash-verified

1189 } else if (amount == 0) return duplicate();
1190 else {
1191 FLine nn = FLinesAndJavaShapes.javaShapeToFLine(FLinesAndJavaShapes.outsetShape(this, amount));
1192 nn.copyAttributesFrom(this);
1193 return nn;
1194 }
1195 }
1196
1197 @HiddenInAutocomplete
1198 public void setAuxProperties(Map<Integer, String> propertiesToAuxChannels) {
1199 auxProperties = new LinkedHashMap<>();
1200 propertiesToAuxChannels.forEach((k, v) -> {
1201 Dict.Prop pv = new Dict.Prop(v);
1202 auxProperties.put(k, n -> n.attributes.get(pv));
1203 });
1204 }
1205

Callers

nothing calls this directly

Calls 5

insetShapeMethod · 0.95
copyAttributesFromMethod · 0.95
duplicateMethod · 0.95
javaShapeToFLineMethod · 0.95
outsetShapeMethod · 0.95

Tested by

no test coverage detected