It looks like you're new here. If you want to get involved, click one of these buttons!
Hi Matthias-
Please see code below.
I would like to have 'r90' image with the exact same magnification 'r0' image.
What's the best way to do that?
Thanks,
def wait():
counter = 1
start = time.time()
while True:
time.sleep(0.1)
if time.time() - start > 1:
start = time.time()
counter = counter - 1
if counter <= 0:
break
main_window = pya.Application.instance().main_window()
layout = main_window.create_layout(0).layout()
layout_view = main_window.current_view()
layout.dbu = 1
cell = layout.create_cell("TOP")
layer_index = layout.insert_layer(pya.LayerInfo.new(10, 0))
cell.shapes(layer_index).insert(pya.Box.new(0, 0, 1, 5))
cell.shapes(layer_index).insert(pya.Box.new(0, 4, 3, 5))
cell.shapes(layer_index).insert(pya.Box.new(0, 2, 2, 3))
layout_view.max_hier()
layout_view.select_cell(cell.cell_index(), 0)
layout_view.add_missing_layers()
layout_view.zoom_fit()
layout_view.set_config("global-trans", "r0")
wait()
box = layout_view.box()
layout_view.save_image_with_options('c:/temp/r0.png',1000,1000,1,1,1,box,False)
layout_view.set_config("global-trans", "r90")
wait()
box = layout_view.box()
layout_view.save_image_with_options('c:/temp/r90.png',1000,1000,1,1,1,box,False)
Comments
I am not sure what you mean.
I used your script (after adding "import time" at the front) and to me these images seem to share the same magnification.
Matthias