You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The way we handle graphics inside front-ends has needed improvement for a while.
In the first iteration of the code, a front-end gave Mathics3 core a format priority that the front-end could accept. Formats where sort of high-level formats of the kind that WMA defines. Mathics3 core then did both evaluation and formatting.
That is split in two now. Currently, the hacky formatting I wrote has the front-end receiving a Mathics3 internal expression (and by "expression" I mean this to include Atoms as well as complex expressions called "Expression").
We need to handle graphics inside boxes of various sorts, and this handles this poorly. So did the first iteration.
In discussing this with someone who knows more about this, an architectural idea of registering a callback for low-level display was suggested.
Here, I think what you'd want to do is have a callback on a class of built-in functions, like all Plot objects (ListLinePlot, DiscretePlot, LogPlot, ParametricPlot, ...) versus all Graphics3D objects (Sphere, Cube, Tetrahedron) versus Graphics3D plotting, etc.
It might be possible that this could be registered in advance, like the code originally did. However, one thing that is needed in either case is probably some bounding box information. It might not need to be exact, but roughly what's up. Is the target size going to be small (in which case, we may need to give an icon instead of some plot, for example)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
The way we handle graphics inside front-ends has needed improvement for a while.
In the first iteration of the code, a front-end gave Mathics3 core a format priority that the front-end could accept. Formats where sort of high-level formats of the kind that WMA defines. Mathics3 core then did both evaluation and formatting.
That is split in two now. Currently, the hacky formatting I wrote has the front-end receiving a Mathics3 internal expression (and by "expression" I mean this to include Atoms as well as complex expressions called "Expression").
We need to handle graphics inside boxes of various sorts, and this handles this poorly. So did the first iteration.
In discussing this with someone who knows more about this, an architectural idea of registering a callback for low-level display was suggested.
Here, I think what you'd want to do is have a callback on a class of built-in functions, like all Plot objects (ListLinePlot, DiscretePlot, LogPlot, ParametricPlot, ...) versus all Graphics3D objects (Sphere, Cube, Tetrahedron) versus Graphics3D plotting, etc.
It might be possible that this could be registered in advance, like the code originally did. However, one thing that is needed in either case is probably some bounding box information. It might not need to be exact, but roughly what's up. Is the target size going to be small (in which case, we may need to give an icon instead of some plot, for example)
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions