FSketch


FSketch

The FSketch library can be installed from NuGet:
PM> Install-Package FSketch

Example

This example demonstrates how the DSL can be used to represent shapes.

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
#r "FSketch.dll"
open FSketch
open FSketch.Builder
open FSketch.Dsl

let simpleShapes = shapes {
  yield rectangle (150., 50.) |> at origin |> withContour Pens.Black
  yield ellipse (140., 40.) |> at origin |> withContourAndFill (Pens.Blue, Brushes.LightBlue)
  yield rectangle (150., 50.) |> at (200., 0.) |> withContour Pens.Black
  yield ellipse (140., 40.) |> at (200., 0.) |> withContourAndFill (Pens.Red, Brushes.LightPink)
}

Samples & documentation

  • Tutorial contains a further explanation of this sample library.

  • API Reference contains automatically generated documentation for all types, modules and functions in the library. This includes additional brief samples on using most of the functions.

Contributing and copyright

The project is hosted on GitHub where you can report issues, fork the project and submit pull requests. If you're adding a new public API, please also consider adding samples that can be turned into a documentation.

The library is available under Public Domain license, which allows modification and redistribution for both commercial and non-commercial purposes. For more information see the License file in the GitHub repository.

val simpleShapes : obj

Full name: Index.simpleShapes
Fork me on GitHub