44 #ifndef QT_NO_QWS_DIRECTFB 54 #include <private/qpixmapdata_p.h> 55 #include <private/qpixmap_raster_p.h> 56 #include <private/qimagepixmapcleanuphooks_p.h> 78 int ret = transform.
type();
79 if (transform.
m11() < 0)
81 if (transform.
m22() < 0)
119 #ifdef QT_DIRECTFB_IMAGECACHE 166 #ifdef QT_DIRECTFB_IMAGECACHE 168 #include <private/qimage_p.h> 183 #define VOID_ARG() static_cast<bool>(false) 210 #ifdef QT_DIRECTFB_WARN_ON_RASTERFALLBACKS 211 if (op & QT_DIRECTFB_WARN_ON_RASTERFALLBACKS)
214 #ifdef QT_DIRECTFB_DISABLE_RASTERFALLBACKS 215 if (op & QT_DIRECTFB_DISABLE_RASTERFALLBACKS)
218 static int warningMask = -1;
219 static int disableMask = -1;
220 if (warningMask < 0) {
224 }
const operations[] = {
251 for (
int i=0; operations[i].name; ++i) {
253 int idx = warning.
indexOf(name);
255 warningMask |= operations[i].operation;
260 disableMask |= operations[i].operation;
266 qWarning(
"QDirectFBPaintEngine QT_DIRECTFB_WARN_ON_RASTERFALLBACKS Unknown operation(s): %s",
270 qWarning(
"QDirectFBPaintEngine QT_DIRECTFB_DISABLE_RASTERFALLBACKS Unknown operation(s): %s",
274 if (op & warningMask)
276 if (op & disableMask)
281 template <
typename device,
typename T1,
typename T2,
typename T3>
284 const char *nameOne,
const T1 &one,
285 const char *nameTwo,
const T2 &two,
286 const char *nameThree,
const T3 &three);
288 #define RASTERFALLBACK(op, one, two, three) \ 290 static const uint rasterFallbacks = rasterFallbacksMask(op); \ 291 switch (rasterFallbacks) { \ 294 rasterFallbackWarn("Falling back to raster engine for", \ 296 state()->painter->device(), \ 298 #one, one, #two, two, #three, three); \ 300 case RasterDisable|RasterWarn: \ 301 rasterFallbackWarn("Disabled raster engine operation", \ 303 state()->painter->device(), \ 305 #one, one, #two, two, #three, three); \ 306 case RasterDisable: \ 320 #define CLIPPED_PAINT(operation) { \ 322 DFBRegion clipRegion; \ 323 switch (d->clipType) { \ 324 case QDirectFBPaintEnginePrivate::NoClip: \ 325 case QDirectFBPaintEnginePrivate::RectClip: \ 328 case QDirectFBPaintEnginePrivate::RegionClip: { \ 329 Q_ASSERT(d->clip()); \ 330 const QVector<QRect> cr = d->clip()->clipRegion.rects(); \ 331 const int size = cr.size(); \ 332 for (int i=0; i<size; ++i) { \ 333 d->currentClip = cr.at(i); \ 334 clipRegion.x1 = d->currentClip.x(); \ 335 clipRegion.y1 = d->currentClip.y(); \ 336 clipRegion.x2 = d->currentClip.right(); \ 337 clipRegion.y2 = d->currentClip.bottom(); \ 338 d->surface->SetClip(d->surface, &clipRegion); \ 343 case QDirectFBPaintEnginePrivate::ComplexClip: \ 344 case QDirectFBPaintEnginePrivate::ClipUnset: \ 345 qFatal("CLIPPED_PAINT internal error %d", d->clipType); \ 374 d->surface =
d->dfbDevice->directFBSurface();
377 qFatal(
"QDirectFBPaintEngine used on an invalid device: 0x%x",
382 d->prepare(
d->dfbDevice);
384 d->setCompositionMode(
state()->composition_mode);
394 #if (Q_DIRECTFB_VERSION >= 0x010000) 395 d->surface->ReleaseSource(
d->surface);
398 d->surface->SetClip(
d->surface, NULL);
413 d->setBrush(
state()->brush);
436 d->setCompositionMode(
state()->compositionMode());
443 d->setRenderHints(
state()->renderHints);
450 d->setTransform(
state()->matrix);
458 d->setPen(state->
pen);
470 const bool wasInClip =
d->inClip;
482 const bool wasInClip =
d->inClip;
494 const bool wasInClip =
d->inClip;
514 || !
d->supportedBrush
515 || !
d->supportedComposition) {
542 || !
d->supportedBrush
543 || !
d->supportedComposition) {
566 || !
d->supportedComposition) {
585 || !
d->supportedComposition) {
599 Qt::ImageConversionFlags
flags)
621 #if !defined QT_NO_DIRECTFB_PREALLOCATED || defined QT_DIRECTFB_IMAGECACHE 622 if (!
d->supportedComposition
626 #ifndef QT_DIRECTFB_IMAGECACHE
628 #elif defined QT_NO_DIRECTFB_PREALLOCATED 629 || (QDirectFBPaintEnginePrivate::cacheCost(image) > imageCache.
maxCost())
639 #if !defined QT_NO_DIRECTFB_PREALLOCATED || defined QT_DIRECTFB_IMAGECACHE 641 IDirectFBSurface *imgSurface =
d->getSurface(image, &release);
647 d->prepareForBlit(blitFlags);
650 #if (Q_DIRECTFB_VERSION >= 0x010000) 651 d->surface->ReleaseSource(
d->surface);
653 imgSurface->Release(imgSurface);
676 if (!
d->supportedComposition
681 const QImage *img = dfbData->buffer();
686 IDirectFBSurface *s = dfbData->directFBSurface();
693 d->prepareForBlit(blitFlags);
713 }
else if (!
d->supportedComposition
721 const QImage *img = dfbData->buffer();
757 || !
d->supportedComposition) {
776 || !
d->supportedComposition) {
837 if (points[1] == points[3]
838 && points[2] == points[4]
839 && points[5] == points[7]
840 && points[6] == points[0]) {
841 QRectF rect( points[0], points[1], points[4], points[5] );
877 switch (brush.
style()) {
884 || !
d->supportedComposition) {
887 if (
d->prepareForDraw(color)) {
897 transform.
translate(brushOrigin.
x(), brushOrigin.
y());
898 transform = brush.
transform() * transform;
899 if (!
d->supportedComposition
901 || (!
d->supportsStretchBlit() && transform.
isScaling())) {
927 || !
d->supportedComposition) {
931 }
else if (
d->prepareForDraw(color)) {
938 int x,
int y,
int length,
942 IDirectFBSurface *src =
d->surfaceCache->getSurface(buffer, bufsize);
944 src->SetColor(src, 0, 0, 0, const_alpha);
945 const DFBRectangle rect = { 0, 0, length, 1 };
946 d->surface->Blit(
d->surface, src, &rect, x, y);
949 #ifdef QT_DIRECTFB_IMAGECACHE 950 static void cachedImageCleanupHook(
qint64 key)
952 delete imageCache.
take(key);
961 #endif // QT_DIRECTFB_IMAGECACHE 966 : surface(0), antialiased(false), supportedBrush(false), supportedPen(false),
967 transformationType(0), opacity(255),
969 supportedComposition(false), isPremultiplied(false), inClip(false), engine(p)
994 #ifdef QT_DIRECTFB_SUBSURFACE 1003 #ifdef QT_NO_DIRECTFB_SUBSURFACE 1021 static const bool forceRasterFallBack =
qgetenv(
"QT_DIRECTFB_FORCE_RASTER").
toInt() > 0;
1022 if (forceRasterFallBack) {
1057 #if (Q_DIRECTFB_VERSION >= 0x010000) 1109 DFBSurfaceBlittingFlags blittingFlags = DSBLIT_NOFX;
1111 #if (Q_DIRECTFB_VERSION >= 0x010403) 1113 blittingFlags |= DSBLIT_FLIP_HORIZONTAL;
1116 blittingFlags |= DSBLIT_FLIP_VERTICAL;
1120 blittingFlags |= DSBLIT_BLEND_ALPHACHANNEL;
1123 blittingFlags |= DSBLIT_BLEND_COLORALPHA;
1128 if (blittingFlags & DSBLIT_BLEND_COLORALPHA)
1129 blittingFlags |= DSBLIT_SRC_PREMULTCOLOR;
1131 if (blittingFlags & (DSBLIT_BLEND_ALPHACHANNEL | DSBLIT_BLEND_COLORALPHA))
1132 blittingFlags |= DSBLIT_SRC_PREMULTIPLY;
1141 t = ((t + (t >> 8) + 0x80) >> 8) & 0xff;
1180 surface->SetDrawingFlags(
surface, blend ? DSDRAW_BLEND : DSDRAW_NOFX);
1187 #ifdef QT_NO_DIRECTFB_IMAGECACHE 1194 return imageCache[
key]->surface;
1197 const int cost = cacheCost(img);
1198 const bool cache = cost <= imageCache.
maxCost();
1208 CachedImage *cachedImage =
new CachedImage;
1210 cachedImage->surface =
surface;
1211 imageCache.
insert(key, cachedImage, cost);
1226 const DFBRectangle sRect = { sr.
x(), sr.
y(), sr.
width(), sr.
height() };
1233 const DFBRectangle dRect = { dr.
x(), dr.
y(), dr.
width(), dr.
height() };
1236 if (result != DFB_OK)
1237 DirectFBError(
"QDirectFBPaintEngine::drawPixmap()", result);
1242 qreal pos = rect_pos - offset;
1243 while (pos > rect_pos)
1245 while (pos + pixmapSize < rect_pos)
1257 QRect newClip = destinationRect;
1264 const DFBRegion
clip = {
1279 if (dfbData->hasAlphaChannel())
1285 const QSize pixmapSize = dfbData->size();
1289 offset.
rx() *= transform.
m11();
1290 offset.
ry() *= transform.
m22();
1292 const QSizeF mappedSize(pixmapSize.
width() * pixmapTransform.
m11(), pixmapSize.
height() * pixmapTransform.
m22());
1293 qreal y =
fixCoord(destinationRect.
y(), mappedSize.height(), offset.
y());
1294 const qreal startX =
fixCoord(destinationRect.
x(), mappedSize.width(), offset.
x());
1295 while (y <= destinationRect.
bottom()) {
1297 while (x <= destinationRect.
right()) {
1298 const DFBRectangle destination = {
qRound(x),
qRound(y), mappedSize.width(), mappedSize.height() };
1300 x += mappedSize.width();
1302 y += mappedSize.height();
1307 int horizontal =
qMax(1, destinationRect.
width() / pixmapSize.
width()) + 1;
1308 if (startX != destinationRect.
x())
1310 int vertical =
qMax(1, destinationRect.
height() / pixmapSize.
height()) + 1;
1311 if (y != destinationRect.
y())
1314 const int maxCount = (vertical * horizontal);
1319 while (y <= destinationRect.
bottom()) {
1322 while (x <= destinationRect.
right()) {
1325 sourceRects[i].x = 0;
1326 sourceRects[i].y = 0;
1327 sourceRects[i].w = int(pixmapSize.
width());
1328 sourceRects[i].h = int(pixmapSize.
height());
1329 x += pixmapSize.
width();
1332 y += pixmapSize.
height();
1340 const DFBRegion clip = {
1355 if (!clipData || !clipData->
enabled) {
1359 const DFBRegion r = {
1378 #ifdef QT_DIRECTFB_STRETCHBLIT 1379 DFBGraphicsDeviceDescription desc;
1381 fb->GetDeviceDescription(
fb, &desc);
1384 || (desc.acceleration_mask & DFXL_STRETCHBLIT);
1399 if (buffer == buf && bufsize == size)
1407 qWarning(
"QDirectFBPaintEngine: SurfaceCache: Unable to create surface");
1409 buffer =
const_cast<uint*
>(buf);
1436 const QPoint p =
map(transform, points[0]);
1437 surface->FillRectangle(surface, p.
x(), p.
y(), 1, 1);
1440 for (
int i=0; i<n; ++i) {
1441 const QPoint p =
map(transform, points[i]);
1442 rectArray[i].x = p.
x();
1443 rectArray[i].y = p.
y();
1447 surface->FillRectangles(surface, rectArray.
constData(), n);
1455 const QLine l =
map(transform, lines[0]);
1456 surface->DrawLine(surface, l.
x1(), l.
y1(), l.
x2(), l.
y2());
1459 for (
int i=0; i<n; ++i) {
1460 const QLine l =
map(transform, lines[i]);
1461 lineArray[i].x1 = l.
x1();
1462 lineArray[i].y1 = l.
y1();
1463 lineArray[i].x2 = l.
x2();
1464 lineArray[i].y2 = l.
y2();
1466 surface->DrawLines(surface, lineArray.
constData(), n);
1474 const QRect r =
map(transform, rects[0]);
1475 surface->FillRectangle(surface, r.
x(), r.
y(), r.
width(), r.
height());
1478 for (
int i=0; i<n; ++i) {
1479 const QRect r =
map(transform, rects[i]);
1480 rectArray[i].x = r.
x();
1481 rectArray[i].y = r.
y();
1482 rectArray[i].w = r.
width();
1483 rectArray[i].h = r.
height();
1485 surface->FillRectangles(surface, rectArray.
constData(), n);
1492 for (
int i=0; i<n; ++i) {
1493 const QRect r =
map(transform, rects[i]);
1494 surface->DrawRectangle(surface, r.
x(), r.
y(), r.
width(), r.
height());
1498 template <
typename T>
inline const T *
ptr(
const T &t) {
return &t; }
1499 template <>
inline const bool*
ptr<bool>(
const bool &) {
return 0; }
1500 template <
typename device,
typename T1,
typename T2,
typename T3>
1503 const char *nameOne,
const T1 &one,
1504 const char *nameTwo,
const T2 &two,
1505 const char *nameThree,
const T3 &three)
1514 dbg << msg << (
QByteArray(func) +
"()") <<
"painting on";
1516 dbg << static_cast<const QWidget*>(dev);
1518 dbg << dev <<
"of type" << dev->devType();
1542 dbg <<
"gradient: " << *gradient;
1543 dbg <<
"stops: " << stops.
count();
1546 for (
int i=0; i<stops.
count(); i++) {
1547 dbg << stops[i].
first << stops[i].second;
1571 const T1 *t1 =
ptr(one);
1572 const T2 *t2 =
ptr(two);
1573 const T3 *t3 =
ptr(three);
1576 dbg << nameOne << *t1;
1578 dbg << nameTwo << *t2;
1580 dbg << nameThree << *t3;
1589 #endif // QT_NO_QWS_DIRECTFB ElementType type
the type of element
The QDebug class provides an output stream for debugging information.
The QColor class provides colors based on RGB, HSV or CMYK values.
const T * constData() const
IDirectFBSurface * surface
static DFBSurfaceDescription getSurfaceDescription(const uint *buffer, int length)
Format
The following image formats are available in Qt.
virtual void renderHintsChanged()
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
bool isNull() const
Returns true if the rectangle is a null rectangle, otherwise returns false.
void setBrush(const QBrush &brush)
IDirectFBSurface * createDFBSurface(const QImage &image, QImage::Format format, SurfaceCreationOptions options, DFBResult *result=0)
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
virtual bool end()
Reimplemented Function
#define QT_END_NAMESPACE
This macro expands to.
const QColor & color() const
Returns the brush color.
QSize size() const
Returns the size of the pixmap.
virtual void penChanged()
virtual void drawPath(const QPainterPath &path)
The default implementation ignores the path and does nothing.
virtual void systemStateChanged()
QRasterPaintEngineState * state()
CompositionMode
Defines the modes supported for digital image compositing.
The QLine class provides a two-dimensional vector using integer precision.
QPainter::RenderHints renderHints
const QGradient * gradient() const
Returns the gradient describing this brush.
static void initImageCache(int size)
QPainter::CompositionMode composition_mode
PaintEngineFeatures gccaps
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
int count(const T &t) const
Returns the number of occurrences of value in the vector.
static bool isPremultiplied(QImage::Format format)
ClipType clipType() const
Returns the type of the clip currently set.
Qt::PenStyle style() const
Returns the pen style.
void releaseDFBSurface(IDirectFBSurface *surface)
T & first()
Returns a reference to the first item in the vector.
The QByteArray class provides an array of bytes.
void drawLines(const QLine *line, int lineCount)
Reimplemented Function
QTransform transform() const
Returns the matrix in the current paint engine state.
virtual void fillRect(const QRectF &r, const QBrush &brush)
Reimplemented Function
QString toUpper() const Q_REQUIRED_RESULT
Returns an uppercase copy of the string.
The QPointF class defines a point in the plane using floating point precision.
void drawEllipse(const QRectF &rect)
Reimplemented Function
virtual void drawPixmap(const QPointF &p, const QPixmap &pm)
QRect normalized() const
Returns a normalized rectangle; i.e., a rectangle that has a non-negative width and height...
static void clear(QVariant::Private *d)
iterator begin()
Returns an STL-style iterator pointing to the first item in the list.
bool begin(QPaintDevice *device)
Reimplemented Function
QPointF topLeft() const
Returns the position of the rectangle's top-left corner.
QColor color() const
Returns the color of this pen's brush.
int width() const
Returns the width of the rectangle.
void drawTiledPixmap(const QRectF &r, const QPixmap &pm, const QPointF &sr)
Reimplemented Function
virtual void setState(QPainterState *state)
virtual void drawPath(const QPainterPath &path)
The default implementation ignores the path and does nothing.
void setRenderHints(QPainter::RenderHints hints)
virtual uint flags() const
void drawTiledPixmap(const QRectF &dest, const QPixmap &pixmap, const QPointF &pos, const QTransform &pixmapTransform)
#define QT_END_INCLUDE_NAMESPACE
This macro is equivalent to QT_BEGIN_NAMESPACE.
virtual void fill(const QVectorPath &path, const QBrush &brush)
bool hasAlphaChannel() const
Returns true if the image has a format that respects the alpha channel, otherwise returns false...
long ASN1_INTEGER_get ASN1_INTEGER * a
void setTransform(const QTransform &transforma)
ushort red
Returns the red color component of this color.
int height() const
Returns the height of the rectangle.
virtual bool begin(QPaintDevice *device)
Reimplemented Function
QImage::Format alphaPixmapFormat() const
int bottom() const
Returns the y-coordinate of the rectangle's bottom edge.
The QString class provides a Unicode character string.
static IDirectFBSurface * getSurface(const QImage &img, bool *release)
QRect rect() const
Returns the enclosing rectangle (0, 0, width(), height()) of the image.
QString text() const
Returns the text that should be drawn.
QDirectFBPaintEnginePrivate(QDirectFBPaintEngine *p)
QTransform transform() const
Returns the current transformation matrix for the brush.
The QPen class defines how a QPainter should draw lines and outlines of shapes.
virtual int devType() const
The QSizeF class defines the size of a two-dimensional object using floating point precision...
QDirectFBPaintDevice * dfbDevice
int y1() const
Returns the y-coordinate of the line's start point.
bool end()
Reimplemented Function
const QPainterPath::Element & elementAt(int i) const
Returns the element at the given index in the painter path.
Format format() const
Returns the format of the image.
void compositionModeChanged()
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
void renderHintsChanged()
virtual void drawRects(const QRect *rects, int rectCount)
Reimplemented Function
void drawRects(const QRect *rects, int rectCount)
Reimplemented Function
virtual void drawPoints(const QPointF *points, int pointCount)
Reimplemented Function
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
qreal x() const
Returns the x-coordinate of this point.
The QLineF class provides a two-dimensional vector using floating point precision.
QGradientStops stops() const
Returns the stop points for this gradient.
void drawImage(const QPointF &p, const QImage &img)
virtual void drawRoundedRect(const QRectF &rect, qreal xrad, qreal yrad, Qt::SizeMode mode)
int width() const
Returns the width.
void setPen(const QPen &pen)
int indexOf(const QRegExp &rx, int from=0) const
Returns the index position of the first exact match of rx in the list, searching forward from index p...
#define QT_BEGIN_NAMESPACE
This macro expands to.
qreal & rx()
Returns a reference to the x coordinate of this point.
virtual void drawTiledPixmap(const QRectF &r, const QPixmap &pm, const QPointF &sr)
Reimplemented Function
The QRectF class defines a rectangle in the plane using floating point precision. ...
static uint rasterFallbacksMask(PaintOperation op)
virtual void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode)
Reimplemented Function
#define CLIPPED_PAINT(operation)
#define Q_DIRECTFB_VERSION
bool isCosmetic() const
Returns true if the pen is cosmetic; otherwise returns false.
void drawPoints(const QPointF *points, int pointCount)
Reimplemented Function
virtual void drawLines(const QLine *line, int lineCount)
Reimplemented Function
static void drawRects(const T *rects, int n, const QTransform &transform, IDirectFBSurface *surface)
virtual void stroke(const QVectorPath &path, const QPen &pen)
QDirectFBPaintEngine * engine
QSize size() const
Returns the size of the rectangle.
The QStringList class provides a list of strings.
static uint getTransformationType(const QTransform &transform)
#define QT_PREPEND_NAMESPACE(name)
This macro qualifies identifier with the full namespace.
void drawStaticTextItem(QStaticTextItem *textItem)
Reimplemented Function
Q_CORE_EXPORT void qWarning(const char *,...)
The QImage class provides a hardware-independent image representation that allows direct access to th...
int x2() const
Returns the x-coordinate of the line's end point.
QPainter::CompositionMode compositionMode() const
Returns the composition mode in the current paint engine state.
virtual void transformChanged()
static const char * data(const QByteArray &arr)
IDirectFBSurface * getSurface(const uint *buf, int size)
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
virtual void drawTextItem(const QPointF &p, const QTextItem &textItem)
Reimplemented Function
virtual void drawEllipse(const QRectF &rect)
Reimplemented Function
virtual void drawBufferSpan(const uint *buffer, int bufsize, int x, int y, int length, uint const_alpha)
Draws the given buffer.
The QRegion class specifies a clip region for a painter.
const T * ptr(const T &t)
void clip(const QVectorPath &path, Qt::ClipOperation op)
const bool * ptr< bool >(const bool &)
static DFBSurfacePixelFormat getSurfacePixelFormat(QImage::Format format)
QBrush brush() const
Returns the brush used to fill strokes generated with this pen.
int depth() const
Returns the depth of the image.
virtual void clip(const QVectorPath &path, Qt::ClipOperation op)
Qt::BrushStyle style() const
Returns the brush style.
QPixmap texture() const
Returns the custom brush pattern, or a null pixmap if no custom brush pattern has been set...
virtual void clipEnabledChanged()
QRect toRect() const
Returns a QRect based on the values of this rectangle.
void fill(const QVectorPath &path, const QBrush &brush)
const QPainterPath convertToPainterPath() const
void drawPixmap(const QPointF &p, const QPixmap &pm)
virtual void compositionModeChanged()
QSize size() const
Returns the size of the image, i.
virtual ~QDirectFBPaintEngine()
void setState(QPainterState *s)
bool supportsStretchBlit() const
bool insert(const Key &key, T *object, int cost=1)
bool supportedComposition
bool contains(const Key &key) const
bool isEmpty() const
Returns true if the rectangle is empty, otherwise returns false.
The QBrush class defines the fill pattern of shapes drawn by QPainter.
QString join(const QString &sep) const
Joins all the string list's strings into a single string with each element separated by the given sep...
#define RASTERFALLBACK(op, one, two, three)
Q_CORE_EXPORT void qFatal(const char *,...)
QDirectFBPaintEngine(QPaintDevice *device)
iterator erase(iterator pos)
Removes the item associated with the iterator pos from the list, and returns an iterator to the next ...
int width() const
Returns the width of the image.
void prepare(QCustomRasterPaintDevice *)
QString arg(qlonglong a, int fieldwidth=0, int base=10, const QChar &fillChar=QLatin1Char(' ')) const Q_REQUIRED_RESULT
~QDirectFBPaintEnginePrivate()
QImage::Format pixelFormat() const
Returns the pixel format of the screen, or QImage::Format_Invalid if the pixel format is not a suppor...
ushort blue
Returns the blue color component of this color.
int right() const
Returns the x-coordinate of the rectangle's right edge.
virtual void drawRoundedRect(const QRectF &rect, qreal xrad, qreal yrad, Qt::SizeMode mode)
ushort alpha
Returns the alpha color component of this color.
int y() const
Returns the y-coordinate of the rectangle's top edge.
The QGradient class is used in combination with QBrush to specify gradient fills. ...
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
void * data_ptr(const QTransform &t)
int x() const
Returns the x-coordinate of the rectangle's left edge.
int toInt(bool *ok=0, int base=10) const
Returns the byte array converted to an int using base base, which is 10 by default and must be betwee...
The QPoint class defines a point in the plane using integer precision.
void fillRect(const QRectF &rect, const QBrush &brush)
Reimplemented Function
const qreal * points() const
int height() const
Returns the height.
qreal widthF() const
Returns the pen width with floating point precision.
The QRect class defines a rectangle in the plane using integer precision.
const QClipData * clip() const
int height() const
Returns the height of the image.
QSizeF size() const
Returns the size of the rectangle.
qreal & ry()
Returns a reference to the y coordinate of this point.
SurfaceCache * surfaceCache
virtual void opacityChanged()
QRect rect() const
Returns the pixmap's enclosing rectangle.
int y() const
Returns the y coordinate of this point.
static void drawPoints(const T *points, int n, const QTransform &transform, IDirectFBSurface *surface)
void setCompositionMode(QPainter::CompositionMode mode)
void blit(const QRectF &dest, IDirectFBSurface *surface, const QRectF &src)
qreal y() const
Returns the y-coordinate of this point.
The QPixmap class is an off-screen image representation that can be used as a paint device...
#define QT_BEGIN_INCLUDE_NAMESPACE
This macro is equivalent to QT_END_NAMESPACE.
void systemStateChanged()
bool hasAlphaChannel() const
IDirectFBSurface * surface
static uint ALPHA_MUL(uint x, uint a)
void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode)
Reimplemented Function
The QSize class defines the size of a two-dimensional object using integer point precision.
void prepareForBlit(uint blitFlags)
static QDirectFBScreen * instance()
void drawTextItem(const QPointF &p, const QTextItem &textItem)
Reimplemented Function
QStringList split(const QString &sep, SplitBehavior behavior=KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const Q_REQUIRED_RESULT
Splits the string into substrings wherever sep occurs, and returns the list of those strings...
virtual void brushChanged()
virtual IDirectFBSurface * directFBSurface() const
int y2() const
Returns the y-coordinate of the line's end point.
int x() const
Returns the x coordinate of this point.
static void fillRects(const T *rects, int n, const QTransform &transform, IDirectFBSurface *surface)
The QRasterPaintEngine class enables hardware acceleration of painting operations in Qt for Embedded ...
bool isValid() const
Returns true if the color is valid; otherwise returns false.
void stroke(const QVectorPath &path, const QPen &pen)
static void drawLines(const T *lines, int n, const QTransform &transform, IDirectFBSurface *surface)
The QTextItem class provides all the information required to draw text in a custom paint engine...
static QRect map(const QTransform &transform, const QRect &rect)
static QImagePixmapCleanupHooks * instance()
bool hasAlphaChannel() const
Returns true if the pixmap has a format that respects the alpha channel, otherwise returns false...
int x1() const
Returns the x-coordinate of the line's start point.
bool lockSurface(DFBSurfaceLockFlags lockFlags)
#define qPrintable(string)
bool prepareForDraw(const QColor &color)
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
ushort green
Returns the green color component of this color.
void clipEnabledChanged()
static void rasterFallbackWarn(const char *msg, const char *func, const device *dev, QDirectFBPaintEnginePrivate *priv, const char *nameOne, const T1 &one, const char *nameTwo, const T2 &two, const char *nameThree, const T3 &three)
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
static qreal fixCoord(qreal rect_pos, qreal pixmapSize, qreal offset)
virtual void drawImage(const QPointF &p, const QImage &img)
Q_DECL_CONSTEXPR int qRound(qreal d)
qint64 cacheKey() const
Returns a number that identifies the contents of this QImage object.
virtual void drawStaticTextItem(QStaticTextItem *item)
Reimplemented Function
void fromImage(const QImage &image, Qt::ImageConversionFlags flags)
void addImageHook(_qt_image_cleanup_hook_64)
QPixmapData * pixmapData() const