# Drawing in ruby (antigrain bindings)

**URL:** <https://www.ruby-forum.com/t/drawing-in-ruby-antigrain-bindings/119213>\
**Category:** Ruby\
**Created:** [November 5, 2007, 12:48am UTC](https://www.ruby-forum.com/t/drawing-in-ruby-antigrain-bindings/119213 "2007-11-05T00:48:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![emmanueloga](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ecae2f/32.png) [@emmanueloga](https://www.ruby-forum.com/u/emmanueloga)\
**Post date:** [November 5, 2007, 12:48am UTC](https://www.ruby-forum.com/t/drawing-in-ruby-antigrain-bindings/119213/1 "2007-11-05T00:48:34Z")

</div>

Hi! I’m needing a good drawing solution for ruby. All the present  
options are ugly IMHO, because require a very big framework to work  
(cairo needs GTK bindings for ruby for working out of the box in  
windows, don’t know how it is on linux). ImageMagick seems to be hated  
by rubyists everywhere, due to some memory leaks or something…

I found a very criptic reference to a ruby bindings for antigrain in  
this 2005 “nostalgia” post 🙂 :

[http://groups.google.com/group/comp.lang.ruby/browse\_thread/thread/35c2f61d29e94550/28b32a50948920ba](http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/35c2f61d29e94550/28b32a50948920ba)

Does anybody know if there any news about antigrain bindings for ruby?

Thanks!Âª

---

<div class="post-metadata">

**Author:** ![emmanueloga](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ecae2f/32.png) [@emmanueloga](https://www.ruby-forum.com/u/emmanueloga)\
**Post date:** [November 5, 2007, 5:41am UTC](https://www.ruby-forum.com/t/drawing-in-ruby-antigrain-bindings/119213/2 "2007-11-05T05:41:35Z")

</div>

On Mon, Nov 05, 2007 at 08:48:48AM +0900, Emmanuel O. wrote:

> I found a very criptic reference to a ruby bindings for antigrain in  
> this 2005 “nostalgia” post 🙂 :

Well, I don’t think the Ruby/AGG and Ruby/View stuff ever came to  
fruition. Yes, I know, I feel the same way.

Since it sounds like you’re on Windows, I don’t know, you might like  
to try Shoes, which is a Cairo/Pango/Ruby kit that is kind of like a  
very barebones Flash/HTML hybrid. You can draw primitive shapes and  
paths, borrowing its drawing API from NodeBox and Processing.

The wiki is [http://code.whytheluckystiff.net/shoes/](http://code.whytheluckystiff.net/shoes/)  
For now, the reference is [http://code.whytheluckystiff.net/entirety/](http://code.whytheluckystiff.net/entirety/)

There’s also a wonderful thing called Scribble (by Nathan Weizenbaum,)  
but I’m not sure how to get it going on Windows. I’ll bet somebody  
on this list has done it before, though.

\_why

---

<div class="post-metadata">

**Author:** ![emmanueloga](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ecae2f/32.png) [@emmanueloga](https://www.ruby-forum.com/u/emmanueloga)\
**Post date:** [November 5, 2007, 10:45am UTC](https://www.ruby-forum.com/t/drawing-in-ruby-antigrain-bindings/119213/3 "2007-11-05T10:45:37Z")

</div>

removed\_email\_address@domain.invalid wrote:

> Does anybody know if there any news about antigrain bindings for ruby?
> 
> Thanks!Âª

This might sound as crazy suggestion, but you might as well generate SVG  
from Ruby quite easily. Depending on what you are planning to do, this  
approach might or might not have some interesting benefits - like the  
option of having some interactivity in a web browser. I’m not sure if  
there are “off-the-shelf” libraries to do this right now, but SVG should  
not be that difficult. You can easily convert SVG to anything else  
later.

HTH,

Jakub

---

<div class="post-metadata">

**Author:** ![emmanueloga](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ecae2f/32.png) [@emmanueloga](https://www.ruby-forum.com/u/emmanueloga)\
**Post date:** [November 5, 2007, 11:47am UTC](https://www.ruby-forum.com/t/drawing-in-ruby-antigrain-bindings/119213/4 "2007-11-05T11:47:41Z")

</div>

-------- Original-Nachricht --------

> Datum: Mon, 5 Nov 2007 08:48:48 +0900  
> Von: Emmanuel O. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> An: removed\_email\_address@domain.invalid  
> Betreff: Drawing in ruby (antigrain bindings)

> Does anybody know if there any news about antigrain bindings for ruby?
> 
> ## Thanks!ª
> 
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

Dear Emanuel,

as antigrain seems to be written in C++, you may be able to use it  
in conjunction with Ruby via SWIG:

[http://www.swig.org/](http://www.swig.org/)

There are some examples on how to do that here:  
[http://www.goto.info.waseda.ac.jp/~fukusima/ruby/swig-examples/](http://www.goto.info.waseda.ac.jp/~fukusima/ruby/swig-examples/)

Best regards,

Axel

---

<div class="post-metadata">

**Author:** ![emmanueloga](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ecae2f/32.png) [@emmanueloga](https://www.ruby-forum.com/u/emmanueloga)\
**Post date:** [November 5, 2007, 12:42pm UTC](https://www.ruby-forum.com/t/drawing-in-ruby-antigrain-bindings/119213/5 "2007-11-05T12:42:42Z")

</div>

Give RMagick a try, it’s not so leaky as you’ve heard.  
It can do vector and raster art. Quite good stuff!  
Tim H. maintains it well.
