Skip to content

Commit 667750c

Browse files
committed
Fixed text and quality of vector graphics as exported
1 parent ba05f56 commit 667750c

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

Packages/vcs/vcs/VTKPlots.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,17 +1109,18 @@ def vectorGraphics(self, output_type, file, width=None, height=None,
11091109

11101110
# Since the patterns are applied as textures on vtkPolyData, enabling
11111111
# background rasterization is required to write them out
1112-
if self._rasterPropsInVectorFormats:
1113-
gl.Write3DPropsAsRasterImageOn()
1112+
# if self._rasterPropsInVectorFormats:
1113+
# gl.Write3DPropsAsRasterImageOn()
11141114

11151115
gl.SetInput(self.renWin)
11161116
gl.SetCompress(0) # Do not compress
11171117
gl.SetFilePrefix(".".join(file.split(".")[:-1]))
11181118

11191119
if textAsPaths:
1120-
gl.TextAsPathOff()
1121-
else:
11221120
gl.TextAsPathOn()
1121+
else:
1122+
gl.TextAsPathOff()
1123+
11231124
if output_type == "svg":
11241125
gl.SetFileFormatToSVG()
11251126
elif output_type == "ps":
@@ -1252,16 +1253,16 @@ def gettextextent(self, textorientation, texttable):
12521253
texttable = vcs.gettexttable(texttable)
12531254

12541255
from vtk_ui.text import text_dimensions
1255-
1256+
12561257
text_property = vtk.vtkTextProperty()
12571258
info = self.canvasinfo()
12581259
win_size = info["width"], info["height"]
12591260
vcs2vtk.prepTextProperty(text_property, win_size, to=textorientation, tt=texttable)
1260-
1261+
12611262
dpi = self.renWin.GetDPI()
1262-
1263+
12631264
length = max(len(texttable.string), len(texttable.x), len(texttable.y))
1264-
1265+
12651266
strings = texttable.string + [texttable.string[-1]] * (length - len(texttable.string))
12661267
xs = texttable.x + [texttable.x[-1]] * (length - len(texttable.x))
12671268
ys = texttable.y + [texttable.y[-1]] * (length - len(texttable.y))

0 commit comments

Comments
 (0)