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

Ilmari Heikkinen kig at misfiring.net
Sat Oct 15 20:25:30 PDT 2005


Hi, 

First, thanks for the excellent work on rcairo!

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. 

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.


Cheers,
 Ilmari Heikkinen


-------------- next part --------------
A non-text attachment was scrubbed...
Name: rcairo_fo_nono.patch
Type: text/x-patch
Size: 2312 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20051016/febc9b17/rcairo_fo_nono.bin


More information about the cairo mailing list