package vdom

  1. Overview
  2. Docs
type context
val context_of_js : Ojs.t -> context
val context_to_js : context -> Ojs.t
type gradient
val gradient_of_js : Ojs.t -> gradient
val gradient_to_js : gradient -> Ojs.t
type css_color = string
type context_attribute = {
  1. alpha : bool;
}
val get_context : ?alpha:bool -> Element.t -> context option
val to_data_URL : Element.t -> string
val set_fill_style : context -> [ `Color of css_color | `Gradient of gradient ] -> unit
val set_stroke_style : context -> [ `Color of css_color | `Gradient of gradient ] -> unit
val set_line_width : context -> float -> unit
val create_linear_gradient : context -> float -> float -> float -> float -> gradient
val add_color_stop : gradient -> float -> css_color -> unit
val begin_path : context -> unit
val close_path : context -> unit
val arc : context -> float -> float -> float -> float -> float -> unit
val move_to : context -> float -> float -> unit
val line_to : context -> float -> float -> unit
val fill : context -> unit
val stroke : context -> unit
val stroke_rect : context -> float -> float -> float -> float -> unit
val fill_rect : context -> float -> float -> float -> float -> unit
val set_font : context -> string -> unit
val fill_text : context -> string -> float -> float -> unit
val stroke_text : context -> string -> float -> float -> unit
module TextMetrics : sig ... end
val measure_text : context -> string -> TextMetrics.t
val rotate : context -> float -> unit
val translate : context -> float -> float -> unit
val scale : context -> float -> float -> unit
val clear_rect : context -> float -> float -> float -> float -> unit
OCaml

Innovation. Community. Security.