[cairo] Win32Surface on a Printer DC

Zoltan Nagy nzoltan at freemail.hu
Sun Jan 21 03:50:28 PST 2007

Hi all,

I have a small problem with Win32Surface: if the DC is a printer DC the
stroke draw a black box instead of the path.

(python snippet)

self.surface = cairo.Win32Surface(self._printer_hdc)
self.context = cairo.Context(self.cairo_surface)

# the next two line is just a test (optional)

self.context.set_source_rgb(1, 1, 1)  # white source

# path and stroke

self.context.move_to(0, 0)
self.context.line_to(500, 500)

This will draw a black box (500x500) instead of the line. But
show_text() for example works fine.


More information about the cairo mailing list