Safe Haskell | None |
---|---|
Language | Haskell2010 |
htdp-image is a simple graphics library written on top of Gloss that allows users to create complex images by combining smaller images.
For example, four iterations of the sierpinski triangle can be drawn as:
import Graphics.Htdp main = drawImage $ sier . sier . sier . sier $ triangle 20 solid red where sier :: Image -> Image sier t = above t (beside t t)
Once the image is drawn, you can use Gloss key bindings to navigate around.
Documentation
module Graphics.Gloss.Data.Color
Image constructors
module Graphics.Shape
Image combinators
module Graphics.Combinator
Image
A 2D Image.
Rotates i
by deg
degrees in a counter-clockwise direction.
Unlike 2htdp/image's rotate function, this function is not smart enough
to reduce the rotated image's binding box to fit the actual image.
Instead, it just creates a new binding box so that i
's binding box
fits in it.