# Gnome::CanvasItem.affine\_absolute

**URL:** <https://www.ruby-forum.com/t/gnome-canvasitem-affine-absolute/110722>\
**Category:** Ruby\
**Created:** [July 30, 2007, 9:22am UTC](https://www.ruby-forum.com/t/gnome-canvasitem-affine-absolute/110722 "2007-07-30T09:22:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![FireAphis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f04885/32.png) [@FireAphis](https://www.ruby-forum.com/u/FireAphis)\
**Post date:** [July 30, 2007, 9:22am UTC](https://www.ruby-forum.com/t/gnome-canvasitem-affine-absolute/110722/1 "2007-07-30T09:22:45Z")

</div>

Hello

I’m trying to assign an affine transformation to CanvasItem in my Ruby/  
Gnome2 application. Apparently there is a method called  
‘affine\_absolute’ that I should use. The problem is that my ruby  
doesn’t recognize it. When I type ‘Gnome::CanvasItem.methods’ it isn’t  
in the list either. On the other hand when I google it I see this  
method used by others. I checked the source code of the library  
([http://sourceforge.krugle.com/files/cvs/cvs.sourceforge.net/ruby-](http://sourceforge.krugle.com/files/cvs/cvs.sourceforge.net/ruby-)  
gnome2/ruby-gnome2/gnomecanvas/src/rbgnome-canvas-item.c) and the  
method _is_ defined there. I’m using the latest (0.16) release of the  
library. Does anybody know what’s wrong? Am I missing something?

Thanks

FireAphis

---

<div class="post-metadata">

**Author:** ![FireAphis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f04885/32.png) [@FireAphis](https://www.ruby-forum.com/u/FireAphis)\
**Post date:** [July 30, 2007, 3:51pm UTC](https://www.ruby-forum.com/t/gnome-canvasitem-affine-absolute/110722/2 "2007-07-30T15:51:49Z")

</div>

On Jul 30, 10:16 am, FireAphis [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> method _is_ defined there. I’m using the latest (0.16) release of the  
> library. Does anybody know what’s wrong? Am I missing something?
> 
> Thanks
> 
> FireAphis

As I suspected it was totally my mistake. I tried to see the method in  
irb and used ‘Gnome::CanvasItem.methods’ for that. But  
‘affine\_absolute’ can be called only on instance so I should have used  
‘Gnome::CanvasItem.instance\_methods’. For the same reason I had to  
create an instance first and not to call  
‘Gnome::CanvasItem.affine\_absolute’.

Silly me 🙂

FireAphis
