Image.CanvasCanvas of images, i.e. formal sums of images of various dimensions with various offsets.
module I : CanvasImageval create : int -> int -> tCreate an empty canvas.
Create a canvas containing a given image. Negative dimensions are ignored, default ones are those of the image.
val width : t -> intWidth of the image.
val height : t -> intHeight of the image.
Change the width and height of the viewport of the canvas.
val size : t -> intSize of a canvas in bytes.
val planes : t -> intNumber of planes in the image.
val covering : t -> boolWhether the canvas covers the whole area with images (this function is imprecise: it might have false negatives).
Render the canvas as an image. If fresh is set to true, the resulting can be modified in place. If transparent is set to true, the non-covered portions are made transparent.
Map a function on the underlying image. This of course triggers a render of the canvas.
val bounding_box : t -> (int * int) * (int * int)Bouding box (smallest box enclosing all images contained in the canavs): returns the lower-left corner and the dimensions.
val scale : ?scaler:(I.t -> I.t -> unit) -> Fraction.t -> Fraction.t -> t -> tScale the image proportionally by fractional coefficients with given numerator and denominator in the x and y directions. The viewport is left untouched. The scaler parameter can be specified in order to use a particular function to scale individual images. The viewport is left unchanged.
Resize the image, scaling and changing the viewport.
module Draw : sig ... end