ztellman / automat

better automata through combinators
588 stars 50 forks source link

svg viewing problem #7

Closed naipmoro closed 8 years ago

naipmoro commented 10 years ago

When the result of automat's fsm->dot is run through rhizome's dot->svg, the resulting svg fragment doesn't display the entire automata. Specifically, the svg's width and height are larger than the viewBox dimensions:

(-> (automat/fsm->dot [1] {}) rhizome/dot->svg)
;=>  ... <svg width="242pt" height="72pt"  viewBox="0.00 0.00 174.00 52.00" ...

I need to call {:dpi 72} to get a correct rendering. I'm on ubuntu 12.04.

(-> (automat/fsm->dot [1] {:dpi 72}) rhizome/dot->svg)
;=>  ... <svg width="174pt" height="52pt"  viewBox="0.00 0.00 174.00 52.00" ...

I'm using the svg fragments to render the automata in gorilla-repl.

ztellman commented 9 years ago

I'm sorry that I somehow overlooked this for so long. I'm just using the svg rendering functionality in dot, so I don't have a lot of control over it. Out of curiosity (assuming you're still around), what version of graphviz are you using?

naipmoro commented 9 years ago

Hi! Thanks for replying. I'm using graphviz version 2.26.3, which is the most recent one provided by ubuntu 12.04's package manager.