Open johnnychen94 opened 4 years ago
This is so breaking a design that we may want to start a new repo to do this, a more appropriate place for this is in JuliaGraphics because Image
is just one of many drawable types:
struct Image{A<:AbstractArray} <: Drawable
# the axes of image contain all the positional information
data::A
end
I could initialize it this weekend, in the meantime, we could still continue the devs here.
Edit:
I'm becoming rather ambitious that I'm now considering what graphic processing should be with image processing as one special case of it.
https://xkcd.com/927/ :smile:
Of course, I don't hate reinventing the wheel. My concerns are:
Yes, this should start as an experiment and I'm not a graphic expert.
I really don't like the hard-coded x
, y
, width
, height
in those packages, given that we have much clearer CartesianIndex
. Also, it's not a good experience when I get lost in the countless keyword arguments and names.
It should just start as an experimental package, and if it works well, I'll get ImageDraw
deprecated.
This sounds very interesting @johnnychen94 . Did you start up a new repo?
The current ImageDraw design has significantly restricted its possibility to the 2D case, and that's not good in general (even though it's the most common case).
What I have in mind is:
Basically, each drawable type consists of the whole information on how it can be drawn.
Layers
is a simple wrapper onDataStructures.PriortyQueue
that controls how individual objects are drawn in onedraw
call.Point
is not serving as the index, but instead as a real physical "point" with color and thickness information.This is a draft type design, we could definitely add more information into each drawable struct.
cc: @jiviteshjain @mgautam98