2013-03-26 09:51:32 +01:00
|
|
|
#ifndef QTPOLYRASTERIZER_H
|
|
|
|
#define QTPOLYRASTERIZER_H
|
|
|
|
|
|
|
|
#include <QImage>
|
2013-04-03 16:26:30 +02:00
|
|
|
//#include <QSvgGenerator>
|
2013-03-26 09:51:32 +01:00
|
|
|
#include <QPainter>
|
|
|
|
#include <vcg/space/point2.h>
|
|
|
|
#include <vcg/space/color4.h>
|
|
|
|
#include <vcg/space/box2.h>
|
|
|
|
#include <vcg/math/similarity2.h>
|
2013-03-26 12:22:27 +01:00
|
|
|
#include <vcg/space/rasterized_outline2_packer.h>
|
2013-03-26 09:51:32 +01:00
|
|
|
|
|
|
|
///this class is used to draw polygons on an image could be vectorial or not
|
2013-03-26 12:22:27 +01:00
|
|
|
class QtOutline2Rasterizer
|
2013-03-26 09:51:32 +01:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
static void rasterize(vcg::RasterizedOutline2 &poly,
|
|
|
|
float scaleFactor,
|
|
|
|
int rast_i, int rotationNum, int cellSize);
|
|
|
|
|
|
|
|
static std::vector<std::vector<int> > rotateGridCWise(std::vector< std::vector<int> >& inGrid);
|
|
|
|
|
|
|
|
};
|
|
|
|
#endif // QTPOLYRASTERIZER_H
|