From 1d81d6c163bad6ffe2914ee7e7cc71bb25cb5181 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Tue, 28 Jul 2009 11:55:18 +0200 Subject: Added QVectorPath::convertToPainterPath() for future convenience --- src/gui/painting/qpaintengineex.cpp | 34 ++++++++++++++++++++++++++++++++++ src/gui/painting/qvectorpath_p.h | 2 ++ 2 files changed, 36 insertions(+) diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp index 797a5ab..ce4f7fd 100644 --- a/src/gui/painting/qpaintengineex.cpp +++ b/src/gui/painting/qpaintengineex.cpp @@ -91,6 +91,40 @@ QRectF QVectorPath::controlPointRect() const return QRectF(QPointF(m_cp_rect.x1, m_cp_rect.y1), QPointF(m_cp_rect.x2, m_cp_rect.y2)); } +QPainterPath QVectorPath::convertToPainterPath() const +{ + QPainterPath path; + + if (m_count == 0) + return path; + + const QPointF *points = (const QPointF *) m_points; + + if (m_elements) { + for (int i=0; i