BlinkenArea - GitList
Repositories
Blog
Wiki
libetherpix
Code
Commits
Branches
Tags
Search
Tree:
5bca604
Branches
Tags
master
libetherpix
simulator
pixel.h
implement drawing pixels
Stefan Schuermans
commited
5bca604
at 2017-06-10 23:09:20
pixel.h
Blame
History
Raw
/* * EtherPix simulator * * Copyright 2017 Stefan Schuermans <stefan schuermans info> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, version 3 of the License. * * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef PIXEL_H #define PIXEL_H #include <gtkmm.h> #include "bbox.h" #include "transform.h" /// a simulated pixel class Pixel { public: /// default constructor Pixel(); /// constructor based on coordinates and radius Pixel(double x, double y, double r); /** * @brief add pixel to the bounding box * @param[in,out] bb bounding box */ void updateBBox(BBox &bb) const; /** * @brief draw pixel * @param[in] cairo cairo context for drawing * @param[in] tf coordinate transformation */ void draw(Cairo::RefPtr<Cairo::Context> &cairo, Transform const &tf) const; protected: /// parameters of pixel //@{ double m_x; ///< x coordinate double m_y; ///< y coordinate double m_r; ///< radius //@} }; #endif // #ifndef PIXEL_H