Gtk.PrintContext.prototype.set_cairo_context

function set_cairo_context(cr:cairo.Context, dpi_x:Number, dpi_y:Number):void {
    // Gjs wrapper for gtk_print_context_set_cairo_context()
}

Sets a new cairo context on a print context.

This function is intended to be used when implementing an internal print preview, it is not needed for printing, since GTK+ itself creates a suitable cairo context in that case.

Since 2.10

cr

the cairo context

dpi_x

the horizontal resolution to use with cr

dpi_y

the vertical resolution to use with cr