20 lines
269 B
OCaml
20 lines
269 B
OCaml
|
type pixel = {
|
||
|
r : char;
|
||
|
g : char;
|
||
|
b : char;
|
||
|
a : char;
|
||
|
}
|
||
|
|
||
|
type t = {
|
||
|
width : int;
|
||
|
height : int;
|
||
|
data : pixel array;
|
||
|
}
|
||
|
|
||
|
let init_screen w h =
|
||
|
{
|
||
|
width = w;
|
||
|
height = h;
|
||
|
data = Array.make_matrix h w { r = 255; g = 255; b = 255; a = 255 }
|
||
|
}
|