dyna-gloss-0.1.0.0: FRP for gloss graphics and animation library
Safe HaskellNone
LanguageHaskell2010

Dyna.Gloss.Data.Picture

Synopsis

Documentation

data Picture #

A 2D picture

Constructors

Blank

A blank picture, with nothing in it.

Polygon Path

A convex polygon filled with a solid color.

Line Path

A line along an arbitrary path.

Circle Float

A circle with the given radius.

ThickCircle Float Float

A circle with the given radius and thickness. If the thickness is 0 then this is equivalent to Circle.

Arc Float Float Float

A circular arc drawn counter-clockwise between two angles (in degrees) at the given radius.

ThickArc Float Float Float Float

A circular arc drawn counter-clockwise between two angles (in degrees), with the given radius and thickness. If the thickness is 0 then this is equivalent to Arc.

Text String

Some text to draw with a vector font.

Bitmap BitmapData

A bitmap image.

BitmapSection Rectangle BitmapData

A subsection of a bitmap image where the first argument selects a sub section in the bitmap, and second argument determines the bitmap data.

Color Color Picture

A picture drawn with this color.

Translate Float Float Picture

A picture translated by the given x and y coordinates.

Rotate Float Picture

A picture rotated clockwise by the given angle (in degrees).

Scale Float Float Picture

A picture scaled by the given x and y factors.

Pictures [Picture]

A picture consisting of several others.

Instances

Instances details
Eq Picture 
Instance details

Defined in Graphics.Gloss.Internals.Data.Picture

Methods

(==) :: Picture -> Picture -> Bool #

(/=) :: Picture -> Picture -> Bool #

Data Picture 
Instance details

Defined in Graphics.Gloss.Internals.Data.Picture

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Picture -> c Picture #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Picture #

toConstr :: Picture -> Constr #

dataTypeOf :: Picture -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Picture) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Picture) #

gmapT :: (forall b. Data b => b -> b) -> Picture -> Picture #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Picture -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Picture -> r #

gmapQ :: (forall d. Data d => d -> u) -> Picture -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Picture -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Picture -> m Picture #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Picture -> m Picture #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Picture -> m Picture #

Show Picture 
Instance details

Defined in Graphics.Gloss.Internals.Data.Picture

Semigroup Picture 
Instance details

Defined in Graphics.Gloss.Internals.Data.Picture

Monoid Picture 
Instance details

Defined in Graphics.Gloss.Internals.Data.Picture

type Point = Vec Source #

data Vec Source #

Pair of unboxed floats. All operations on vectors are strict which is more suitable for computation intensive domains such as computer graphics.

Instances

Instances details
Eq Vec Source # 
Instance details

Defined in Dyna.Gloss.Data.Vec

Methods

(==) :: Vec -> Vec -> Bool #

(/=) :: Vec -> Vec -> Bool #

Fractional Vec Source # 
Instance details

Defined in Dyna.Gloss.Data.Vec

Methods

(/) :: Vec -> Vec -> Vec #

recip :: Vec -> Vec #

fromRational :: Rational -> Vec #

Num Vec Source # 
Instance details

Defined in Dyna.Gloss.Data.Vec

Methods

(+) :: Vec -> Vec -> Vec #

(-) :: Vec -> Vec -> Vec #

(*) :: Vec -> Vec -> Vec #

negate :: Vec -> Vec #

abs :: Vec -> Vec #

signum :: Vec -> Vec #

fromInteger :: Integer -> Vec #

Ord Vec Source # 
Instance details

Defined in Dyna.Gloss.Data.Vec

Methods

compare :: Vec -> Vec -> Ordering #

(<) :: Vec -> Vec -> Bool #

(<=) :: Vec -> Vec -> Bool #

(>) :: Vec -> Vec -> Bool #

(>=) :: Vec -> Vec -> Bool #

max :: Vec -> Vec -> Vec #

min :: Vec -> Vec -> Vec #

Show Vec Source # 
Instance details

Defined in Dyna.Gloss.Data.Vec

Methods

showsPrec :: Int -> Vec -> ShowS #

show :: Vec -> String #

showList :: [Vec] -> ShowS #

AdditiveGroup Vec Source # 
Instance details

Defined in Dyna.Gloss.Data.Vec

Methods

zeroV :: Vec #

(^+^) :: Vec -> Vec -> Vec #

negateV :: Vec -> Vec #

(^-^) :: Vec -> Vec -> Vec #

VectorSpace Vec Source # 
Instance details

Defined in Dyna.Gloss.Data.Vec

Associated Types

type Scalar Vec #

Methods

(*^) :: Scalar Vec -> Vec -> Vec #

AffineSpace Vec Source # 
Instance details

Defined in Dyna.Gloss.Data.Vec

Associated Types

type Diff Vec #

Methods

(.-.) :: Vec -> Vec -> Diff Vec #

(.+^) :: Vec -> Diff Vec -> Vec #

HasCross2 Vec Source # 
Instance details

Defined in Dyna.Gloss.Data.Vec

Methods

cross2 :: Vec -> Vec #

HasNormal Vec Source # 
Instance details

Defined in Dyna.Gloss.Data.Vec

Methods

normalVec :: Vec -> Vec #

BasisArity Vec Source # 
Instance details

Defined in Dyna.Gloss.Data.Vec

Methods

basisArity :: Vec -> Int #

HasBasis Vec Source # 
Instance details

Defined in Dyna.Gloss.Data.Vec

Associated Types

type Basis Vec #

type Scalar Vec Source # 
Instance details

Defined in Dyna.Gloss.Data.Vec

type Diff Vec Source # 
Instance details

Defined in Dyna.Gloss.Data.Vec

type Diff Vec = Vec
type Basis Vec Source # 
Instance details

Defined in Dyna.Gloss.Data.Vec

type Path = [Point] Source #

Aliases for Picture constructors

blank :: Picture Source #

A blank picture, with nothing in it.

polygon :: Path -> Picture Source #

A convex polygon filled with a solid color.

line :: Path -> Picture Source #

A line along an arbitrary path.

circle :: Float -> Picture Source #

A circle with the given radius.

thickCircle :: Float -> Float -> Picture Source #

A circle with the given thickness and radius. If the thickness is 0 then this is equivalent to Circle.

arc :: Float -> Float -> Float -> Picture Source #

A circular arc drawn counter-clockwise between two angles (in degrees) at the given radius.

thickArc :: Float -> Float -> Float -> Float -> Picture Source #

A circular arc drawn counter-clockwise between two angles (in degrees), with the given radius and thickness. If the thickness is 0 then this is equivalent to Arc.

text :: String -> Picture Source #

Some text to draw with a vector font.

bitmap :: BitmapData -> Picture Source #

A bitmap image

bitmapSection :: Rectangle -> BitmapData -> Picture Source #

a subsection of a bitmap image first argument selects a sub section in the bitmap second argument determines the bitmap data

color :: Color -> Picture -> Picture Source #

A picture drawn with this color.

translate :: Vec -> Picture -> Picture Source #

A picture translated by the given x and y coordinates.

rotate :: Float -> Picture -> Picture Source #

A picture rotated clockwise by the given angle (in tau's). 1 Tau is full circle.

scale :: Vec -> Picture -> Picture Source #

A picture scaled by the given x and y factors.

pictures :: [Picture] -> Picture Source #

A picture consisting of several others.

Compound shapes

lineLoop :: Path -> Picture Source #

A closed loop along a path.

circleSolid :: Float -> Picture Source #

A solid circle with the given radius.

arcSolid :: Float -> Float -> Float -> Picture Source #

A solid arc, drawn counter-clockwise between two angles at the given radius.

sectorWire :: Float -> Float -> Float -> Picture Source #

A wireframe sector of a circle. An arc is draw counter-clockwise from the first to the second angle at the given radius. Lines are drawn from the origin to the ends of the arc.

rectanglePath Source #

Arguments

:: Float

width of rectangle

-> Float

height of rectangle

-> Path 

A path representing a rectangle centered about the origin

rectangleWire :: Float -> Float -> Picture Source #

A wireframe rectangle centered about the origin.

rectangleSolid :: Float -> Float -> Picture Source #

A solid rectangle centered about the origin.

rectangleUpperPath :: Float -> Float -> Path Source #

A path representing a rectangle in the y > 0 half of the x-y plane.

rectangleUpperWire :: Float -> Float -> Picture Source #

A wireframe rectangle in the y > 0 half of the x-y plane.

rectangleUpperSolid :: Float -> Float -> Picture Source #

A solid rectangle in the y > 0 half of the x-y plane.