creativescala / doodle

Compositional vector graphics in Scala / Scala.JS
https://creativescala.org/doodle/
Apache License 2.0
327 stars 75 forks source link

Abstract default frame #148

Closed noelwelsh closed 5 months ago

noelwelsh commented 5 months ago

Many Writer methods will be more convenient to call if the user doesn't have to specify a Frame parameter but instead some sensible default is used. There is already a default frame but it is coupled to rendering (see DefaultRenderer). So goal of this work is to abstract the default frame into it's own type class so it can be used in more contexts.

jCabala commented 5 months ago

Frame.default is used as a default frame. Is this issue asking to remove it and change all usecases into using another class that extends from Frame?

noelwelsh commented 5 months ago

I'll implement this one. It's quite simple in implementation but harder to explain.

noelwelsh commented 5 months ago

PR: https://github.com/creativescala/doodle/pull/153