Module Image

module Image: sig .. end
Image module
See also Racket Documentation

type t 
Image.t : the type of images
val empty_scene : float -> float -> t
empty_scene width height : creates a plain background of size width x height
val rectangle : float -> float -> ?fill:bool -> ?outline_size:float -> Color.t -> t
rectangle width height color : creates a rectangle of size width x height with outline color. The outline width is outline_size point. Filled with color if fill is true.
val polygon : (float * float) list ->
?fill:bool -> ?outline_size:float -> Color.t -> t
polygon [(x, y);...] color : creates a polygon with color connecting (x, y)'s. The outline width is outline_size point. Filled with color if fill is true.
val circle : float -> ?fill:bool -> ?outline_size:float -> Color.t -> t
circle radius color : creates a circle of radius with color. The outline width is outline_size point. Filled with color if fill is true.
val line : (float * float) list -> ?size:float -> Color.t -> t
line [(x, y);...] color : creates a line with color starting from (0, 0) connecting (x, y)'s. The line width is size point.
val text : string -> ?size:float -> Color.t -> t
text str color : creates a string str with color. The font size is size point.
val read_image : string -> t
read_image file : reads an image from file (png)
val place_image : t -> float * float -> t -> t
place_image image (x, y) scene : places an image at coordinates (x, y) on scene
val place_images : t list -> (float * float) list -> t -> t
place_images images posns scene : places images respectively at coordinates posns on scene
val to_bitmap : t -> Cairo.Image.data32
to_bitmap image : converts image to bitmap of type data32.
val from_bitmap : Cairo.Image.data32 -> t
from_bitmap data : converts data of type data32 to an image
val freeze : t -> t
freeze image : freezes image (as bitmap)