Hi everyone,
(Sorry for my english)
I'm looking for a lib wich allows me to open a GDS2 under a Qt interface. I thought I could learn from your code open source and include files needed to display a GDS in my Qt interface. Unfortunately, I have not found a proper documentation. And it has hundreds of files of codes! Where should I look for the code that only open and display a GDS2?
Does someone could help me?
Thanks a lot!
Comments
Hello,
well, doing it properly and efficient simply requires a couple of lines of code ... :-)
Basically, KLayout is an application, not a library. It's build on some kind of framework which you could reuse (given you observe the implications of the GPL license). But providing a library or framework is very much different from providing an application (i.e. needs different documentation, deployment, licensing and support) and that is simply out of the scope of that project.
You'll find a couple of other free libraries that allow you read and write GDS files. Drawing a simple layout with Qt is not a big issue since Qt comes with the necessary primitives, but that approach will be limited with respect to performance and drawing precision. To overcome these limitations, KLayout comes with a custom drawing engine which bloats up the code, just to note one particular issue.
Painting works quite differently in KLayout compared to simple drawing on a QPainter object. Specifically, KLayout uses a collection of single-bit planes to paint on. These planes are then combined into the final image. This approach accounts for the typical, layered nature of a layout and facilitates background painting. Painting also goes through some levels of abstraction to support different output schemes and multi-threaded drawing and that architecture is not a shape yet that can be presented easily.
Even more, KLayout is build around some lean internal interfaces and much functionality is implemented as components employing these interfaces in a "plugin" fashion. Which means they can be easily separated off or it's possible to extend KLayout without touching the framework. That fact further complicates the code.
If you're desperate or out for some challenge, here are some hints:
Matthias