Skip to content

Commit 3a47ab9

Browse files
committed
Reformat the sources with automatic formatter
1 parent edaeeb3 commit 3a47ab9

File tree

10 files changed

+1156
-977
lines changed

10 files changed

+1156
-977
lines changed

kicadsch/src/kicadSch_sigs.mli

Lines changed: 38 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,141 +1,146 @@
11
(**
22
Kicad modules Signatures *)
33

4-
5-
type orientation = Orient_H | Orient_V (** *)
64
(** orientation of a text *)
5+
type orientation = Orient_H | Orient_V (** *)
76

87
(** absolute coordinates in the drawing *)
9-
type coord = Coord of int*int
8+
type coord = Coord of int * int
109

11-
type size = Size of int (** *)
1210
(** font size of a text *)
11+
type size = Size of int (** *)
1312

14-
type justify = J_left | J_right | J_center | J_bottom | J_top (** *)
1513
(** Text justification of a text *)
14+
type justify = J_left | J_right | J_center | J_bottom | J_top (** *)
1615

17-
type style = Bold | Italic | BoldItalic | NoStyle (** *)
1816
(** Style of a text *)
17+
type style = Bold | Italic | BoldItalic | NoStyle (** *)
1918

20-
type kolor = [`NoColor | `Black | `Green | `Red | `Blue | `Brown ]
2119
(** Color of the text. These are the colors appearing in Kicad schematics *)
20+
type kolor = [`NoColor | `Black | `Green | `Red | `Blue | `Brown]
2221

23-
type transfo = ((int * int) * (int * int))
2422
(** Transformation matrix of a relative coordinate around an absolute coordinate.
2523
The matrix is layed out as a pair of lines of pairs *)
24+
type transfo = (int * int) * (int * int)
2625

2726
module type Painter = sig
2827
(** A module able to paint a canvas with several graphic primitives
2928
and then to process the canvas into a picture file format. The
3029
functions are supposed to be pure *)
3130

32-
type t
3331
(** the canvas of the painter *)
32+
type t
3433

35-
val paint_text: ?kolor: kolor -> String.t -> orientation -> coord -> size -> justify -> style -> t -> t
34+
val paint_text :
35+
?kolor:kolor
36+
-> String.t
37+
-> orientation
38+
-> coord
39+
-> size
40+
-> justify
41+
-> style
42+
-> t
43+
-> t
3644
(** [paint ?kolor text orient coord size justification style canvas]
3745
adds a [text] with the given [orient], [size], [justification]
3846
and [style] at the given [coord] to [canvas].
3947
@return the modified canvas *)
4048

41-
val paint_line: ?kolor: kolor -> ?width: size -> coord -> coord -> t -> t
49+
val paint_line : ?kolor:kolor -> ?width:size -> coord -> coord -> t -> t
4250
(** [paint_line ?kolor width start end canvas] paints a line with
4351
the given [kolor] and [width] between [start] and [stop] on
4452
[canvas].
4553
@return the modified canvas *)
4654

47-
val paint_circle: ?kolor: kolor -> ?fill: kolor -> coord -> int -> t -> t
55+
val paint_circle : ?kolor:kolor -> ?fill:kolor -> coord -> int -> t -> t
4856
(** [paint_circle ?kolor center radius canvas] paints a circle
4957
filled with the given [kolor] defined by [center] and [radius] on
5058
[canvas].
5159
@return the modified canvas *)
5260

53-
val paint_rect: ?kolor: kolor -> ?fill: kolor -> coord -> coord -> t -> t
61+
val paint_rect : ?kolor:kolor -> ?fill:kolor -> coord -> coord -> t -> t
5462
(** [paint_rect ?kolor corner1 corner2 canvas] paints a rectangle
5563
filled with the given [kolor] defined by [corner1] and [corner2]
5664
on [canvas].
5765
@return the modified canvas *)
5866

59-
val paint_image: coord -> float -> Buffer.t -> t -> t
67+
val paint_image : coord -> float -> Buffer.t -> t -> t
6068
(** [paint_image corner scale png canvas] paints a [png] image
6169
filled at [corner], scaled at [scale] on [canvas].
6270
@return the
6371
modified canvas *)
6472

65-
val paint_arc: ?kolor: kolor -> ?fill: kolor -> coord -> coord -> coord -> int -> t -> t
73+
val paint_arc :
74+
?kolor:kolor -> ?fill:kolor -> coord -> coord -> coord -> int -> t -> t
6675
(** [paint_arc ?kolor center start end radius canvas] paints an arc filled
6776
with [kolor] between [start] and [end] of [radius] around center on
6877
[canvas].
6978
@return the modified canvas *)
7079

71-
val set_canevas_size: int -> int -> t -> t
80+
val set_canevas_size : int -> int -> t -> t
7281
(** [set_canevas x y canvas] set the size of the canevas
7382
7483
@return the modified canvas *)
7584

76-
val get_context: unit -> t
85+
val get_context : unit -> t
7786
(** [get_context ()]
7887
@return a new painting canvas *)
79-
8088
end
8189

8290
module type SchPainter = sig
8391
(** A module able to paint a schematic file in a painter context *)
8492

85-
type schContext
8693
(** the schematic context *)
94+
type schContext
8795

88-
type painterContext
8996
(** the underlying context *)
97+
type painterContext
9098

9199
val initial_context : unit -> schContext
92100
(** [initial_context ()]
93101
@return an new empty context *)
94102

95-
val add_lib: string -> schContext -> schContext
103+
val add_lib : string -> schContext -> schContext
96104
(** [add_lib line context] parse the content of [line] provided to
97105
libs to the [context].
98106
@return the updated context *)
99107

100-
val parse_line :
101-
String.t -> schContext -> schContext
108+
val parse_line : String.t -> schContext -> schContext
102109
(** [parse_line line context] parse a new [line] of schematic and
103110
update [context].
104111
@return the updated context *)
105112

106-
val output_context: schContext -> painterContext
113+
val output_context : schContext -> painterContext
107114
(** [output_context context output] write the [context] as a image
108115
format to [output] *)
109-
110116
end
111117

112-
module type CompPainter =
113-
sig
118+
module type CompPainter = sig
114119
(** The library that is able to read component libraries and
115120
memorize the read components. Then when passed a drawing context
116121
and a component to paint it can paint the component on demand to
117122
the drawing context *)
118123

119-
type t
120124
(** A component Library manager *)
125+
type t
121126

122-
type drawContext
123127
(** A drawing context *)
128+
type drawContext
124129

125-
val lib: unit -> t
130+
val lib : unit -> t
126131
(** [lib ()]
127132
@return an empty new component manager *)
128133

129-
val append_lib: string -> t -> t
134+
val append_lib : string -> t -> t
130135
(** [append_lib stream context] appends the lib contained in the
131136
[stream] to the context.
132137
@return the updated context *)
133138

134-
val plot_comp: t -> string -> int -> coord -> transfo -> drawContext -> drawContext * bool
139+
val plot_comp :
140+
t -> string -> int -> coord -> transfo -> drawContext -> drawContext * bool
135141
(** [plot_comp lib name partnumber origin transformation context]
136142
find in [lib] the component with given [name] and plot the part
137143
[partnumber] at [origin] after [transfomation] into the graphical
138144
[context] and the fact that the component is multipart.
139145
@return the updated graphical context *)
140-
141146
end

0 commit comments

Comments
 (0)