pigy-genetics
Safe HaskellNone
LanguageHaskell2010

Pigy.Image.Drawing

Description

Drawing pig images.

Synopsis
  • enlarge :: Float
  • width :: Float
  • height :: Float
  • drawBody :: Float -> Texture px -> Texture px -> Texture px -> Drawing px ()
  • drawHead :: Texture px -> Texture px -> Drawing px ()
  • drawEyes :: (Float, Float) -> (Float, Float) -> Texture px -> Texture px -> Drawing px ()
  • drawEars :: (Float, Float) -> Texture px -> Texture px -> Drawing px ()
  • drawNose :: Texture px -> Texture px -> Texture px -> Texture px -> Drawing px ()
  • withAspect :: Float -> (Float, Float) -> Drawing px () -> Drawing px ()
  • withScale :: (Float, Float) -> (Float, Float) -> Drawing px () -> Drawing px ()
  • skin :: Float -> Float -> PixelRGBA8

Documentation

enlarge :: Float Source #

Image enlargment factor, relative to nominal dimensions.

width :: Float Source #

Nominal image width.

height :: Float Source #

Nominal image height.

drawBody Source #

Arguments

:: Float

The scale for the body.

-> Texture px

The torso color.

-> Texture px

The belly color.

-> Texture px

The bottom color.

-> Drawing px ()

The drawing.

Draw the body.

drawHead Source #

Arguments

:: Texture px

The unshadowed color.

-> Texture px

The shadowed color.

-> Drawing px ()

The drawing.

Draw the head.

drawEyes Source #

Arguments

:: (Float, Float)

The pupil position in radial coordinates.

-> (Float, Float)

The scaling of the eye.

-> Texture px

The eye color.

-> Texture px

The pupil color.

-> Drawing px ()

The drawing.

Draw the eyes.

drawEars Source #

Arguments

:: (Float, Float)

The scaling of the ears.

-> Texture px

The unshadowed color.

-> Texture px

The shadowed color.

-> Drawing px ()

The drawing.

Draw the ears.

drawNose Source #

Arguments

:: Texture px

The unshadowed color.

-> Texture px

The shadowed color.

-> Texture px

The centerline color.

-> Texture px

The nostril color.

-> Drawing px ()

The drawing.

Draw the nose.

withAspect Source #

Arguments

:: Float

The aspect ratio.

-> (Float, Float)

The center of the scaling.

-> Drawing px ()

The original drawing.

-> Drawing px ()

The scaled drawing.

Scale a drawing according to an aspect ratio.

withScale Source #

Arguments

:: (Float, Float)

The scales.

-> (Float, Float)

The center of the scaling.

-> Drawing px ()

The original drawing.

-> Drawing px ()

The scaled drawing.

Scale a drawing.

skin Source #

Arguments

:: Float

The hue.

-> Float

The luminosity.

-> PixelRGBA8

The skin color.

Compute the skin color.