4#ifndef QPAINTENGINE_RASTER_P_H
5#define QPAINTENGINE_RASTER_P_H
18#include <QtGui/private/qtguiglobal_p.h>
19#include "private/qpaintengineex_p.h"
20#include "QtGui/qpainterpath.h"
21#include "private/qdatabuffer_p.h"
22#include "private/qdrawhelper_p.h"
23#include "private/qpaintengine_p.h"
24#include "private/qrasterizer_p.h"
25#include "private/qstroker_p.h"
26#include "private/qpainter_p.h"
27#include "private/qtextureglyphcache_p.h"
28#include "private/qoutlinemapper_p.h"
123 void updatePen(
const QPen &pen);
128 virtual void fillPolygon(
const QPointF *
points,
int pointCount, PolygonDrawMode
mode);
161 inline const QClipData *clipData()
const;
172 QRectF clipBoundingRect()
const;
177 void releaseDC(HDC hdc)
const;
178 static bool clearTypeFontsEnabled();
182 void alphaPenBlt(
const void*
src,
int bpl,
int depth,
int rx,
int ry,
int w,
int h,
bool useGammaCorrection);
210 inline void ensureBrush() { ensureBrush(
state()->
brush); }
212 inline void ensurePen(
const QPen &pen) {
216 inline void ensurePen() { ensurePen(
state()->pen); }
218 void updateOutlineMapper();
219 inline void ensureOutlineMapper();
221 void updateRasterState();
222 inline void ensureRasterState() {
239 int *dashIndex,
qreal *dashOffset,
bool *inDash);
256 m.translate(
s->brushOrigin.x(),
s->brushOrigin.y());
279#if defined (Q_OS_WIN)
403 int width()
const {
return m_width; }
408 int stride() {
return static_cast<int>(bytes_per_line /
sizeof(T)); }
429inline void QRasterPaintEngine::ensureOutlineMapper() {
430 if (d_func()->outlinemapper_xform_dirty)
431 updateOutlineMapper();
436 if (
q->state() &&
q->state()->clip &&
q->state()->clip->enabled)
437 return q->state()->clip;
445 return d->baseClip.data();
IOBluetoothDevice * device
void appendSpan(int x, int length, int y, int coverage)
void appendSpans(const QT_FT_Span *s, int num)
struct QClipData::ClipLine * m_clipLines
void setClipRegion(const QRegion ®ion)
void setClipRect(const QRect &rect)
The QColorSpace class provides a color space abstraction.
The QColor class provides colors based on RGB, HSV or CMYK values.
Format
The following image formats are available in Qt.
virtual void drawRects(const QRect *rects, int rectCount) override
This is an overloaded member function, provided for convenience. It differs from the above function o...
virtual void renderHintsChanged()=0
virtual void penChanged()=0
virtual void stroke(const QVectorPath &path, const QPen &pen)
virtual void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode) override
Reimplement this virtual function to draw the polygon defined by the pointCount first points in point...
virtual void drawEllipse(const QRectF &r) override
Reimplement this function to draw the largest ellipse that can be contained within rectangle rect.
virtual void drawImage(const QRectF &r, const QImage &pm, const QRectF &sr, Qt::ImageConversionFlags flags=Qt::AutoColor) override=0
Reimplement this function to draw the part of the image specified by the sr rectangle in the given re...
virtual void drawLines(const QLine *lines, int lineCount) override
This is an overloaded member function, provided for convenience. It differs from the above function o...
virtual void clip(const QVectorPath &path, Qt::ClipOperation op)=0
virtual void clipEnabledChanged()=0
virtual void fill(const QVectorPath &path, const QBrush &brush)=0
virtual void opacityChanged()=0
virtual void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) override=0
Reimplement this function to draw the part of the pm specified by the sr rectangle in the given r.
virtual void compositionModeChanged()=0
virtual void brushOriginChanged()=0
virtual QPainterState * createState(QPainterState *orig) const
virtual void drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s) override
Reimplement this function to draw the pixmap in the given rect, starting at the given p.
virtual bool requiresPretransformedGlyphPositions(QFontEngine *fontEngine, const QTransform &m) const
virtual void fillRect(const QRectF &rect, const QBrush &brush)
virtual void brushChanged()=0
virtual void transformChanged()=0
virtual bool shouldDrawCachedGlyphs(QFontEngine *fontEngine, const QTransform &m) const
virtual void setState(QPainterState *s)
virtual void drawPoints(const QPointF *points, int pointCount) override
Draws the first pointCount points in the buffer points.
virtual void drawStaticTextItem(QStaticTextItem *)
QPaintEngine::DirtyFlags state() const
Returns a combination of flags identifying the set of properties that need to be updated when updatin...
virtual void drawTextItem(const QPointF &p, const QTextItem &textItem)
This function draws the text item textItem at position p.
virtual bool begin(QPaintDevice *pdev)=0
Reimplement this function to initialise your paint engine when painting is to start on the paint devi...
virtual QPoint coordinateOffset() const
virtual bool end()=0
Reimplement this function to finish painting on the current paint device.
CompositionMode
Defines the modes supported for digital image compositing.
Qt::PenStyle style() const
Returns the pen style.
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
bool monoDestinationWithClut
QImage::Format prepare(QImage *image)
QPainter::CompositionMode compositionMode
qsizetype bytesPerLine() const
QImage colorizeBitmap(const QImage &image, const QColor &color)
int bytesPerPixel() const
QSpanData image_filler_xform
bool isUnclipped_normalized(const QRect &rect) const
Returns true if the rectangle is completely within the current clip state of the paint engine.
QTransform brushMatrix() const
QScopedPointer< QT_FT_Raster > grayRaster
void recalculateFastImages()
uint outlinemapper_xform_dirty
void initializeRasterizer(QSpanData *data)
ProcessSpans getBrushFunc(const QRect &rect, const QSpanData *data) const
QScopedPointer< QOutlineMapper > outlineMapper
QSpanData solid_color_filler
QDataBuffer< QLineF > cachedLines
bool canUseImageBlitting(QPainter::CompositionMode mode, const QImage &image, const QPointF &pt, const QRectF &sr) const
bool canUseFastImageBlending(QPainter::CompositionMode mode, const QImage &image) const
void drawImage(const QPointF &pt, const QImage &img, SrcOverBlendFunc func, const QRect &clip, int alpha, const QRect &sr=QRect())
bool isUnclipped(const QRect &rect, int penWidth) const
QRasterPaintEnginePrivate()
QScopedPointer< QDashStroker > dashStroker
void rasterizeLine_dashed(QLineF line, qreal width, int *dashIndex, qreal *dashOffset, bool *inDash)
QScopedPointer< QClipData > baseClip
void blitImage(const QPointF &pt, const QImage &img, const QRect &clip, const QRect &sr=QRect())
QFontEngine::GlyphFormat glyphCacheFormat
const QClipData * clip() const
void systemStateChanged() override
void updateMatrixData(QSpanData *spanData, const QBrush &brush, const QTransform &brushMatrix)
void rasterize(QT_FT_Outline *outline, ProcessSpans callback, QSpanData *spanData, QRasterBuffer *rasterBuffer)
QScopedPointer< QRasterBuffer > rasterBuffer
QRect deviceRectUnclipped
ProcessSpans getPenFunc(const QRectF &rect, const QSpanData *data) const
QScopedPointer< QRasterizer > rasterizer
~QRasterPaintEngineState()
QRasterPaintEngineState()
The QRasterPaintEngine class enables hardware acceleration of painting operations in Qt for Embedded ...
QRasterPaintEngineState * state()
const QClipData * clipData() const
Type type() const override
Reimplement this function to return the paint engine \l{Type}.
void clip(const QVectorPath &path, Qt::ClipOperation op) override
const QRasterPaintEngineState * state() const
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
The QRegion class specifies a clip region for a painter.
T * data() const noexcept
Returns the value of the pointer referenced by this object.
Combined button and popup list for selecting options.
static const QCssKnownValue positions[NumKnownPositionModes - 1]
void(* SrcOverBlendFunc)(uchar *destPixels, int dbpl, const uchar *src, int spbl, int w, int h, int const_alpha)
QT_FT_SpanFunc ProcessSpans
GLint GLint GLint GLint GLint x
[0]
GLint GLenum GLsizei GLsizei GLsizei depth
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLenum GLuint GLenum GLsizei length
GLenum GLenum GLsizei count
GLenum const void GLbitfield GLsizei numGlyphs
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLfloat GLfloat GLfloat GLfloat h
GLfixed GLfixed GLint GLint GLfixed points
GLdouble GLdouble GLdouble GLdouble q
GLsizei const GLchar *const * path
GLfloat GLfloat GLfloat alpha
bool qpen_fast_equals(const QPen &a, const QPen &b)
bool qbrush_fast_equals(const QBrush &a, const QBrush &b)
QT_BEGIN_NAMESPACE typedef unsigned int QRgb
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)