Skip to content
Snippets Groups Projects
Commit df21e7ac authored by Jean-Marc's avatar Jean-Marc
Browse files

modifs v12

parent 366c5c06
No related branches found
No related tags found
No related merge requests found
Pipeline #188900 failed
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
......@@ -12,7 +12,7 @@ Image::Image()
dimy = 0;
}
Image::Image(int x, int y)
Image::Image(unsigned int x, unsigned int y)
{
assert (x>0 && y>0);
......@@ -30,14 +30,14 @@ Image::~Image()
}
Pixel & Image::getPix(int x, int y) const
Pixel & Image::getPix(unsigned int x, unsigned int y) const
{
assert (x>=0 && y>=0);
return tab[y*dimx+x];;
}
Pixel Image::getPix2(int x, int y) const
Pixel Image::getPix2(unsigned int x, unsigned int y) const
{
assert (x>=0 && y>=0);
......@@ -46,14 +46,14 @@ Pixel Image::getPix2(int x, int y) const
return ret;
}
void Image::setPix(int x, int y, Pixel couleur)
void Image::setPix(unsigned int x, unsigned int y, Pixel couleur)
{
tab[y*dimx+x] = couleur;
}
void Image::dessinerRectangle(int Xmin, int Ymin, int Xmax, int Ymax, Pixel couleur)
void Image::dessinerRectangle(unsigned Xmin, unsigned int Ymin, unsigned int Xmax, unsigned int Ymax, Pixel couleur)
{
int i,j;
unsigned i,j;
for(i=Xmin;i<Xmax;i++)
{
......
......@@ -19,7 +19,7 @@ ImageViewer::ImageViewer()
{
m_surface = nullptr;
m_texture = nullptr;
m_hasChanged = false;
//m_hasChanged = false;
// Initialisation de la SDL
cout << "SDL: init" << endl;
......@@ -74,7 +74,7 @@ ImageViewer::~ImageViewer()
{
m_surface = nullptr;
m_texture = nullptr;
m_hasChanged = false;
// m_hasChanged = false;
TTF_Quit();
SDL_FreeSurface(m_surface);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment