[Qt-interest] How to Reach All The Points of a QPainterPath
hakiim the dream
hakiim35 at hotmail.com
Fri Apr 2 10:10:14 CEST 2010
Hello again,
In fact, I expect x and y
coordinates of path elements of the path handles my problem, too. But, they
cannot, or I miss something.
My real problem:
QPainterPath *path = new QPainterPath();
path->addEllipse(QRectF(*rect));
Then, I must get the points of this ellipse into
QList<QPointF>* pathPoints
But, using
QPointF pathPoint;
int count = path->elementCount();
for(int i=0;
i<count; i++)
{
pathPoint.setX(path->elementAt(i).x);
pathPoint.setY(path->elementAt(i).y);
pathPoints->append(pathPoint);
}
I see the ellipse has 13 elements, it means it gives me just
13 points. But I must draw the same ellipse using these points and
Void PainterPath::lineTo(qreal
x, qreal y).
Thanks.
Am 02.04.2010 07:35, schrieb hakiim the dream:
> If I consider your suggestion to use element, I think I can only have
> the elements of the path ( lineTo, moveTo,.. ), then how I can get
> points of them?
QPainterPath::Element does not only describe the element type (lineTo,
moveTo, ..), but also the x and y coordinates. Are the x and y
coordinates not what you are looking for?
_________________________________________________________________
Windows Live Hotmail: Arkadaşlarınız Facebook'taki güncellemelerinizi doğrudan Hotmail®'den alır.
http://www.microsoft.com/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:tr-tr:SI_SB_4:092009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100402/a140a47f/attachment.html
More information about the Qt-interest-old
mailing list