8 #include <QtGui/qpainter.h>
13 :
DrawItem(posX, posY, groupNr, color)
21 float factor_x = ((float)target.width())/source.width();
22 float factor_y = ((float)target.height())/source.height();
24 painter->drawLine(factor_x*
posX+target.x(),
25 posY*factor_y+target.y(),
26 target.x()+factor_x*endX,
27 target.y()+factor_y*endY);
33 float factor_x = ((float)target.width())/source.width();
34 float factor_y = ((float)target.height())/source.height();
37 glVertex3f(factor_x*
posX+target.x(), widget.height()-(
posY*factor_y+target.y()), 0.0f);
38 glVertex3f(target.x()+factor_x*endX, widget.height()-(target.y()+factor_y*endY), 0.0f);
void addPenStyle(QPainter *painter)
void draw(QPainter *painter, QRectF &source, QRectF &target)
LineItem(int posX, int posY, int groupNr, const QColor &color, int endX, int endY)
void renderOnGl(QGLWidget &widget, QRectF &source, QRectF &target)