It looks like you're new here. If you want to get involved, click one of these buttons!
Hi,
I'm trying to do a screenshot of all the layers of a gds file.
Right now I've managed to take a screenshot but it doesn't contain all the layers. (see code below)
include RBA
tailleX=500
tailleY=500
imgsave=ENV['HOME']+"/imagesGDS/"+File.basename($gdsfile, ".gds")+".png"
if (File.exist?(imgsave))
exit
end
mw = RBA::Application::instance.main_window
mw.load_layout($gdsfile,1)
mw.current_view.save_image(imgsave,tailleX,tailleY)
I would like to be able to select a specific layer as well as select all the layers if possible.
Thank you.
Comments
Not sure this is helpful, but seems a lot simpler to
just "Show All" or "Show Only Selected" in the layer
window, and Alt-Pr-Scrn? I mean, even invoking the
script takes more keyboard / mouse activity than
that.
But I'd expect that those menu-clicks have a hook
somewhere in the pile-o'-functions.
Hi, Florent!
You could access layer properties using
LayoutView.begin_layers()
that returns iterator. Then<iterator>.current().visible
(ofLayerProperties
type) allows to control visibility.For example (sorry for Python-centrism):
Okay finally worked my way around this.
I searched deeper in the forum and found something that works
I'll leave the code here if someone want to use it. (not the cleanest thing I've done)
Topic that helped me: changing-the-layer-visibility-by-using-ruby
Yes, very good! Thanks for sharing the code!
The trick is "layer_view.max_hier". Without that you just get cell frames.
Kind regards,
Matthias
Hi Matthias-
Is it possible to use the save_image or save_screenshot and have the layer panel included in the output image?
Thanks,
HI mikamar
by using this you can get the layer color, texture and border style image,
by combining the image and layer info into a widget, and using Qt Render to save user interface into a png
we can have layer panel screen shot.
@RawrRanger Wow ... best screen shot feature I've seen so far. And nice documentation too!