Forum: Ruby Real time vector graphics

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7b4707f974af261f71943e1f2046c9ee?d=identicon&s=25 SonOfLilit (Guest)
on 2007-01-23 22:42
(Received via mailing list)
Hello all,

I'm planning to prototype a vector graphics Zooming User Interface using
ruby (because it feels good and it's just a prototype - in the case that
I
elect to build the system I will probably force myself to learn a lisp
and
OpenGL or OpenVG).

Has anyone tried to use the ruby bindings of Cairo? Is there an
alternative?

Any tips?

By the way, does anyone know of an online resource discussing low-level
implementation of graphical user interfaces?

I run OSX on a Mac Mini.

Thanks,

Aur Saraf
6a480fcc49315c993fc2c4f37c882133?d=identicon&s=25 Daniel Amelang (Guest)
on 2007-01-27 22:07
(Received via mailing list)
On 1/23/07, SonOfLilit <sonoflilit@gmail.com> wrote:
> ...
> I'm planning to prototype a vector graphics Zooming User Interface using
> ruby (because it feels good and it's just a prototype - in the case that I
> elect to build the system I will probably force myself to learn a lisp and
> OpenGL or OpenVG).

Some Lisp dialect + OpenVG would be an...interesting choice for the
actual implementation. Does your choice of a Lisp dialect have
anything to due with the fact that some early ZUIs were written in a
Lisp dialect?

Also, a fast OpenVG implementation isn't (yet) readily available for
most common hardware/OS combinations out there, so you may run into
portability/speed problems with OpenVG.

>
> Has anyone tried to use the ruby bindings of Cairo? Is there an alternative?

Yes, they work great once you get them installed. Go here to find the
(very helpful) community behind them:

http://ruby-gnome2.sourceforge.jp/

Cairo would be a good choice if you need 1) high portability 2)
hardware acceleration when available 3) open-source with few licensing
restrictions (LGPL).

Cairo has an OpenGL backend, and there's been talk about writing an
OpenVG backend too. So using Cairo would mean that your code wouldn't
have to change very much as you try out different rendering targets.

> By the way, does anyone know of an online resource discussing low-level
> implementation of graphical user interfaces?

You may be interesting in the paper "Implementing a Zooming User
Interface: Experience Building Pad++" by Benderson et. al

Dan
7b4707f974af261f71943e1f2046c9ee?d=identicon&s=25 SonOfLilit (Guest)
on 2007-01-28 08:24
(Received via mailing list)
Thank you, and I've read that.

I've read that Cairo is slow. Is that true or random whining?

LISP is for the combination of language dynamicism and speed.
7b4707f974af261f71943e1f2046c9ee?d=identicon&s=25 SonOfLilit (Guest)
on 2007-01-28 14:51
(Received via mailing list)
How do I get started with Ruby/GTK to develop Cairo vector graphics on
OSX?

Or is there a simpler way than Ruby/GTK?

Perhaps SDL?

Aur Saraf
6a480fcc49315c993fc2c4f37c882133?d=identicon&s=25 Daniel Amelang (Guest)
on 2007-01-28 18:49
(Received via mailing list)
On 1/27/07, SonOfLilit <sonoflilit@gmail.com> wrote:
> Thank you, and I've read that.
>
> I've read that Cairo is slow. Is that true or random whining?

Depends on what you're doing with it, which backend you're using and
what you're comparing it to when you say "slow". You should probably
do some quick prototyping to get an idea of how it performs for your
projected use. That said, it's fast enough for GTK, OpenOffice, and
Firefox (among others) to use. And if you find a particularly slow
case, send it to the mailing list. Performance bugs get squashed
pretty fast.

Oh, and use the latest stable snapshot (1.3.12) as it much faster than
the 1.2.x series.

Dan
6a480fcc49315c993fc2c4f37c882133?d=identicon&s=25 Daniel Amelang (Guest)
on 2007-01-28 19:17
(Received via mailing list)
On 1/28/07, SonOfLilit <sonoflilit@gmail.com> wrote:
> How do I get started with Ruby/GTK to develop Cairo vector graphics on OSX?
>
> Or is there a simpler way than Ruby/GTK?
>
> Perhaps SDL?

On OSX, you can use Cairo with pretty much anything (SDL, OpenGL, GTK,
regular Carbon/Cocoa applications). You just have to figure out how to
get the different ruby bindings to work together, which can be fun.
GTK is the easiest, IMO.

As to how to get started, if I remember right, there are some examples
in the repository, but you really should ask over at the ruby-gnome2
mailing list. Kouhei Sutou is the guy to look for:

https://lists.sourceforge.net/lists/listinfo/ruby-...

Dan
This topic is locked and can not be replied to.