1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
8 ** |
8 ** |
223 } |
223 } |
224 |
224 |
225 controlPointRect = boundingRect(elements, element_count); |
225 controlPointRect = boundingRect(elements, element_count); |
226 |
226 |
227 #ifdef QT_DEBUG_CONVERT |
227 #ifdef QT_DEBUG_CONVERT |
228 printf(" - control point rect (%.2f, %.2f) %.2f x %.2f\n", |
228 printf(" - control point rect (%.2f, %.2f) %.2f x %.2f, clip=(%d,%d, %dx%d)\n", |
229 controlPointRect.x(), controlPointRect.y(), |
229 controlPointRect.x(), controlPointRect.y(), |
230 controlPointRect.width(), controlPointRect.height()); |
230 controlPointRect.width(), controlPointRect.height(), |
|
231 m_clip_rect.x(), m_clip_rect.y(), m_clip_rect.width(), m_clip_rect.height()); |
231 #endif |
232 #endif |
232 |
233 |
233 |
234 |
234 // Check for out of dev bounds... |
235 // Check for out of dev bounds... |
235 const bool do_clip = (controlPointRect.left() < -QT_RASTER_COORD_LIMIT |
236 const bool do_clip = (controlPointRect.left() < -QT_RASTER_COORD_LIMIT |
236 || controlPointRect.right() > QT_RASTER_COORD_LIMIT |
237 || controlPointRect.right() > QT_RASTER_COORD_LIMIT |
237 || controlPointRect.top() < -QT_RASTER_COORD_LIMIT |
238 || controlPointRect.top() < -QT_RASTER_COORD_LIMIT |
238 || controlPointRect.bottom() > QT_RASTER_COORD_LIMIT); |
239 || controlPointRect.bottom() > QT_RASTER_COORD_LIMIT |
|
240 || controlPointRect.width() > QT_RASTER_COORD_LIMIT |
|
241 || controlPointRect.height() > QT_RASTER_COORD_LIMIT); |
239 |
242 |
240 if (do_clip) { |
243 if (do_clip) { |
241 clipElements(elements, elementTypes(), element_count); |
244 clipElements(elements, elementTypes(), element_count); |
242 } else { |
245 } else { |
243 convertElements(elements, elementTypes(), element_count); |
246 convertElements(elements, elementTypes(), element_count); |