# Antialiasing lines, Gdk::Drawable

**URL:** <https://www.ruby-forum.com/t/antialiasing-lines-gdk-drawable/110796>\
**Category:** Ruby-Gnome 2\
**Created:** [July 31, 2007, 1:20am UTC](https://www.ruby-forum.com/t/antialiasing-lines-gdk-drawable/110796 "2007-07-31T01:20:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![conan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/13edae/32.png) [@conan](https://www.ruby-forum.com/u/conan)\
**Post date:** [July 31, 2007, 1:20am UTC](https://www.ruby-forum.com/t/antialiasing-lines-gdk-drawable/110796/1 "2007-07-31T01:20:29Z")

</div>

Anybody have any tips on if antialiasing lines is possible in with Gtk?  
I’ve got a boat load of lines I draw on a Gdk:Drawable that would look  
very pretty antialiased on a white background.

---

<div class="post-metadata">

**Author:** ![conan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/13edae/32.png) [@conan](https://www.ruby-forum.com/u/conan)\
**Post date:** [July 31, 2007, 1:23am UTC](https://www.ruby-forum.com/t/antialiasing-lines-gdk-drawable/110796/2 "2007-07-31T01:23:12Z")

</div>

On Tue, Jul 31, 2007 at 01:20:29AM +0200, Conan R. wrote:

> Anybody have any tips on if antialiasing lines is possible in with Gtk?  
> I’ve got a boat load of lines I draw on a Gdk:Drawable that would look  
> very pretty antialiased on a white background.

I would suggest you look at using Cairo ([http://www.cairographics.org/](http://www.cairographics.org/))  
via rcairo to do this. You can get a cairo context by doing  
drawable.create\_cairo\_context, and go from there.

-pete

* * *

This [SF.net](http://SF.net) email is sponsored by: Splunk Inc.  
Still grepping through log files to find problems? Stop.  
Now Search log events and configuration files using AJAX and a browser.  
Download your FREE copy of Splunk now \>\> [http://get.splunk.com/](http://get.splunk.com/)

---

<div class="post-metadata">

**Author:** ![conan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/13edae/32.png) [@conan](https://www.ruby-forum.com/u/conan)\
**Post date:** [July 31, 2007, 7:11pm UTC](https://www.ruby-forum.com/t/antialiasing-lines-gdk-drawable/110796/3 "2007-07-31T19:11:43Z")

</div>

That looks cool, but I don’t need antialiased lines enough to add  
another library.

Oh well.

Peter J. wrote:

> On Tue, Jul 31, 2007 at 01:20:29AM +0200, Conan R. wrote:
> 
> > Anybody have any tips on if antialiasing lines is possible in with Gtk?  
> > I’ve got a boat load of lines I draw on a Gdk:Drawable that would look  
> > very pretty antialiased on a white background.
> 
> I would suggest you look at using Cairo ([http://www.cairographics.org/](http://www.cairographics.org/))  
> via rcairo to do this. You can get a cairo context by doing  
> drawable.create\_cairo\_context, and go from there.
> 
> -pete
> 
> * * *
> 
> This [SF.net](http://SF.net) email is sponsored by: Splunk Inc.  
> Still grepping through log files to find problems? Stop.  
> Now Search log events and configuration files using AJAX and a browser.  
> Download your FREE copy of Splunk now \>\> [http://get.splunk.com/](http://get.splunk.com/)

---

<div class="post-metadata">

**Author:** ![conan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/13edae/32.png) [@conan](https://www.ruby-forum.com/u/conan)\
**Post date:** [July 31, 2007, 7:23pm UTC](https://www.ruby-forum.com/t/antialiasing-lines-gdk-drawable/110796/4 "2007-07-31T19:23:20Z")

</div>

Gdk itself doesn’t support antialiasing. Cairo it the only option.

Am Dienstag, den 31.07.2007, 19:11 +0200 schrieb Conan R.:

> > Now Search log events and configuration files using AJAX and a browser.  
> > Download your FREE copy of Splunk now \>\> [http://get.splunk.com/](http://get.splunk.com/)

* * *

This [SF.net](http://SF.net) email is sponsored by: Splunk Inc.  
Still grepping through log files to find problems? Stop.  
Now Search log events and configuration files using AJAX and a browser.  
Download your FREE copy of Splunk now \>\> [http://get.splunk.com/](http://get.splunk.com/)
