Dot is a good image generation tool, especially suitable for generating simple images with various automatic la S.
Because the dot source file is a text file, it is relatively simple in version management, and it is very convenient to generate a large number of similar images.
However, by default, images generated by dot do not support Chinese characters.
To display the dot image in a simple way, you can convert the source file to the UTF-8 format and specify the font in the dot file as a Chinese font. Generally, simsun. tcc is used as a Chinese font.
As follows:
/** <Br/> * @ file config. dotf <br/> * @ brief configuration task flowchart <br/> * @ author zkk <br/> * @ date 2009-05-08 <br/> * $ Id: config. dotf, v 1.1 2009/05/10 04:58:53 Kaikuo Exp $ <br/> */<br/> digraph g_main {<br/> ranksep = 0.2 <br/> node [shape = box, style = filled, fillcolor = lightblue, fontname = "simsun. ttc ", fontsize = 14]; <br/> edge [fontname =" simsun. ttc ", fontsize = 12]; <br/> check_input [shape = diamond, label =" whether Is there new/n configuration data? "]; <Br/> check_valid [shape = diamond, label =" is the configuration data/n legal? "]; <Br/> config_prcs [label =" "]; <br/> config_burn [label =" "]; <br/> end [label = "loop end"]; </p> <p> check_input-> check_valid [label = "Y"]; <br/> check_input-> end [weight = 3, label = "N"]; <br/> check_valid-> end [weight = 3, label = "N"]; <br/> check_valid-> config_prcs-> config_burn-> end; <br/> {rank = same; check_input; check_valid; config_prcs} <br/>}< br/>
The effect is as follows: