-
Notifications
You must be signed in to change notification settings - Fork 0
/
Pixel.cs
55 lines (48 loc) · 1.39 KB
/
Pixel.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
using System;
namespace PSI
{
public class Pixel
{
public byte red;
public byte green;
public byte blue;
/// <summary>
/// Constructeur d'un Pixel
/// </summary>
/// <param name="red"> Composante rouge d'un pixel </param>
/// <param name="green"> Composante verte d'un pixel </param>
/// <param name="blue"> Composante bleue d'un pixel </param>
public Pixel(byte red, byte green, byte blue)
{
this.red = red;
this.green = green;
this.blue = blue;
}
/// <summary>
/// Représentation textuelle des composantes d'un Pixel
/// </summary>
/// <returns> Texte décrivant le Pixel </returns>
public string Ecrire()
{
Console.WriteLine("red : " + this.red);
Console.WriteLine("green : " + this.green);
Console.Write("blue : " + this.blue + "\n");
return " ";
}
public byte R
{
get { return this.red; }
set { this.red = value; }
}
public byte G
{
get { return this.green; }
set { this.green = value; }
}
public byte B
{
get { return this.blue; }
set { this.blue = value; }
}
}
}