[Qt-interest] Using Qpainter/Qgraphics for a gps car-like
Gustavo B. Schenkel
gustavo.schenkel at gmail.com
Mon Mar 15 16:29:44 CET 2010
The problem is the points, they have too much numbers after the
dot, in the screen they show all in the same place.
Then i don't know if i need do some calculation to transform this
numbers to others.
i am sending my painter code. I am using the setWindow function
but i still don't know much about it.
void RenderArea::paintEvent(QPaintEvent * /* event */)
{
static const QPointF square[4] = {
QPointF(-29.683436, -53.800570),
QPointF(-29.683795, -53.799620),
QPointF(-29.684242, -53.800749),
QPointF(-29.684478, -53.799623)
};
QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing, true);
painter.setWindow(-33,-57, 10, 10);
painter.save();
painter.drawPolygon(square, 4);
painter.restore();
}
--
Schenkel, Gustavo B.
Qt/C++ Developer
More information about the Qt-interest-old
mailing list