printout->OnEndPrinting();
}
-
- static gboolean
- gtk_preview_print_callback(GtkPrintOperation * WXUNUSED(operation),
- GtkPrintOperationPreview * WXUNUSED(preview),
- GtkPrintContext *context,
- GtkWindow *parent,
- gpointer user_data)
- {
- wxPrintout *printout = (wxPrintout *) user_data;
-
- printout->SetIsPreview(true);
-
- /* We create a Cairo context with 72dpi resolution. This resolution is
- * only used for positioning. */
- cairo_t *cairo = gdk_cairo_create(GTK_WIDGET(parent)->window);
- gtk_print_context_set_cairo_context(context, cairo, 72, 72);
-
- return false;
- }
}
//----------------------------------------------------------------------------
native->SetPrintJob( printOp );
- printout->SetIsPreview(false);
-
wxPrinterToGtkData dataToSend;
dataToSend.printer = this;
dataToSend.printout = printout;
g_signal_connect (printOp, "begin-print", G_CALLBACK (gtk_begin_print_callback), &dataToSend);
g_signal_connect (printOp, "draw-page", G_CALLBACK (gtk_draw_page_print_callback), &dataToSend);
g_signal_connect (printOp, "end-print", G_CALLBACK (gtk_end_print_callback), printout);
- g_signal_connect (printOp, "preview", G_CALLBACK (gtk_preview_print_callback), printout);
// This is used to setup the DC and
// show the dialog if desired
cairo_stroke ( m_cairo);
}
-void wxGtkPrinterDCImpl::DoDrawPolygon(int n, wxPoint points[],
- wxCoord xoffset, wxCoord yoffset,
+void wxGtkPrinterDCImpl::DoDrawPolygon(int n, wxPoint points[],
+ wxCoord xoffset, wxCoord yoffset,
wxPolygonFillMode fillStyle)
{
if (n==0) return;
}
void wxGtkPrinterDCImpl::DoDrawPolyPolygon(int n, int count[], wxPoint points[],
- wxCoord xoffset, wxCoord yoffset,
+ wxCoord xoffset, wxCoord yoffset,
wxPolygonFillMode fillStyle)
{
wxDCImpl::DoDrawPolyPolygon( n, count, points, xoffset, yoffset, fillStyle );
bool underlined = m_font.Ok() && m_font.GetUnderlined();
- const wxUTF8Buf data = text.utf8_str();
+ const wxScopedCharBuffer data = text.utf8_str();
size_t datalen = strlen(data);
pango_layout_set_text( m_layout, data, datalen);
cairo_scale(m_cairo, m_scaleX, m_scaleY);
// Set layout's text
- const wxUTF8Buf dataUTF8 = string.utf8_str();
+ const wxScopedCharBuffer dataUTF8 = string.utf8_str();
gint oldSize=0;
if ( theFont )