Module Sdlsurface

module Sdlsurface: sig .. end

Surface definition and management


API Doc: Surface category

type t 
val create_rgb : width:int -> height:int -> depth:int -> t

api doc

val free : t -> unit

api doc

val load_bmp : filename:string -> t

api doc

val save_bmp : t -> filename:string -> unit

api doc

val fill_rect : dst:t -> rect:Sdlrect.t -> color:int32 -> unit

api doc

val blit_surface : src:t ->
src_rect:Sdlrect.t -> dst:t -> dst_rect:Sdlrect.t -> Sdlrect.t

api doc

val blit_surf : src:t -> dst:t -> dst_rect:Sdlrect.t -> Sdlrect.t

same than blit_surface but without the src_rect parameter

val blit_surfs : src:t -> dst:t -> dst_rect:Sdlrect.t -> unit

same than blit_surf but returning unit

val blit_pixels_unsafe : t -> string -> unit

api doc

val set_color_key : t -> enable:bool -> key:int32 -> unit

api doc

val set_color_key_map_rgb : t -> enable:bool -> rgb:int * int * int -> unit
val get_width : t -> int
val get_height : t -> int
val get_dims : t -> int * int
val get_pitch : t -> int
val get_pixel32_unsafe : t -> x:int -> y:int -> int32
val get_pixel16_unsafe : t -> x:int -> y:int -> int32
val get_pixel8_unsafe : t -> x:int -> y:int -> int32
val get_bits_per_pixel : t -> int
val has_palette : t -> bool
val palette_num_colors : t -> int

number of colors in the palette, if any, -1 otherwise

val set_blend_mode : t -> SdlblendMode.t -> unit

api doc

val get_pixelformat_t : t -> SdlpixelFormat.t
val get_pixels : t -> string

api doc