package lablgtk3

  1. Overview
  2. Docs
OCaml interface to GTK+3

Install

Dune Dependency

Authors

Maintainers

Sources

lablgtk3-3.1.5.tbz
sha256=d4821cdbecf3ae374f20317d63e43fe58030c3ba9657b51a2e83e652197e8eac
sha512=83f0be38a1e21737de93f88b0adac15cdcc50cf712d773720b9bc1e8d8ffdb2c660d35840f25d326a42a9d4e6537e6cef466099bf72494196b2cc79977e703e3

doc/lablgtk3/Cairo_pango/index.html

Module Cairo_pangoSource

Interaction with Pango, a library for laying out and rendering of text.

Sourcemodule Font_map : sig ... end

Interacting with Pango.font_map.

Sourcetype cairo_font = [ `pangofont | `cairo ] Gobject.obj
Sourceval get_scaled_font : cairo_font -> _ Cairo.Scaled_font.t
Sourceval set_resolution : Pango.context -> float -> unit

Sets the resolution for the context. This is a scale factor between points specified in a Pango.font_description and Cairo units. The default value is 96, meaning that a 10 point font will be 13 units high. (10 * 96. / 72. = 13.3).

Sourceval get_resolution : Pango.context -> float

Gets the resolution for the context.

Sourceval set_font_options : Pango.context -> Cairo.Font_options.t -> unit

set_font_options cr options sets the font options used when rendering text with cr. These options override any options that update_context derives from the target surface.

Sourceval get_font_options : Pango.context -> Cairo.Font_options.t

Retrieves any font rendering options previously set with set_font_options. This function does not report options that are derived from the target surface by update_context.

Sourceval create_context : Cairo.context -> Pango.context

Creates a context object set up to match the current transformation and target surface of the Cairo context. This context can then be used to create a layout using Pango.Layout.create.

Sourceval update_context : Cairo.context -> Pango.context -> unit

Updates a Pango.context previously created for use with Cairo to match the current transformation and target surface of a Cairo context. If any layouts have been created for the context, it's necessary to call context_changed on those layouts.

Sourceval create_layout : Cairo.context -> Pango.layout

create_layout cr creates a layout object set up to match the current transformation and target surface of the Cairo context cr. This layout can then be used for text measurement with functions like Pango.Layout.get_size or drawing with functions like show_layout. If you change the transformation or target surface for cr, you need to call update_layout.

Sourceval update_layout : Cairo.context -> Pango.layout -> unit

update_layout cr layout updates the private Pango.context of layout created with create_layout to match the current transformation and target surface of a Cairo context cr.

Sourceval show_layout : Cairo.context -> Pango.layout -> unit

show_layout cr layout draws a layout in the specified cairo context cr. The top-left corner of layout will be drawn at the current point of the cairo context.

Sourceval show_error_underline : Cairo.context -> float -> float -> w:float -> h:float -> unit

show_error_underline cr x y w h draw a squiggly line in the cairo context cr that approximately covers the given rectangle in the style of an underline used to indicate a spelling error. (The width w of the underline is rounded to an integer number of up/down segments and the resulting rectangle is centered in the original rectangle).

Sourceval layout_path : Cairo.context -> Pango.layout -> unit

layout_path cr layout adds the text in a layout to the current path in cr. The top-left corner of the layout will be at the current point of the cairo context.

Sourceval error_underline_path : Cairo.context -> float -> float -> w:float -> h:float -> unit

error_underline_path cr x y w h add a squiggly line to the current path in the cairo context cr that approximately covers the given rectangle in the style of an underline used to indicate a spelling error. (The width w of the underline is rounded to an integer number of up/down segments and the resulting rectangle is centered in the original rectangle).

OCaml

Innovation. Community. Security.