Commit dfaf5286 authored by SAURAY Antoine's avatar SAURAY Antoine
Browse files

blabla

parent 44751c35
No preview for this file type
No preview for this file type
......@@ -35,4 +35,4 @@ int_of_float(float_of_int(v)*.coeff),
int_of_float(float_of_int(b)*.coeff),
int_of_float(float_of_int(t)*.coeff))
let mult_transp coeff (r,v,b,t) = failwith "Implémentez-moi !"
let mult_transp coeff (r,v,b,t) = (r,v,b,int_of_float(float_of_int(t)*.coeff))
......@@ -6,7 +6,7 @@ type couleur = int * int * int * int (** rouge, vert, bleu, transparence *)
val mult_teinte : float -> couleur -> couleur
val mult_transp : int -> couleur -> couleur
val mult_transp : float -> couleur -> couleur
val invisible : int
val opaque : int
......
No preview for this file type
No preview for this file type
......@@ -13,6 +13,9 @@ let distance p1 p2 =
(** Exemples d'image *)
let im_black = (fun p -> (0, 0, 0, 255))
let rayures =
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -2,10 +2,14 @@ open Image
open ImageDump
(* Utiliser ce fichier pour appeler et tester vos fonctions. *)
let imga = image_lueur(50.0,50.0)
let imgb = image_lueur(60.0,60.0)
let imgc = image_lueur(70.0,70.0)
let bb = blit_im imga (blit_im(imgb imgc))
(* Test 1 *)
let _ = print_ppm { minx = 0.0 ; maxx = 250.0 ; miny = 0.0 ; maxy = 250.0} (500,500) (image_lueur (125.0,125.0)) ;;
let _ = print_ppm { minx = 0.0 ; maxx = 250.0 ; miny = 0.0 ; maxy = 250.0} (500,500) bb;;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment