Drawing state diagram with wxruby

Greetings,

I am just started to use wxruby to create GUI for my project. i need to
draw a state diagram based on some summary file. May i know is there any
way in wxruby that allow people to draw circle and add text on it?

Thanks a lot.

Lc Yeap wrote:

I am just started to use wxruby to create GUI for my project. i need to
draw a state diagram based on some summary file. May i know is there any
way in wxruby that allow people to draw circle and add text on it?

Yes, there is. Have a look at the documentation for “device contexts”

http://wxruby.rubyforge.org/doc/#device_contexts

And also the samples in the samples/drawing

hth
alex

Alex F. wrote:

Lc Yeap wrote:

I am just started to use wxruby to create GUI for my project. i need to
draw a state diagram based on some summary file. May i know is there any
way in wxruby that allow people to draw circle and add text on it?

Yes, there is. Have a look at the documentation for “device contexts”

http://wxruby.rubyforge.org/doc/#device_contexts

And also the samples in the samples/drawing

hth
alex

Hi Alex,

thanks for the useful information provided. :slight_smile:
I am expecting the code will generate the drawing automatically based on
the information in a text file.
Will continue to work on it. Hope it won’t be hard…