42 #ifndef QPAINTENGINE_RASTER_P_H 43 #define QPAINTENGINE_RASTER_P_H 56 #include "private/qpaintengineex_p.h" 57 #include "QtGui/qpainterpath.h" 58 #include "private/qdatabuffer_p.h" 59 #include "private/qdrawhelper_p.h" 60 #include "private/qpaintengine_p.h" 61 #include "private/qrasterizer_p.h" 62 #include "private/qstroker_p.h" 63 #include "private/qpainter_p.h" 64 #include "private/qtextureglyphcache_p.h" 65 #include "private/qoutlinemapper_p.h" 148 void brushOriginChanged();
149 void opacityChanged();
150 void compositionModeChanged();
151 void renderHintsChanged();
152 void transformChanged();
153 void clipEnabledChanged();
165 void updatePen(
const QPen &
pen);
174 void drawEllipse(
const QRectF &rect);
210 QRect clipBoundingRect()
const;
212 #ifdef Q_NO_USING_KEYWORD 219 void releaseBuffer();
224 void saveBuffer(
const QString &s)
const;
235 void releaseDC(HDC hdc)
const;
238 void alphaPenBlt(
const void* src,
int bpl,
int depth,
int rx,
int ry,
int w,
int h);
242 QPoint coordinateOffset()
const;
244 #if defined(Q_WS_QWS) && !defined(QT_NO_RASTERCALLBACKS) 245 virtual void drawColorSpans(
const QSpan *spans,
int count,
uint color);
247 int x,
int y,
int length,
uint const_alpha);
249 bool supportsTransformations(
const QFontEngine *fontEngine)
const;
266 #if defined(Q_OS_SYMBIAN) && defined(QT_NO_FREETYPE) 268 #endif // Q_OS_SYMBIAN && QT_NO_FREETYPE 284 void updateOutlineMapper();
285 inline void ensureOutlineMapper();
309 int *dashIndex,
qreal *dashOffset,
bool *inDash);
349 #if defined (Q_WS_WIN) 351 #elif defined(Q_WS_MAC) 427 void appendSpan(
int x,
int length,
int y,
int coverage);
428 void appendSpans(
const QSpan *s,
int num);
433 void setClipRect(
const QRect &rect);
434 void setClipRegion(
const QRegion ®ion);
442 if (count == allocated) {
444 m_spans = (
QSpan *)realloc(m_spans, allocated*
sizeof(
QSpan));
446 m_spans[count].x = x;
447 m_spans[count].len = length;
448 m_spans[count].y = y;
449 m_spans[count].coverage = coverage;
457 if (count + num > allocated) {
460 }
while (count + num > allocated);
461 m_spans = (
QSpan *)realloc(m_spans, allocated*
sizeof(
QSpan));
463 memcpy(m_spans+count, s, num*
sizeof(
QSpan));
477 virtual void*
memory()
const {
return 0; }
483 virtual int bytesPerLine()
const;
515 void prepare(
int w,
int h);
516 void prepareBuffer(
int w,
int h);
518 void resetBuffer(
int val=0);
523 QImage bufferImage()
const;
526 void flushToARGBImage(
QImage *image)
const;
528 int width()
const {
return m_width; }
553 if (d_func()->outlinemapper_xform_dirty)
554 updateOutlineMapper();
559 if (q->state() && q->state()->clip && q->state()->clip->enabled)
560 return q->state()->clip;
561 return baseClip.data();
566 #endif // QPAINTENGINE_RASTER_P_H
The QColor class provides colors based on RGB, HSV or CMYK values.
void ensureBrush(const QBrush &brush)
QPaintEngine::DirtyFlags state() const
Returns a combination of flags identifying the set of properties that need to be updated when updatin...
QScopedPointer< QClipData > baseClip
Format
The following image formats are available in Qt.
static void callback(AuServer *, AuEventHandlerRec *, AuEvent *e, AuPointer p)
#define QT_END_NAMESPACE
This macro expands to.
QPointer< QWidget > widget
~QRasterPaintEngineState()
The QCustomRasterPaintDevice class is provided to activate hardware accelerated paint engines in Qt f...
QRasterPaintEngineState * state()
CompositionMode
Defines the modes supported for digital image compositing.
The QLine class provides a two-dimensional vector using integer precision.
QRect deviceRectUnclipped
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
Qt::PenStyle style() const
Returns the pen style.
bool qbrush_fast_equals(const QBrush &a, const QBrush &b)
uint isPlain45DegreeRotation
void updateMatrixData(QSpanData *spanData, const QBrush &brush, const QTransform &brushMatrix)
The QPointF class defines a point in the plane using floating point precision.
QT_FT_SpanFunc ProcessSpans
const QRasterPaintEngineState * state() const
QRasterPaintEngineState()
ProcessSpans getBrushFunc(const QRect &rect, const QSpanData *data) const
virtual QImage::Format format() const
Returns the format of the device's memory buffet.
QScopedPointer< QDashStroker > dashStroker
QScopedPointer< QRasterBuffer > rasterBuffer
static QImage colorizeBitmap(const QImage &image, const QColor &color)
The QString class provides a Unicode character string.
QMatrix matrix() const
Returns the matrix in the current paint engine state.
bool isUnclipped_normalized(const QRect &rect) const
Returns true if the rectangle is completely within the current clip state of the paint engine...
The QPen class defines how a QPainter should draw lines and outlines of shapes.
QPainter::CompositionMode compositionMode
bool qpen_fast_equals(const QPen &a, const QPen &b)
qreal x() const
Returns the x-coordinate of this point.
The QLineF class provides a two-dimensional vector using floating point precision.
void initializeRasterizer(QSpanData *data)
void ensureOutlineMapper()
#define QT_BEGIN_NAMESPACE
This macro expands to.
QBrush brush() const
Returns the brush in the current paint engine state.
The QRectF class defines a rectangle in the plane using floating point precision. ...
static float pixelSize(const QFontDef &request, int dpi)
static const QCssKnownValue positions[NumKnownPositionModes - 1]
static void drawRects(const T *rects, int n, const QTransform &transform, IDirectFBSurface *surface)
The QImage class provides a hardware-independent image representation that allows direct access to th...
static const char * data(const QByteArray &arr)
QDataBuffer< QLineF > cachedLines
void rasterize(QT_FT_Outline *outline, ProcessSpans callback, QSpanData *spanData, QRasterBuffer *rasterBuffer)
The QRegion class specifies a clip region for a painter.
static void drawBufferSpan(QSpanData *data, const uint *buffer, int bufsize, int x, int y, int length, uint const_alpha)
Qt::BrushStyle style() const
Returns the brush style.
void(* SrcOverBlendFunc)(uchar *destPixels, int dbpl, const uchar *src, int spbl, int w, int h, int const_alpha)
bool isUnclipped(const QRect &rect, int penWidth) const
void appendSpan(int x, int length, int y, int coverage)
virtual void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode)
Reimplement this virtual function to draw the polygon defined by the pointCount first points in point...
The QBrush class defines the fill pattern of shapes drawn by QPainter.
int bytesPerPixel() const
void appendSpans(const QSpan *s, int num)
void prepare(QCustomRasterPaintDevice *)
void recalculateFastImages()
#define Q_DECLARE_PUBLIC(Class)
QTransform brushMatrix() const
void rasterizeLine_dashed(QLineF line, qreal width, int *dashIndex, qreal *dashOffset, bool *inDash)
QCustomRasterPaintDevice(QWidget *w)
Constructs a custom raster based paint device for the given top-level widget.
Type type() const
Reimplemented Function
uint outlinemapper_xform_dirty
The QPoint class defines a point in the plane using integer precision.
QScopedPointer< QT_FT_Raster > grayRaster
The QRect class defines a rectangle in the plane using integer precision.
const QClipData * clip() const
friend class QRasterPaintEngine
QSpanData image_filler_xform
void drawImage(const QPointF &pt, const QImage &img, SrcOverBlendFunc func, const QRect &clip, int alpha, const QRect &sr=QRect())
static void drawPoints(const T *points, int n, const QTransform &transform, IDirectFBSurface *surface)
qreal y() const
Returns the y-coordinate of this point.
ProcessSpans getPenFunc(const QRectF &rect, const QSpanData *data) const
QRasterPaintEnginePrivate()
The QPixmap class is an off-screen image representation that can be used as a paint device...
virtual void * memory() const
Returns a pointer to the paint device's memory buffer, or 0 if no such buffer exists.
void fillRect(const QRectF &rect, const QColor &, bool alpha)
void systemStateChanged()
The QSize class defines the size of a two-dimensional object using integer point precision.
#define Q_DECLARE_PRIVATE(Class)
QPen pen() const
Returns the pen in the current paint engine state.
struct CGContext * CGContextRef
The QRasterPaintEngine class enables hardware acceleration of painting operations in Qt for Embedded ...
QFontEngineGlyphCache::Type glyphCacheType
QScopedPointer< QOutlineMapper > outlineMapper
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...
virtual QSize size() const
static const KeyPair *const end
QScopedPointer< QRasterizer > rasterizer
void ensurePen(const QPen &pen)
bool monoDestinationWithClut
bool canUseFastImageBlending(QPainter::CompositionMode mode, const QImage &image) const
virtual void drawEllipse(const QRectF &r)
Reimplement this function to draw the largest ellipse that can be contained within rectangle rect...
QSpanData solid_color_filler