centered on the data point's X-coordinate, and slightly below the data
point in Y. This is useful for (and in fact assumes that one is) plotting
the labels next to KPlotObject::POINT items that have the same
coordinates. (This change was implemented in order to add planet labels
to the solar system plotter in KStars).
TODO: make the vertical offset adjustable. Should be zero by default.
(have to wait for after 3.2)
svn path=/trunk/kdeedu/libkdeedu/; revision=251365
break;
}
- case KPlotObject::LABEL :
+ case KPlotObject::LABEL : //draw label centered at point in x, and slightly below point in y.
{
QPoint q = po->points()->first()->qpoint( PixRect, DataRect );
- p->drawText( q, po->name() );
+ p->drawText( q.x()-20, q.y()+6, 40, 10, Qt::AlignCenter | Qt::DontClip, po->name() );
break;
}