5bca604f0c06d7d3c0c8d746e2aabefb53d2bb43
Stefan Schuermans complete implementation of...

Stefan Schuermans authored 7 years ago

1) /*
2)  * EtherPix simulator
3)  *
4)  * Copyright 2017 Stefan Schuermans <stefan schuermans info>
5)  *
6)  * This program is free software: you can redistribute it and/or modify
7)  * it under the terms of the GNU General Public License as published by
8)  * the Free Software Foundation, version 3 of the License.
9)  *
10)  *
11)  * This program is distributed in the hope that it will be useful,
12)  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13)  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14)  * GNU General Public License for more details.
15)  *
16)  * You should have received a copy of the GNU Lesser General Public License
17)  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18)  */
19) 
20) #ifndef PIXEL_H
21) #define PIXEL_H
22) 
Stefan Schuermans implement drawing pixels

Stefan Schuermans authored 7 years ago

23) #include <gtkmm.h>
24) 
25) #include "bbox.h"
26) #include "transform.h"
27) 
Stefan Schuermans complete implementation of...

Stefan Schuermans authored 7 years ago

28) /// a simulated pixel
29) class Pixel
30) {
31) public:
32)   /// default constructor
33)   Pixel();
34) 
35)   /// constructor based on coordinates and radius
36)   Pixel(double x, double y, double r);
37) 
Stefan Schuermans implement drawing pixels

Stefan Schuermans authored 7 years ago

38)   /**
39)    * @brief add pixel to the bounding box
40)    * @param[in,out] bb bounding box
41)    */
42)   void updateBBox(BBox &bb) const;
43) 
44)   /**
45)    * @brief draw pixel
46)    * @param[in] cairo cairo context for drawing
47)    * @param[in] tf coordinate transformation
48)    */
49)   void draw(Cairo::RefPtr<Cairo::Context> &cairo, Transform const &tf) const;
50)