![]() |
![]() |
![]() |
GTK+ 3 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <gtk/gtk.h> GtkPrintContext; cairo_t * gtk_print_context_get_cairo_context (GtkPrintContext *context
); void gtk_print_context_set_cairo_context (GtkPrintContext *context
,cairo_t *cr
,double dpi_x
,double dpi_y
); GtkPageSetup * gtk_print_context_get_page_setup (GtkPrintContext *context
); gdouble gtk_print_context_get_width (GtkPrintContext *context
); gdouble gtk_print_context_get_height (GtkPrintContext *context
); gdouble gtk_print_context_get_dpi_x (GtkPrintContext *context
); gdouble gtk_print_context_get_dpi_y (GtkPrintContext *context
); PangoFontMap * gtk_print_context_get_pango_fontmap (GtkPrintContext *context
); PangoContext * gtk_print_context_create_pango_context (GtkPrintContext *context
); PangoLayout * gtk_print_context_create_pango_layout (GtkPrintContext *context
); gboolean gtk_print_context_get_hard_margins (GtkPrintContext *context
,gdouble *top
,gdouble *bottom
,gdouble *left
,gdouble *right
);
cairo_t * gtk_print_context_get_cairo_context (GtkPrintContext *context
);
Obtains the cairo context that is associated with the GtkPrintContext.
|
a GtkPrintContext |
Returns : |
the cairo context of context . [transfer none]
|
Since 2.10
void gtk_print_context_set_cairo_context (GtkPrintContext *context
,cairo_t *cr
,double dpi_x
,double dpi_y
);
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.
|
a GtkPrintContext |
|
the cairo context |
|
the horizontal resolution to use with cr
|
|
the vertical resolution to use with cr
|
Since 2.10
GtkPageSetup * gtk_print_context_get_page_setup (GtkPrintContext *context
);
Obtains the GtkPageSetup that determines the page dimensions of the GtkPrintContext.
|
a GtkPrintContext |
Returns : |
the page setup of context . [transfer none]
|
Since 2.10
gdouble gtk_print_context_get_width (GtkPrintContext *context
);
Obtains the width of the GtkPrintContext, in pixels.
|
a GtkPrintContext |
Returns : |
the width of context
|
Since 2.10
gdouble gtk_print_context_get_height (GtkPrintContext *context
);
Obtains the height of the GtkPrintContext, in pixels.
|
a GtkPrintContext |
Returns : |
the height of context
|
Since 2.10
gdouble gtk_print_context_get_dpi_x (GtkPrintContext *context
);
Obtains the horizontal resolution of the GtkPrintContext, in dots per inch.
|
a GtkPrintContext |
Returns : |
the horizontal resolution of context
|
Since 2.10
gdouble gtk_print_context_get_dpi_y (GtkPrintContext *context
);
Obtains the vertical resolution of the GtkPrintContext, in dots per inch.
|
a GtkPrintContext |
Returns : |
the vertical resolution of context
|
Since 2.10
PangoFontMap * gtk_print_context_get_pango_fontmap (GtkPrintContext *context
);
Returns a PangoFontMap that is suitable for use with the GtkPrintContext.
|
a GtkPrintContext |
Returns : |
the font map of context . [transfer none]
|
Since 2.10
PangoContext * gtk_print_context_create_pango_context
(GtkPrintContext *context
);
Creates a new PangoContext that can be used with the GtkPrintContext.
|
a GtkPrintContext |
Returns : |
a new Pango context for context . [transfer full]
|
Since 2.10
PangoLayout * gtk_print_context_create_pango_layout
(GtkPrintContext *context
);
Creates a new PangoLayout that is suitable for use with the GtkPrintContext.
|
a GtkPrintContext |
Returns : |
a new Pango layout for context . [transfer full]
|
Since 2.10
gboolean gtk_print_context_get_hard_margins (GtkPrintContext *context
,gdouble *top
,gdouble *bottom
,gdouble *left
,gdouble *right
);
Obtains the hardware printer margins of the GtkPrintContext, in units.
|
a GtkPrintContext |
|
top hardware printer margin. [out] |
|
bottom hardware printer margin. [out] |
|
left hardware printer margin. [out] |
|
right hardware printer margin. [out] |
Returns : |
TRUE if the hard margins were retrieved
|
Since 2.20