package nanosvg

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type line_join =
  1. | Join_miter
  2. | Join_round
  3. | Join_bevel
type line_cap =
  1. | Cap_butt
  2. | Cap_round
  3. | Cap_square
type fill_rule =
  1. | Fillrule_nonzero
  2. | Fillrule_evenodd
type spread =
  1. | Spread_pad
  2. | Spread_reflect
  3. | Spread_repeat
type text_anchor =
  1. | Anchor_left
  2. | Anchor_center
  3. | Anchor_right
type text_style =
  1. | Text_normal
  2. | Text_italic
  3. | Text_oblique
type stroke_align =
  1. | Stroke_align_center
  2. | Stroke_align_inner
  3. | Stroke_align_outer
type gradient_stop = {
  1. color : Int32.t;
  2. offset : float;
}
type gradient = {
  1. xform : float array;
  2. spread : spread;
  3. fx : float;
  4. fy : float;
  5. stops : gradient_stop array;
}
type paint =
  1. | Paint_none
  2. | Paint_color of Int32.t
  3. | Paint_linear_gradient of gradient
  4. | Paint_radial_gradient of gradient
type box = {
  1. minx : float;
  2. miny : float;
  3. maxx : float;
  4. maxy : float;
}
type point = {
  1. x : float;
  2. y : float;
}
type path = {
  1. points : point array;
  2. closed : bool;
  3. bounds : box;
}
type text = {
  1. xform : float array;
  2. anchor : text_anchor;
  3. style : text_style;
  4. fontsize : float;
  5. fontfamily : string;
  6. s : string;
}
type shape_payload =
  1. | Shape_paths of path list
  2. | Shape_text of text
type shape = {
  1. id : string;
  2. fill : paint;
  3. stroke : paint;
  4. opacity : float;
  5. stroke_width : float;
  6. stroke_dash_offset : float;
  7. stroke_dash_array : float array;
  8. stroke_line_join : line_join;
  9. stroke_line_cap : line_cap;
  10. stroke_align : stroke_align;
  11. miter_limit : float;
  12. fill_rule : fill_rule;
  13. visible : bool;
  14. bounds : box;
  15. payload : shape_payload;
}
type image = {
  1. width : float;
  2. height : float;
  3. viewXform : float array;
  4. shapes : shape list;
}
module Image_data : sig ... end
type units =
  1. | Px
  2. | Pt
  3. | Pc
  4. | Mm
  5. | Cm
  6. | In
val parse_from_file : ?units:units -> ?dpi:float -> string -> Image_data.t option
val parse : ?units:units -> ?dpi:float -> string -> Image_data.t option
val lift : Image_data.t -> image
module Rasterizer : sig ... end
val rasterize : Rasterizer.t -> Image_data.t -> tx:float -> ty:float -> scale:float -> dst:data8 -> w:int -> h:int -> ?stride:int -> unit -> unit
OCaml

Innovation. Community. Security.