[cairo] [rcairo] a problem in placing surface with "set_source"

Kouhei Sutou kou at cozmixng.org
Sat Dec 29 03:43:06 PST 2007


Hi,

In <afcdaf020712290316h689c846bt949824b8383d0d95 at mail.gmail.com>
  "[cairo] [rcairo] a problem in placing surface with "set_source"" on Sat, 29 Dec 2007 20:16:23 +0900,
  Binzo <binzo.ml at gmail.com> wrote:

> I found a problem in placing surface with "set_source(sfc, x, y)".
> If you give float numbers as x, y, they seems to be forced to integer numbers.
> As a result, the surface placed will be misaligned at most one pixel from the
> expected position.
> 
> I think the cause of this problem is the following code in the routine
>  "cr_set_source_surface" in "rb_cairo_context.c".
> 
>   cairo_set_source_surface (_SELF,
>                             RVAL2CRSURFACE (surface),
>                             NUM2INT (width),
>                             NUM2INT (height));
> 
> NUM2INT should be NUM2DBL, isn't it?

You're right. I've fixed that.

Thanks for reporting.

--
kou


More information about the cairo mailing list