4 module type TagType = sig
6 val to_base : t -> int * SwfBaseOut.s list
9 module Make(Tag : TagType) = struct
13 let of_rect {top; bottom; left; right} =
14 `Rect(left,right,top,bottom)
17 let make_type t size =
19 [`Ui16 ((t lsl 6) lor size)]
21 [`Ui16 ((t lsl 6) lor 0x3F); `Si32 (Int32.of_int size)] in
24 [`Size(make_type t, data')]
26 let to_base t : SwfBaseOut.t list = [
28 char 'F'; char 'W'; char 'S';
39 ] @ HList.concat_map of_tag t.tags