File: contributed2.ml

package info (click to toggle)
mlpost 0.9-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,844 kB
  • sloc: ml: 21,094; javascript: 4,047; makefile: 430; ansic: 34; lisp: 19; sh: 15
file content (21 lines) | stat: -rw-r--r-- 463 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
open Mlpost
open Command
open Color
open Box
open Point
open Num

let repository ?wc patches =
  let pbox = circle (p (0., 0.)) patches in
  let p = draw_box ~fill:green pbox in
  let r =
    match wc with
    | None -> p
    | Some wc ->
        let c = label ~pos:Pbot wc (south pbox) in
        draw_box ~fill:yellow (circle (Point.p (0., 0.)) (Picture.make c))
  in
  [ r ]

let fig =
  repository ~wc:(Picture.tex "Copie de travail") (Picture.tex "Patches")