Graphite
Graphite copied to clipboard
Clean up the GraphicElement enum
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() -> VectorDataand addFootprint -> VectorData. - Convert the current
ImageFrame(ImageFrame<Color>)into() -> Rasterand addFootprint -> Raster. - Eventually add
SDFandVectorField(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?