Ruby Forum wxRuby > Drawing state diagram with wxruby

Posted by Lc Yeap (lcyeap)
on 30.06.2008 13:27
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.
Posted by Alex Fenton (Guest)
on 30.06.2008 13:34
(Received via mailing list)
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
Posted by Lc Yeap (lcyeap)
on 01.07.2008 02:25
Alex Fenton 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. :)
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..