Changeset 561 for trunk/src/gui/painting/qpolygon.cpp
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/gui/painting/qpolygon.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtGui module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 92 92 \reentrant 93 93 94 \ingroup multimedia94 \ingroup painting 95 95 \ingroup shared 96 96 … … 209 209 /*! 210 210 Translates all points in the polygon by (\a{dx}, \a{dy}). 211 212 \sa translated() 211 213 */ 212 214 213 215 void QPolygon::translate(int dx, int dy) 214 216 { 217 if (dx == 0 && dy == 0) 218 return; 219 215 220 register QPoint *p = data(); 216 221 register int i = size(); … … 227 232 228 233 Translates all points in the polygon by the given \a offset. 229 */ 230 234 235 \sa translated() 236 */ 237 238 /*! 239 Returns a copy of the polygon that is translated by (\a{dx}, \a{dy}). 240 241 \since 4.6 242 \sa translate() 243 */ 244 QPolygon QPolygon::translated(int dx, int dy) const 245 { 246 QPolygon copy(*this); 247 copy.translate(dx, dy); 248 return copy; 249 } 250 251 /*! 252 \fn void QPolygon::translated(const QPoint &offset) const 253 \overload 254 \since 4.6 255 256 Returns a copy of the polygon that is translated by the given \a offset. 257 258 \sa translate() 259 */ 231 260 232 261 /*! … … 461 490 462 491 \reentrant 463 \ingroup multimedia492 \ingroup painting 464 493 \ingroup shared 465 494 … … 566 595 /*! 567 596 Translate all points in the polygon by the given \a offset. 597 598 \sa translated() 568 599 */ 569 600 570 601 void QPolygonF::translate(const QPointF &offset) 571 602 { 603 if (offset.isNull()) 604 return; 605 572 606 register QPointF *p = data(); 573 607 register int i = size(); … … 583 617 584 618 Translates all points in the polygon by (\a{dx}, \a{dy}). 619 620 \sa translated() 621 */ 622 623 /*! 624 Returns a copy of the polygon that is translated by the given \a offset. 625 626 \since 4.6 627 \sa translate() 628 */ 629 QPolygonF QPolygonF::translated(const QPointF &offset) const 630 { 631 QPolygonF copy(*this); 632 copy.translate(offset); 633 return copy; 634 } 635 636 /*! 637 \fn void QPolygonF::translated(qreal dx, qreal dy) const 638 \overload 639 \since 4.6 640 641 Returns a copy of the polygon that is translated by (\a{dx}, \a{dy}). 642 643 \sa translate() 585 644 */ 586 645 … … 684 743 return s >> v; 685 744 } 686 #endif 745 #endif // QT_NO_DATASTREAM 687 746 688 747 /*****************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.