package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Print_context/index.html
Module Wrappers.Print_context
type t = [ `print_context | `object_ ] Gobject.objval set_cairo_context :
t ->
Ocgtk_cairo.Cairo.Wrappers.Context.t ->
float ->
float ->
unitSets 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.
val get_width : t -> floatObtains the width of the `GtkPrintContext`, in pixels.
val get_pango_fontmap : t -> Ocgtk_pango.Pango.Wrappers.Font_map.tReturns a `PangoFontMap` that is suitable for use with the `GtkPrintContext`.
val get_page_setup : t -> [ `page_setup | `object_ ] Gobject.objObtains the `GtkPageSetup` that determines the page dimensions of the `GtkPrintContext`.
val get_height : t -> floatObtains the height of the `GtkPrintContext`, in pixels.
val get_hard_margins : t -> bool * float * float * float * floatObtains the hardware printer margins of the `GtkPrintContext`, in units.
val get_dpi_y : t -> floatObtains the vertical resolution of the `GtkPrintContext`, in dots per inch.
val get_dpi_x : t -> floatObtains the horizontal resolution of the `GtkPrintContext`, in dots per inch.
val get_cairo_context : t -> Ocgtk_cairo.Cairo.Wrappers.Context.tObtains the cairo context that is associated with the `GtkPrintContext`.
val create_pango_layout : t -> Ocgtk_pango.Pango.Wrappers.Layout.tCreates a new `PangoLayout` that is suitable for use with the `GtkPrintContext`.
val create_pango_context : t -> Ocgtk_pango.Pango.Wrappers.Context.tCreates a new `PangoContext` that can be used with the `GtkPrintContext`.