1
context = cairocffi.Context(surface)
# pangocairo.pango_cairo_set_antialias(cairo.ANTIALIAS_SUBPIXEL)
context.translate(movex, movey)
context.rotate(twist)
layout = gobject_ref(pangocairo.pango_cairo_create_layout(context._pointer))

In the last line of this code cairocffi give a weird error

TypeError: initializer for ctype 'cairo_t *' appears indeed to be 'cairo_t *', but the types are different (check that you are not e.g. mixing up different ffi instances)

What could be the problem here?

J.J. Hakala
  • 6,136
  • 6
  • 27
  • 61
iLoveCamelCase
  • 450
  • 10
  • 21
  • There is some mix of different instances of cffi.FFI(). Normally, only one should be created per library, but in this case I guess that cairocffi creates more, maybe by mistake. – Armin Rigo Mar 09 '16 at 08:16

0 Answers0