Matrix transformation script on multi page document #145
Replies: 2 comments 4 replies
|
Yes! For each object, you'll need to determine if it intersects any of the pages you care about and, if so, apply your desired transformation. Here's the basic code structure I have in mind: page_list = all_pages()
page_bboxes = [page_list[p - 1].bounding_box() for p in [1, 3, 5, 7]]
for obj in all_shapes():
obb = obj.bounding_box()
for pbb in page_bboxes:
ibb = obb & pbb
if ibb.x != inkex.transforms.BoundingInterval():
# Apply transformation.In the above, Object transformations are discussed in Applying individual transformations in the Simple Inkscape Scripting wiki. If you want to specify a transformation matrix explicitly, you can set |
|
Thanks for your reply. I'll make some tests. Is it possible to do a matrix transformation for a page, affecting all the objects in it? |
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone
I've got a multi page document. Is it possible to run a script that could run a Matrix transformation (Object -> Transform) for the objects of pages 1,3,5,7 only?
Thanks
All reactions