package kicadsch

  1. Overview
  2. Docs

A module able to paint a canvas with several graphic primitives and then to process the canvas into a picture file format. The functions are supposed to be pure

type t

the canvas of the painter

val paint_text : ?kolor:[ `NoColor | `Black | `Green | `Red | `Blue | `Brown ] -> String.t -> Kicadsch__.KicadSch_sigs.orientation -> Kicadsch__.KicadSch_sigs.coord -> Kicadsch__.KicadSch_sigs.size -> Kicadsch__.KicadSch_sigs.justify -> Kicadsch__.KicadSch_sigs.style -> t -> t

paint ?kolor text orient coord size justification style canvas adds a text with the given orient, size, justification and style at the given coord to canvas.

  • returns

    the modified canvas

val paint_line : ?kolor:[ `NoColor | `Black | `Green | `Red | `Blue | `Brown ] -> ?width:Kicadsch__.KicadSch_sigs.size -> Kicadsch__.KicadSch_sigs.coord -> Kicadsch__.KicadSch_sigs.coord -> t -> t

paint_line ?kolor width start end canvas paints a line with the given kolor and width between start and stop on canvas.

  • returns

    the modified canvas

val paint_circle : ?kolor:[ `NoColor | `Black | `Green | `Red | `Blue | `Brown ] -> ?fill:[ `NoColor | `Black | `Green | `Red | `Blue | `Brown ] -> Kicadsch__.KicadSch_sigs.coord -> int -> t -> t

paint_circle ?kolor center radius canvas paints a circle filled with the given kolor defined by center and radius on canvas.

  • returns

    the modified canvas

val paint_rect : ?kolor:[ `NoColor | `Black | `Green | `Red | `Blue | `Brown ] -> ?fill:[ `NoColor | `Black | `Green | `Red | `Blue | `Brown ] -> Kicadsch__.KicadSch_sigs.coord -> Kicadsch__.KicadSch_sigs.coord -> t -> t

paint_rect ?kolor corner1 corner2 canvas paints a rectangle filled with the given kolor defined by corner1 and corner2 on canvas.

  • returns

    the modified canvas

val paint_image : Kicadsch__.KicadSch_sigs.coord -> float -> Buffer.t -> t -> t

paint_image corner scale png canvas paints a png image filled at corner, scaled at scale on canvas.

  • returns

    the modified canvas

val paint_arc : ?kolor:[ `NoColor | `Black | `Green | `Red | `Blue | `Brown ] -> ?fill:[ `NoColor | `Black | `Green | `Red | `Blue | `Brown ] -> Kicadsch__.KicadSch_sigs.coord -> Kicadsch__.KicadSch_sigs.coord -> Kicadsch__.KicadSch_sigs.coord -> int -> t -> t

paint_arc ?kolor center start end radius canvas paints an arc filled with kolor between start and end of radius around center on canvas.

  • returns

    the modified canvas

val set_canevas_size : int -> int -> t -> t

set_canevas x y canvas set the size of the canevas

  • returns

    the modified canvas

val get_context : unit -> t

get_context ()

  • returns

    a new painting canvas

OCaml

Innovation. Community. Security.