Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gettextextent broken? #15

Closed
doutriaux1 opened this issue Sep 30, 2016 · 1 comment
Closed

gettextextent broken? #15

doutriaux1 opened this issue Sep 30, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@doutriaux1
Copy link
Contributor

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()
@doutriaux1
Copy link
Contributor Author

works if you set t.x and t.y my bad.

@doutriaux1 doutriaux1 modified the milestone: 2.10 May 5, 2017
@doutriaux1 doutriaux1 added the bug label May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants