Skip to content

Instantly share code, notes, and snippets.

@pencelab
Last active May 15, 2021 12:43
Show Gist options
  • Save pencelab/e9514c30650426cfd9a55681697cf766 to your computer and use it in GitHub Desktop.
Save pencelab/e9514c30650426cfd9a55681697cf766 to your computer and use it in GitHub Desktop.
panel {
val square = square {
lines = 8
char = 'd'
}
space()
val triangle = triangle {
lines = 8
char = 'd'
}
space()
val rhombus = rhombus {
lines = 11
char = 'l'
}
space()
addShape(
ComposedShape(square, rhombus, ComposedShape.Operation.UNION)
)
space()
addShape(
ComposedShape(rhombus, triangle, ComposedShape.Operation.UNION)
)
space()
addShape(
ComposedShape(square, rhombus, ComposedShape.Operation.INTERSECTION)
)
space()
addShape(
ComposedShape(rhombus, triangle, ComposedShape.Operation.INTERSECTION)
)
space()
addShape(
ComposedShape(
ComposedShape(square, rhombus, ComposedShape.Operation.UNION),
triangle,
ComposedShape.Operation.UNION
)
)
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