package mlpost

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file pen.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
(**************************************************************************)
(*                                                                        *)
(*  Copyright (C) Johannes Kanig, Stephane Lescuyer                       *)
(*  Jean-Christophe Filliatre, Romain Bardou and Francois Bobot           *)
(*                                                                        *)
(*  This software is free software; you can redistribute it and/or        *)
(*  modify it under the terms of the GNU Library General Public           *)
(*  License version 2.1, with the special exception on linking            *)
(*  described in file LICENSE.                                            *)
(*                                                                        *)
(*  This software is distributed in the hope that it will be useful,      *)
(*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *)
(*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                  *)
(*                                                                        *)
(**************************************************************************)

open Types
open Transform

type t = Types.pen

let transform tr p = mkPenTransformed p tr

let default = mkPenTransformed mkPenCircle [ scaled 0.5 ]

let circle = mkPenCircle

let square = mkPenSquare

let from_path p = mkPenFromPath p

let scale f p = mkPenTransformed p [ Transform.scaled f ]

let rotate f p = mkPenTransformed p [ Transform.rotated f ]

let shift pt path = mkPenTransformed path [ Transform.shifted pt ]

let yscale n p = mkPenTransformed p [ Transform.yscaled n ]

let xscale n p = mkPenTransformed p [ Transform.xscaled n ]