package hugin

  1. Overview
  2. Docs

Module Ucairo.ImageSource

Sourceval create : w:int -> h:int -> surface

create ~w ~h is a new ARGB32 image surface of dimensions w x h.

Raises Failure if allocation fails.

Sourceval create_for_data8 : (int, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t -> w:int -> h:int -> stride:int -> surface

create_for_data8 data ~w ~h ~stride wraps existing pixel data as an ARGB32 image surface. data must remain live for the lifetime of the surface.

Sourceval stride_for_width : int -> int

stride_for_width w is the minimum stride in bytes for an ARGB32 image of width w, respecting Cairo alignment requirements.