Skip to content
Christopher Nikkel edited this page Dec 22, 2018 · 7 revisions

Image

Definition

type Image =
    {
        UpperLeft: Point
        Size: Area
        Source: string
    }

Description

Image is used to create a SVG image.

Functions

Function Signature Description
Image.create Point -> Area -> string -> Image create an image at a Point for the upper left corner with a Area and a string for the source
Image.toString Image -> string convert an image to a string

Usage

Example

let upperLeft =  Point.ofInts (55, 45)
let area =  Area.ofInts (100, 50)

Image.create upperLeft area "image.png"
  |> Element.create
  |> printf "%O"

Output

<image x="55" y="45" height="50" width="100" xlink:href="image.png"/>

Table of Contents

Getting Started

Fundamentals

Basic SVG Elements

Advanced Elements

Experimental

Clone this wiki locally
You can’t perform that action at this time.