import io.data2viz.color.*
import io.data2viz.geom.*
import io.data2viz.math.*
import io.data2viz.viz.*
fun main() {
viz {
size = size(600, 600) //<- you need a viz size
// but change everything from here
val gradient =
Colors.Gradient.linear(point(0, 0), point(600, 0))
.withColor(Colors.Web.hotpink)
.andColor(Colors.Web.blueviolet)
text {
x = 10.0
y = 70.0
textContent = "Sketch your Vizi!"
textColor = gradient
fontSize = 80.0
}
// to here
}.bindRendererOnNewCanvas()
}
comments