Graphite icon indicating copy to clipboard operation
Graphite copied to clipboard

Clean up the GraphicElement enum

Open Keavon opened this issue 1 year ago • 0 comments

To finish the transition to domains and attributes, we need to take the current GraphicElement enum definition and make it more standardized so it can be extended in the future with additional graphical data types like SDF and VectorField.

  • Convert the current VectorData(Box<VectorData>) into () -> VectorData and add Footprint -> VectorData.
  • Convert the current ImageFrame(ImageFrame<Color>) into () -> Raster and add Footprint -> Raster.
  • Eventually add SDF and VectorField (for, e.g., wind or magnetic fields) data types.

This means giving it versions for the adaptive resolution graphical data and versions for the finite graphical data. It also means removing nonstandard aspects, like how VectorData is currently boxed as Box<VectorData> and how ImageFrame is currently ImageFrame<Color>. Perhaps that can be done by newtyping both the finite and adaptive-resolution types which can hide away the boxing and generics?

Keavon avatar Jul 15 '24 08:07 Keavon