package sfml

  1. Overview
  2. Docs
Bindings to the SFML multimedia library

Install

Dune Dependency

Authors

Maintainers

Sources

ocaml-sfml-0.09.2.tar.gz
sha256=ce1e50dec69a4495232261627a359a8fb54d79788147380bee78b0983f8b6951
md5=9ae99bb47bb68d5181d01b7bbc78a351

doc/sfml.graphics/SFImage/index.html

Module SFImage

Online documentation for the Image class

type t
val createFromFile : filename:string -> t
val createFromColor : width:int -> height:int -> color:SFColor.t -> t
val createFromMemory : data:bytes -> t
val createFromPixels : width:int -> height:int -> data:bytes -> t
val createFromPixelsArray : pixels:(int * int * int * int) array array -> t
type input = [
  1. | `Filename of string
  2. | `Memory of bytes
  3. | `Color of int * int * SFColor.t
  4. | `Pixels of int * int * bytes
  5. | `PixelsArray of (int * int * int * int) array array
]
val create : input -> t
val getWidth : image:t -> int
val getHeight : image:t -> int
val getSize : image:t -> int * int

the same type defined in glMLite

val getPixelsBA : image:t -> gl_image
val getPixelsStr : image:t -> string
val getPixel4 : image:t -> x:int -> y:int -> SFColor.t
val getPixel3 : image:t -> x:int -> y:int -> SFColor.t
val getPixelRGB : image:t -> x:int -> y:int -> SFColor.rgb
val getPixelRGBA : image:t -> x:int -> y:int -> SFColor.rgba
val saveToFile : image:t -> filename:string -> unit
val setPixel : image:t -> x:int -> y:int -> color:SFColor.t -> unit
val createMaskFromColor : image:t -> color:SFColor.t -> alpha:int -> unit
val flipHorizontally : image:t -> unit
val flipVertically : image:t -> unit
OCaml

Innovation. Community. Security.