Plug-ins: element positioning API
Firstly, I am not sure this belongs here or to the plug-in forum: it seems to me the plug-in forum be for development (and advertisement!) of individual plug-ins, while core development of the plug-in API belongs here. If I am wrong, please advise (with my apologies).
Revising the methods / properties to get / set element positions, I find a few things puzzling me.
Element.offsetY, when set, result in the new value not being set in place of the current value but added to the current value. In practice:
e.offsetX = val;actually means
e.offsetX += val;
Is this done on purpose? Should it not, at least, be documented?
Element.offsetaccepts (and probably returns, but I didn't check) values in raster units, while all other positioning properties work in spatium units. Is this done on purpose?
- To use
Element.offsettogether with the other position properties, a spatium scale factor is needed which, as fas as I can tell, is not currently available. Is this done on purpose or simply has not been added yet?
- Given these sharp corners, is
Element.offsetreally necessary or
Element.posX/Yare read-only. In 2.x, it was possible to set it (the implementation routed this change into an offset change); this seems to me the most direct and ‘expectable’ way to set the position of an element with respect to its parent, so it would be very convenient to have.
As in the relevant source files none of these points are marked with "TODO" annotations and several months have elapsed, it is not always clear what is by design and what is work in progress.