image_drawable.hpp

Go to the documentation of this file.
00001 /*
00002 **    TP 4ETI CPE Lyon
00003 **    Copyright (C) 2011 Damien Rohmer
00004 **
00005 **    This program is free software: you can redistribute it and/or modify
00006 **    it under the terms of the GNU General Public License as published by
00007 **    the Free Software Foundation, either version 3 of the License, or
00008 **    (at your option) any later version.
00009 **
00010 **   This program is distributed in the hope that it will be useful,
00011 **    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 **    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 **    GNU General Public License for more details.
00014 **
00015 **    You should have received a copy of the GNU General Public License
00016 **    along with this program.  If not, see <http://www.gnu.org/licenses/>.
00017 */
00018 
00019 
00020 #ifndef _BRESENHAM_HPP_
00021 #define _BRESENHAM_HPP_
00022 
00023 
00024 #include <image.hpp>
00025 #include <p2d.hpp>
00026 #include <color.hpp>
00027 #include <algorithm.hpp>
00028 
00029 #include <map>
00030 #include <cmath>
00031 
00032 namespace cpe
00033 {
00034 
00035 
00037     class image_drawable : public image
00038     {
00039     public:
00040 
00041         // ********************************************* //
00042         // ********************************************* //
00043         //  CONSTRUCTORS
00044         // ********************************************* //
00045         // ********************************************* //
00046 
00048         image_drawable();
00052         image_drawable(const unsigned int& N);
00057         image_drawable(const unsigned int& Nx,const unsigned int& Ny);
00061         image_drawable(const std::string& filename);
00062 
00063 
00064         // ********************************************* //
00065         // ********************************************* //
00066         //  DRAWING FUNCTIONS
00067         // ********************************************* //
00068         // ********************************************* //
00069 
00071         void line(const p2d& u1,const p2d& u2,const color& c=color(255,255,255));
00073         void line(const p2d& u1,const p2d& u2,const color& c1,const color& c2);
00074 
00076         void triangle(const p2d& u1,const p2d& u2,const p2d& u3,const color& c=color(255,255,255));
00078         void triangle(const p2d& u1,const p2d& u2,const p2d& u3,const color& c1,const color& c2,const color& c3);
00079 
00080 
00081 
00082     private:
00083 
00084 
00085     };
00086 
00087 
00088 
00089 }
00090 
00091 
00092 
00093 
00094 
00095 #endif
Generated on Mon Apr 18 20:43:30 2011 by  doxygen 1.6.3