Expose SVG Export Options and Add Some Useful Extras (#596)
* Exposed getSVG opt parameter and added project dir * Added additional options based on feedback * Lint updates * Added docstring for getSVG * Fix strange black formatting suggestion. Co-authored-by: Marcus Boyd <50230945+marcus7070@users.noreply.github.com> * Fixed another Lint error that I did not see locally * Added test for STL options * Trying to get codecov to see that line 260 is covered * Fixed copy-paste error of the wrong test * Mention opt in the docstring Co-authored-by: Marcus Boyd <50230945+marcus7070@users.noreply.github.com> Co-authored-by: Adam Urbańczyk <adam-urbanczyk@users.noreply.github.com>
This commit is contained in:
@ -49,6 +49,26 @@ class TestExporters(BaseTest):
|
||||
|
||||
exporters.export(self._box(), "out.svg")
|
||||
|
||||
def testSVGOptions(self):
|
||||
self._exportBox(exporters.ExportTypes.SVG, ["<svg", "<g transform"])
|
||||
|
||||
exporters.export(
|
||||
self._box(),
|
||||
"out.svg",
|
||||
opt={
|
||||
"width": 100,
|
||||
"height": 100,
|
||||
"marginLeft": 10,
|
||||
"marginTop": 10,
|
||||
"showAxes": False,
|
||||
"projectionDir": (0, 0, 1),
|
||||
"strokeWidth": 0.25,
|
||||
"strokeColor": (255, 0, 0),
|
||||
"hiddenColor": (0, 0, 255),
|
||||
"showHidden": True,
|
||||
},
|
||||
)
|
||||
|
||||
def testAMF(self):
|
||||
self._exportBox(exporters.ExportTypes.AMF, ["<amf units", "</object>"])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user