Changeset 651 for trunk/src/gui/painting/qpainterpath_p.h
- Timestamp:
- Mar 8, 2010, 12:52:58 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.2 (added) merged: 650 /branches/vendor/nokia/qt/current merged: 649 /branches/vendor/nokia/qt/4.6.1 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/painting/qpainterpath_p.h
r561 r651 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 20 09Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 98 98 { 99 99 int ptsPos = 0; 100 bool isLines = true; 100 101 for (int i=0; i<path.size(); ++i) { 101 102 const QPainterPath::Element &e = path.at(i); … … 105 106 if (e.type == QPainterPath::CurveToElement) 106 107 flags |= QVectorPath::CurvedShapeMask; 108 109 // This is to check if the path contains only alternating lineTo/moveTo, 110 // in which case we can set the LinesHint in the path. MoveTo is 0 and 111 // LineTo is 1 so the i%2 gets us what we want cheaply. 112 isLines = isLines && e.type == (QPainterPath::ElementType) (i%2); 107 113 } 108 114 … … 112 118 flags |= QVectorPath::OddEvenFill; 113 119 114 if (!convex) 115 flags |= QVectorPath::NonConvexShapeMask; 120 if (isLines) 121 flags |= QVectorPath::LinesShapeMask; 122 else { 123 flags |= QVectorPath::AreaShapeMask; 124 if (!convex) 125 flags |= QVectorPath::NonConvexShapeMask; 126 } 127 116 128 } 117 129 QVarLengthArray<QPainterPath::ElementType> elements;
Note:
See TracChangeset
for help on using the changeset viewer.