Em dom., 3 de abr. de 2022 às 19:18, Alexandre Torres Porres < porres@gmail.com> escreveu:
Em sáb., 2 de abr. de 2022 às 17:47, João Pais jmmmpais@gmail.com escreveu:
all the "units per pixel" values only affect data structure scalars.
Thanks for clarifying
Well, that is not actually true. Regular patch windows are affected by this, but only when you resize the window. If both are "1", objects will move if you resize the window from the bottom corners, so I can see why the default for all canvases should be 1 unit per pixel for "X" and -1 for "Y" by default.
It's easy to explain this and how you probably want it to be "1" for both in canvases used for Data Structures.
This settles it, but there's also this second issue I raised, that the default "Y" range is different if you create a subpatch and make it "Graph on Parent" and if you add a "graph" from the Put Menu (or shortcut). I think the default should be the same for both and that the default for graph makes more sense.
here's another question: whenever we have "graph on parent" checked, the units per pixels get grayed out and it seems that this parameter is meaningless in this case, right? See ==> http://msp.ucsd.edu/Pd_documentation/fig8.6.jpg
Just making it extremely sure, cause I want to document these things.
Now, in this case, if we want to plot data structures, we have to set the
proper range in "X range" and "Y Range". Now, this range is also only meaningful for Data Strucutres, and regular arrays in Pd are Data Structures scalars anyway... right?
I would still like to clarify this
I haven't checked the code and I'm confused. The documentation is not explicit. I'm guessing that the "Y range" is in fact from lower to higher as in the "X range" but we need to swap this to plot arrays correctly. In my view, this would be a bug, and related to the units per pixels issue.
I checked the code, I'm not all sure, but it seems that the Y range is intended to be "upper" and "lower" indeed. At least there seems to be an intended order in the "bounds" message, which I have documented and included in the reference for "garrays" (in canvas-help.pd).
The order of the bounds message is: "<xmin>, <ymax>, <xmax>, <ymin>".
This makes more sense as a pair of top and bottom coordinates and maybe we can change the window dialog accordingly, but I also think that is quite confusing. The message seems inverted as it'd make more sense to me to something like "<xmin>, <ymin>, <xmax>, <ymax>" or "<xmin>, <xmax>, <ymin>, <ymax>" in both the 'bounds' message and the properties window. Not sure what to do besides creating a new message/method to replace 'bounds'.
There's a PR or a new message to set graph size ==> https://github.com/pure-data/pure-data/pull/627 maybe it could also set bounds... (?)
cheers