shine-0.1.0.0: Declarative graphics for the browser using GHCJS

Copyright(c) Francesco Gazzetta, 2016
LicenseMIT
Maintainerfrancygazz@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell98

Graphics.Shine.Image

Description

Handling of external image (.png, .svg and all browser-supported formats).

Synopsis

Documentation

makeImage :: FilePath -> IO ImageData Source

Makes an image element from an URL

data ImageSize Source

How big (and how stretched/cropped) the Image is drawn

Constructors

Original

The orizinal size of the image

Stretched Float Float

Scale the image to the given dimensions

Clipped Float Float Float Float

Clip the image from the given coordinates to the given width and height

ClippedStretched Float Float Float Float Float Float

Clip (x,y,width,height) and scale (width, height) the image

newtype ImageData Source

Just a wrapper around the HTMLImageElement type. Needed for the Show instance.

Constructors

ImageData 

Fields

unImageData :: HTMLImageElement