package hugin
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=96d35ce03dfbebd2313657273e24c2e2d20f9e6c7825b8518b69bd1d6ed5870f
sha512=90c5053731d4108f37c19430e45456063e872b04b8a1bbad064c356e1b18e69222de8bfcf4ec14757e71f18164ec6e4630ba770dbcb1291665de5418827d1465
doc/hugin.ucairo/Ucairo/index.html
Module UcairoSource
Minimal 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.
Handle types
The type for Cairo drawing contexts.
The type for Cairo surfaces.
Enumerations
Text extents
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.
Context creation
State
Transformations
translate t tx ty translates the user-space origin by (tx, ty).
Source
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).
Stroke and fill parameters
set_dash t dashes sets the dash pattern. An empty array disables dashing.
Font
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.
Path operations
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.
Path module
Drawing operations
clip t establishes a new clip region by intersecting the current clip with the current path, then clears the path.