[scribus-dev] Scripting: rotating image & selecting vertex
John L. Poole
jlpoole56 at gmail.com
Sun Sep 25 23:57:39 UTC 2016
A critical functionality for performing impositions (see
https://en.wikipedia.org/wiki/Imposition)
is the ability to rotate images upside down so after the folding every
page appears upright.
I'm trying to rotate images on a 6-up page using the following:
scribus.rotateObject(180, framename)
The help for "rotateObject(...) " tells us:
rotateObject(rot [, "name"])
Rotates the object "name" by "rot" degrees relatively. The object
is rotated by the vertex that is
currently selected as the rotation point - by default, the top left
vertext at zero rotation. Positive values mean counter clockwise
rotation
when the default rotation point is used. If "name" is not given
the currently selected item is used.
So, when I rotate, the axis point is the top left which causes the frame
to be positioned in another place
on my sheet. What I want to do is programmatically rotate the image
having its frame remain
in the same place. To accomplish this, I need to set the "Basepoint" to
the center of the frame.
I cannot find a way to alter the base point through the scripting interface.
What I could do is call rotateObject followed by a
"scribus.moveObject(...)" setting
the coordinates to what was the previous bottom right of the frame. But
this is a hack.
1) Is there a way to alter the selected vertex of an object in the
Scripting API?
-- John
More information about the scribus-dev
mailing list