nanovg-0.2.0.0: Haskell bindings for nanovg

Safe HaskellSafe
LanguageHaskell2010

NanoVG.Internal.Image

Synopsis

Documentation

createImage :: Context -> FileName -> CInt -> IO (Maybe Image)

Creates image by loading it from the disk from specified file name.

createImageMem :: Context -> ImageFlags -> ByteString -> IO (Maybe Image)

Creates image by loading it from the specified chunk of memory.

createImageRGBA :: Context -> CInt -> CInt -> ImageFlags -> ByteString -> IO (Maybe Image)

Creates image from specified image data.

updateImage :: Context -> Image -> ByteString -> IO ()

Updates image data specified by image handle.

imageSize :: Context -> Image -> IO (CInt, CInt)

Returns the dimensions of a created image.

deleteImage :: Context -> Image -> IO ()

Deletes created image.