Adding simple graphics objects to GladeVCP?
cmorley wrote: [As Andy says SVG is another way to display different static images.
Would work fine if there isn't a lot of different objects.
It''s worth noting that SVG supports layers, and you can turn layers on and off in Python, so a single SVG file can be quite a responsive graphic.
self.svg.render_cairo(cr = cr, id = '#layer%i' % tab_num)
Thanks... good to know about the layers in svg.
Yes, I initially thought about just using the LED symbol, but...
Can an LED be a hollow outline? Most seem to be uniform colored circles.
Is LED position limited to a "cell"? These hypothetical "boxes of goods" could have 2000 symbols in them, in a non-uniform pattern. Can't see how that would be handled well with a typical layout UI grid, unless it can have exceptionally fine granularity...
Need to dig into this more, just don't have time yet. I appreciate your input as someone who has already tinkered with it!
RetrofitTools wrote: Unfortunately, each run could have a completely different configuration. I'm not sure how I could effective generate an svg for each. That seems like more of a task than I want to handle!.
It's certainly a bit of a game, but not difficult in principle.
is a demo of a macro I wrote to programmatically create a multi-layer SVG as input for a DLP printer.
Attached is the VBA class that does the work.
RetrofitTools wrote: Is LED position limited to a "cell"? These hypothetical "boxes of goods" could have 2000 symbols in them, in a non-uniform pattern. Can't see how that would be handled well with a typical layout UI grid, unless it can have exceptionally fine granularity...
One solution I toyed with for my lathe macros was to store the original position of all the controls on the SVG as it was imported, and then scale those positions as the image size changed.
It worked fine, but there was something about it that bothered me (I have forgotten what it was now) and I went to the invisible table grid.
I would not be at all surprised to find that it is possible to embed metadata in an SVG file which can give the display code a clue what to put where, and what to call the result.