Skip to content

Instantly share code, notes, and snippets.

@dacr
Last active May 25, 2024 10:19
Show Gist options
  • Save dacr/77cbb6e41a424d5d16e23745c915730c to your computer and use it in GitHub Desktop.
Save dacr/77cbb6e41a424d5d16e23745c915730c to your computer and use it in GitHub Desktop.
Smallest doodle example. / published by https://github.com/dacr/code-examples-manager #5423ee0c-032e-47f7-b8a5-af5a1ec75338/8b789d6a071a337688c3b298bfa8328ec245f6fd
// summary : Smallest doodle example.
// keywords : scala, vector-graphics, doodle, @testable
// publish : gist
// authors : David Crosson
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// id : 5423ee0c-032e-47f7-b8a5-af5a1ec75338
// created-on : 2019-07-02T19:58:14Z
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : scala-cli $file
// ---------------------
//> using scala "3.4.2"
//> using dep "org.creativescala::doodle:0.20.0"
//> using dep "org.creativescala::doodle-image:0.20.0"
// ---------------------
import doodle.core.*
import doodle.core.format.*
import doodle.image.*
import doodle.image.syntax.all.*
import doodle.java2d.*
import cats.effect.unsafe.implicits.global
//Image.circle(100).fillColor(Color.red).draw()
Image.circle(100).fillColor(Color.red).write[Png]("circle.png")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment