Unstructured Graphicscollage : Int -> Int -> List Form -> Element |
Creating Formsfilled : Color -> Shape -> Form | gradient : Gradient -> Shape -> Form | outlined : LineStyle -> Shape -> Form | textured : String -> Shape -> Form | toForm : Element -> Form | traced : LineStyle -> Path -> Form |
Grouping Formsgroup : List Form -> Form | groupTransform : Transform2D -> List Form -> Form |
Shapescircle : 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) |
Imagesimage : 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) |
Element InspectionwidthOf : Element -> Int | heightOf : Element -> Int | sizeOf : Element -> (Int, Int) |
Layout Aliaseslayers : 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 |
Layoutflow : Direction -> List Element -> Element | right : Direction | +X | up : Direction | +Y | outward : Direction | +Z | left : Direction | -X | down : Direction | -Y | inward : Direction | -Z |
| | Transforming Formsalpha : Float -> Form -> Form | move : (Float, Float) -> Form -> Form | moveX : Float -> Form -> Form | moveY : Float -> Form -> Form | rotate : Float -> Form -> Form | scale : Float -> Form -> Form |
Pathssegment : (Float, Float) -> (Float, Float) -> Path | path : List (Float, Float) -> Path |
Line Style Typestype 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
|
Line Stylesdashed : Color -> LineStyle | defaultLine : LineStyle | dotted : Color -> LineStyle | solid : Color -> LineStyle |
Element Stylingwidth : 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 |
Positioning Elementsempty : 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. |
Named PositionstopLeft : Position
midTop : Position
topRight : Position
--------------------
midLeft : Position
middle : Position
midRight : Position
--------------------
bottomLeft : Position
midBottom : Position
bottomRight : Position
|
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets
More Cheat Sheets by CITguy