image.ml

A library for kivy textures. An Img is a kivy texture. Images can be loaded from disk or created programmatically.

Definitions

Definitions & Creating images/buffers

data Img
data Buffer
type Color = Vec
setpixel : Img -> Vec -> Color -> Unit
image : Vec -> Img
imgLoad : String -> Img
imgBuf : Img -> Buffer

Functions

imgSize : Img -> Vec
imgHeight : Img -> Number
imgWidth : Img -> Number
imgCopy : Img -> Img
imgMap : Img -> (Number->Number->Color->Color) -> Unit
imgGet : Buffer -> Vec -> Vec
imgSave : String -> Img -> Unit
imgClear : Img -> Color -> Unit
imgMapRect: Vec -> Vec -> Img -> (Number->Number->Color->Color) -> Unit

args: size, pos, img, func

imgSmooth : Img -> Img
imgFlipH : Img -> Img
imgFlipV : Img -> Img
imgShade : Img -> String -> Img
data Atlas = Atlas Img (List Vec)

arguments: atlasTex, imgSizes

mkAtlasImg : List Img -> Img

make an atlas of vertically stacked
images from the input images.

mkAtlas : List Img -> Atlas

create an Atlas from the input images