I’d assume there are other ways to call Groovy scripts from Groovy, but it really depends what you need.
executeScript does more work in setting the ‘current’ image/project, default imports etc.
I don’t understand well enough how precisely the feature is defined, and what is the case for including it. Everything that is added is also a bit more complexity (another user preference, another thing that needs to be maintained & possibly updated across versions, another reason why one person’s screenshots don’t look like someone else’s…). With thousands of users who all want something different, I’m apprehensive about making core changes quickly without a clear idea of the wider benefits.
In this case, I don’t know what ‘top left’ would mean exactly. It would be easy to use the bounding box, but then is it the inner or outer part (or both)?
I can also imagine shapes (e.g. a reflected L shape) where the bounding box corner is very far from the actual shape being named… and, indeed, having a different shape position can make things extremely confusing whenever objects are nearby since the label may be much closer to/within another object.
The ability to display names on the viewer at all was only added very recently. I thought about different positionings at the time, and decided the centroid was the least confusing. What is the problem that adding an option to change the position would solve? There might be another way to get the desired outcome.