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

text on zero width rect leads to nans #51

Closed
byorgey opened this issue Oct 13, 2012 · 1 comment
Closed

text on zero width rect leads to nans #51

byorgey opened this issue Oct 13, 2012 · 1 comment
Labels

Comments

@byorgey
Copy link
Member

byorgey commented Oct 13, 2012

(Reported by tad.doxsee at gmail; imported from http://code.google.com/p/diagrams/issues/detail?id=90)

text "junk" # fontSize 10 <> rect 0 20 

results in nans in the svg file and the entire svg is blank in a browser. If the rect has nonzero width

text "junk" # fontSize 10 <> rect 50 20

then everything is OK.

What version of the product are you using? 0.5
On what operating system? Ubuntu 12.04
Using the Cairo backend.

@byorgey
Copy link
Member Author

byorgey commented Oct 13, 2012

Hmm, what would you expect rect 0 20 to mean? Are you trying to create a horizontal "strut" (i.e. a diagram that produces no output but takes up some space)? If so, you should use strutX.

However, I do agree the behavior of rect with arguments of 0 ought to be improved; see #43.

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