Skip to content

gettextextent broken? #15

Description

@doutriaux1
In [1]: t=x.createtext()

In [2]: t.string = "Hello"

In [3]: t.string
Out[3]: ['Hello']

In [4]: x.open()

In [5]: x.gettextextent(t)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-5-33453cf4a74f> in <module>()
----> 1 x.gettextextent(t)

/Users/doutriaux1/anaconda2/envs/2.6-42-gaa9dc08/lib/python2.7/site-packages/vcs/Canvas.pyc in gettextextent(self, textobject)
   2178         To = textobject.To_name
   2179         Tt = textobject.Tt_name
-> 2180         return self.backend.gettextextent(To, Tt)
   2181 
   2182     def match_color(self, color, colormap=None):  # noqa

/Users/doutriaux1/anaconda2/envs/2.6-42-gaa9dc08/lib/python2.7/site-packages/vcs/VTKPlots.pyc in gettextextent(self, textorientation, texttable)
   1270         dpi = self.renWin.GetDPI()
   1271 
-> 1272         length = max(len(texttable.string), len(texttable.x), len(texttable.y))
   1273 
   1274         strings = texttable.string + [texttable.string[-1]] * (length - len(texttable.string))

TypeError: object of type 'NoneType' has no len()

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions