Data2viz logo

import io.data2viz.color.* import io.data2viz.geom.* import io.data2viz.math.* import io.data2viz.viz.* fun main() { viz { size = size(400, 400) val gradient = Colors.Gradient.linear(point(0, 400), point(400, 0)) .withColor("#413FDE".col) .andColor("#443DE2".col, 25.pct) .andColor("#7641DF".col, 50.pct) .andColor("#B945CE".col, 75.pct) .andColor("#DE3D82".col, 100.pct) rect { size = Size(400.0, 400.0) fill = gradient } rect { x = 30.0 y = 30.0 size = Size(340.0, 340.0) fill = Colors.Web.white } rect { x = 60.0 y = 60.0 size = Size(280.0, 280.0) fill = gradient } path { moveTo(200.0, 340.0) lineTo(340.0, 60.0) lineTo(360.0, 360.0) fill = Colors.Web.white } path { moveTo(220.0, 360.0) lineTo(55.0, 37.5) strokeWidth = 30.0 strokeColor = Colors.Web.white } path { moveTo(340.0, 300.0) lineTo(215.0, 37.5) strokeColor = Colors.Web.white strokeWidth = 30.0 } }.bindRendererOnNewCanvas() }
pierre avatar

Sketch created by

pierre

comments

Gaetan Zoritchak