Standard Elm Graphics.*
|
filled : Color -> Shape -> Form
|
|
gradient : Gradient -> Shape -> Form
|
|
outlined : LineStyle -> Shape -> Form
|
|
textured : String -> Shape -> Form
|
|
toForm : Element -> Form
|
|
traced : LineStyle -> Path -> Form
|
|
group : List Form -> Form
|
|
groupTransform : Transform2D -> List Form -> Form
|
|
circle : Float -> Shape
circle(radius)
|
|
ngon : Int -> Float -> Shape
ngon(sides, radius)
|
|
oval : Float -> Float -> Shape
oval(width, height)
|
|
polygon : List (Float, Float) -> Shape
Specify a list of points of the polygon. Shape will automatically close.
|
|
rect : Float -> Float -> Shape
rect(width, height)
|
|
square : Float -> Shape
square(edge_length)
|
|
image : Int -> Int -> String -> Element
image(width, height, src)
|
|
fittedImage : Int -> Int -> String -> Element
fittedImage(width, height, src)
|
|
croppedImage : (Int, Int) -> Int -> Int -> String -> Element
croppedImage(origin, width, height, src)
|
|
tiledImage : Int -> Int -> String -> Element
tiledImage(width, height, src)
|
|
widthOf : Element -> Int
|
|
heightOf : Element -> Int
|
|
sizeOf : Element -> (Int, Int)
|
|
layers : List ELement -> Element
layers == flow outward
|
|
above : Element -> Element -> Element
a above b
|
|
below : Element -> Element -> Element
a below b
|
|
beside : Element -> Element -> Element
a beside b
|
|
flow : Direction -> List Element -> Element
|
|
|
right : Direction
|
+X
|
|
up : Direction
|
+Y
|
|
outward : Direction
|
+Z
|
|
left : Direction
|
-X
|
|
down : Direction
|
-Y
|
|
inward : Direction
|
-Z
|
|
alpha : Float -> Form -> Form
|
|
move : (Float, Float) -> Form -> Form
|
|
moveX : Float -> Form -> Form
|
|
moveY : Float -> Form -> Form
|
|
rotate : Float -> Form -> Form
|
|
scale : Float -> Form -> Form
|
|
segment : (Float, Float) -> (Float, Float) -> Path
|
|
path : List (Float, Float) -> Path
|
type alias **LineStyle** = {
*color*:Color,
*width*:Float,
*cap*:LineCap,
*join*:LineJoin,
*dashing*:List Int,
*dashOffset*:Int
}
type **LineCap**
= *Flat*
| *Round*
| *Padded*
type **LineJoin**
= *Smooth*
| *Sharp Float*
| *Clipped*
|
dashed : Color -> LineStyle
|
|
defaultLine : LineStyle
|
|
dotted : Color -> LineStyle
|
|
solid : Color -> LineStyle
|
|
width : Int -> Element -> Element
|
|
height : Int -> Element -> Element
|
|
size : Int -> Int -> Element -> Element
|
|
color : Color -> Element -> Element
|
|
opacity : Float -> Element -> Element
opacity (0.0:transparent - 1.0:opaque)
|
|
link : String -> Element -> Element
create Element that is a hyper-link
|
|
tag : String -> Element -> Element
similar to <a> with ID
|
|
empty : Element
flow down [ img1, if showMore then img2 else empty ]
|
|
spacer : Int -> Int -> Element
Empty Box
|
|
container : Int -> Int -> Position -> Element -> Element
Put an element in a container. By setting the color of the container, you can create borders.
|
**topLeft** : *Position*
**midTop** : *Position*
**topRight** : *Position*
--------------------
**midLeft** : *Position*
**middle** : *Position*
**midRight** : *Position*
--------------------
**bottomLeft** : *Position*
**midBottom** : *Position*
**bottomRight** : *Position*
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.