Page
Library
Module
Module type
Parameter
Class
Class type
Source
UcairoSourceMinimal Cairo bindings.
Thin bindings covering image and PDF surface creation, path drawing, text rendering, and PNG output. Designed for the Hugin rendering backend; not a general-purpose Cairo binding.
All functions raise Failure on Cairo errors and Invalid_argument on destroyed handles.
The type for Cairo drawing contexts.
The type for Cairo surfaces.
type text_extents = {x_bearing : float;y_bearing : float;width : float;height : float;x_advance : float;y_advance : float;}The type for text extent measurements.
translate t tx ty translates the user-space origin by (tx, ty).
set_source_rgba t r g b a sets the source to the given RGBA color.
set_source_surface t s ~x ~y sets s as the source, offset by (x, y).
set_dash t dashes sets the dash pattern. An empty array disables dashing.
select_font_face t family weight selects a toy font face. Slant is always upright.
set_font_size t size sets the font size in user-space units.
text_extents t s is the extents of s with the current font.
arc t xc yc ~r ~a1 ~a2 adds a circular arc centered at (xc, yc) with radius r from angle a1 to a2 (in radians).
rectangle t x y ~w ~h adds a closed rectangle sub-path.
clip t establishes a new clip region by intersecting the current clip with the current path, then clears the path.