FXRuby: Canvas and plotting

P

parisnight

I've been trying to use the Canvas widget to plot J1939 data
that is streaming in asynchronously. It seems that the only way to get
a valid drawing context
is after you receive a FX SELECT event. I can use an
FXaddTimeout to trigger an event. The clumsy part about
this approach however is that I have to be responsible for
queuing up all of the data to be plotted in arrays and then
the select method takes the arrays and issues the canvas
plotting methods. This is an inefficient intermediate step
when all I want to do is draw on the canvas.

Is there some way to asynchronously issue Canvas drawing
commands and have FX queue them up outside of a select event?
In other words, is there a way to
get a drawing context that I can simply draw on at any
time without the need for a select? Both tk and xlib
allow me to do this and they take care of queuing the drawing events.
Regards,
Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top