Skip to content

Instantly share code, notes, and snippets.

@pencelab
Created May 15, 2021 08:42
Show Gist options
  • Save pencelab/f6f28ee8cc44a8f1fe414a001cb0d7bc to your computer and use it in GitHub Desktop.
Save pencelab/f6f28ee8cc44a8f1fe414a001cb0d7bc to your computer and use it in GitHub Desktop.
panel {
val square = square {
lines = 8
char = 'd'
}
addShape(Space)
val triangle = triangle {
lines = 8
char = 'd'
}
addShape(Space)
val rhombus = rhombus {
lines = 11
char = 'l'
}
addShape(Space)
addShape(
ComposedShape(square, rhombus, ComposedShape.Operation.UNION)
)
addShape(Space)
addShape(
ComposedShape(rhombus, triangle, ComposedShape.Operation.UNION)
)
addShape(Space)
addShape(
ComposedShape(square, rhombus, ComposedShape.Operation.INTERSECTION)
)
addShape(Space)
addShape(
ComposedShape(rhombus, triangle, ComposedShape.Operation.INTERSECTION)
)
addShape(Space)
addShape(
ComposedShape(
ComposedShape(square, rhombus, ComposedShape.Operation.UNION),
triangle,
ComposedShape.Operation.UNION
)
)
addShape(Space)
addShape(
ComposedShape(
ComposedShape(square, rhombus, ComposedShape.Operation.INTERSECTION),
triangle,
ComposedShape.Operation.INTERSECTION
)
)
}.print()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment