hbox = QtGui.QHBoxLayout()
tree = parser.parse_string(curr_diagram)
diagram = builder.ScreenNodeBuilder.build(tree)
draw = drawer.DiagramDraw('SVG', diagram, filename="")
draw.draw()
svg_string = draw.save()
svg_widget = QtSvg.QSvgWidget()
svg_widget.load(QtCore.QString(svg_string).toLocal8Bit())
hbox.addWidget(svg_widget)
hbox.addStretch(1)
vbox.addLayout(hbox)
Hi,
How could I remove the padding in the picture generated by blockdiag's SVG function? I have been going through the source code but cannot follow yet how the program flow is exactly. It probably has to do with SVG's viewbox command, but I don't know how to change the viewbox; I can only turn it off.
The reason I want to remove the padding is that I integrate the picture into a PyQt application, which already has its own padding. My code for this is below. I tried adding options to the drawer initiation command, but it had no effect so far except for noviewbox.
Cheers,
Ronald
...