#include "qpaintengine.h"
#include "qpaintengine_p.h"
#include "qpainter_p.h"
#include "qpolygon.h"
#include "qbitmap.h"
#include "qapplication.h"
#include <qdebug.h>
#include <private/qtextengine_p.h>
#include <qvarlengtharray.h>
#include <math.h>
#include <private/qfontengine_p.h>
Include dependency graph for qpaintengine.cpp:

Go to the source code of this file.
Classes | |
| struct | QT_Point |
| struct | QT_PointF |
Functions | |
| void | qt_fill_tile (QPixmap *tile, const QPixmap &pixmap) |
| void | qt_draw_tile (QPaintEngine *gc, qreal x, qreal y, qreal w, qreal h, const QPixmap &pixmap, qreal xOffset, qreal yOffset) |
Variables | |
| static int | qt_polygon_recursion |
| void qt_draw_tile | ( | QPaintEngine * | gc, | |
| qreal | x, | |||
| qreal | y, | |||
| qreal | w, | |||
| qreal | h, | |||
| const QPixmap & | pixmap, | |||
| qreal | xOffset, | |||
| qreal | yOffset | |||
| ) |
Definition at line 436 of file qpaintengine.cpp.
References QPaintEngine::drawPixmap(), QPixmap::height(), and QPixmap::width().
Referenced by QPaintEngine::drawTiledPixmap(), and QX11PaintEngine::drawTiledPixmap().
00438 { 00439 qreal yPos, xPos, drawH, drawW, yOff, xOff; 00440 yPos = y; 00441 yOff = yOffset; 00442 while(yPos < y + h) { 00443 drawH = pixmap.height() - yOff; // Cropping first row 00444 if (yPos + drawH > y + h) // Cropping last row 00445 drawH = y + h - yPos; 00446 xPos = x; 00447 xOff = xOffset; 00448 while(xPos < x + w) { 00449 drawW = pixmap.width() - xOff; // Cropping first column 00450 if (xPos + drawW > x + w) // Cropping last column 00451 drawW = x + w - xPos; 00452 if (drawW > 0 && drawH > 0) 00453 gc->drawPixmap(QRectF(xPos, yPos, drawW, drawH), pixmap, QRectF(xOff, yOff, drawW, drawH)); 00454 xPos += drawW; 00455 xOff = 0; 00456 } 00457 yPos += drawH; 00458 yOff = 0; 00459 } 00460 }
Here is the call graph for this function:

Definition at line 420 of file qpaintengine.cpp.
References QPixmap::height(), height, p, QPixmap::width(), width, x, and y.
Referenced by QPaintEngine::drawTiledPixmap().
00421 { 00422 QPainter p(tile); 00423 p.drawPixmap(0, 0, pixmap); 00424 int x = pixmap.width(); 00425 while (x < tile->width()) { 00426 p.drawPixmap(x, 0, *tile, 0, 0, x, pixmap.height()); 00427 x *= 2; 00428 } 00429 int y = pixmap.height(); 00430 while (y < tile->height()) { 00431 p.drawPixmap(0, y, *tile, 0, 0, tile->width(), y); 00432 y *= 2; 00433 } 00434 }
Here is the call graph for this function:

int qt_polygon_recursion [static] |
1.5.1