image_drawable.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
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
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
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