[cairo][rcairo] Patch for get_font_options, typo in constants

Kouhei Sutou kou at cozmixng.org
Sat Oct 15 21:00:10 PDT 2005


Hi,

In <1129433130.5192.19.camel at bauhaus>
  "[cairo][rcairo] Patch for get_font_options, typo in constants" on Sun, 16 Oct 2005 06:25:30 +0300,
  Ilmari Heikkinen <kig at misfiring.net> wrote:

> Here's a patch for Cairo::Context / Surface.new.font_options segfaulting
> in rcairo. Also fixed ANTIALIAS_NONO to ANTIALIAS_NONE.
> 
> Reason for the segfault was that cairo_get_font_options copies the
> struct from the cairo object instead of returning a pointer to it. 

I applied your patch. Thanks!

> So the way to change font options in rcairo is:
> 
>   fo = context.font_options
>   fo.change_things
>   context.font_options = fo
>   
> It doesn't really fit in with the Ruby Way of everything's a reference
> (context.font_options.change_things)... font_options reader name could
> be changed to something that says that it returns a copy, maybe.

I see. I'll think about this.


Thanks,
--
kou


More information about the cairo mailing list