QRasterPaintEngine 类启用描绘操作硬件加速 (在 Qt for Embedded Linux 中)。 更多...
头: | #include <QRasterPaintEngine> |
CMake: |
find_package(Qt6 COMPONENTS Gui REQUIRED)
target_link_libraries(mytarget PRIVATE Qt6::Gui) |
qmake: | QT += gui |
继承: | QPaintEngineEx |
该类在开发且可能改变。
QRasterPaintEngine (QPaintDevice * device ) | |
virtual | ~QRasterPaintEngine () |
virtual bool | begin (QPaintDevice * device ) override |
virtual void | drawEllipse (const QRectF & rect ) override |
virtual void | drawImage (const QRectF & r , const QImage & img , const QRectF & sr , Qt::ImageConversionFlags flags = Qt::AutoColor) override |
virtual void | drawLines (const QLine * lines , int lineCount ) override |
virtual void | drawLines (const QLineF * lines , int lineCount ) override |
virtual void | drawPixmap (const QRectF & r , const QPixmap & pixmap , const QRectF & sr ) override |
virtual void | drawPoints (const QPointF * points , int pointCount ) override |
virtual void | drawPolygon (const QPointF * points , int pointCount , QPaintEngine::PolygonDrawMode mode ) override |
virtual void | drawPolygon (const QPoint * points , int pointCount , QPaintEngine::PolygonDrawMode mode ) override |
virtual void | drawRects (const QRect * rects , int rectCount ) override |
virtual void | drawRects (const QRectF * rects , int rectCount ) override |
virtual void | drawStaticTextItem (QStaticTextItem * textItem ) override |
virtual void | drawTextItem (const QPointF & p , const QTextItem & textItem ) override |
virtual void | drawTiledPixmap (const QRectF & r , const QPixmap & pixmap , const QPointF & sr ) override |
virtual bool | end () override |
virtual void | fillRect (const QRectF & r , const QBrush & brush ) override |
virtual void | fillRect (const QRectF & r , const QColor & color ) override |
virtual bool | shouldDrawCachedGlyphs (QFontEngine * fontEngine , const QTransform & m ) const override |
QSpan |
注意:此功能仅用于 Qt for Embedded Linux。
In Qt for Embedded Linux, painting is a pure software implementation. But starting with Qt 4.2, it is possible to add an accelerated graphics driver to take advantage of available hardware resources.
Hardware acceleration is accomplished by creating a custom screen driver, accelerating the copying from memory to the screen, and implementing a custom paint engine accelerating the various painting operations. Then a custom paint device and a custom window surface must be implemented to make Qt for Embedded Linux aware of the accelerated driver.
注意: The QRasterPaintEngine class does not support 8-bit images. Instead, they need to be converted to a supported format, such as QImage::Format_ARGB32_Premultiplied .
另请参阅 QPaintEngine .
Creates a raster based paint engine for operating on the given device , with the complete set of paint engine features and capabilities .
[虚拟]
QRasterPaintEngine::
~QRasterPaintEngine
()
销毁此描绘引擎。
[override virtual]
bool
QRasterPaintEngine::
begin
(
QPaintDevice
*
device
)
重实现: QPaintEngine::begin (QPaintDevice *pdev).
[override virtual]
void
QRasterPaintEngine::
drawEllipse
(const
QRectF
&
rect
)
重实现: QPaintEngine::drawEllipse (const QRectF &rect).
[override virtual]
void
QRasterPaintEngine::
drawImage
(const
QRectF
&
r
, const
QImage
&
img
, const
QRectF
&
sr
,
Qt::ImageConversionFlags
flags
= Qt::AutoColor)
重实现: QPaintEngine::drawImage (const QRectF &rectangle, const QImage &image, const QRectF &sr, Qt::ImageConversionFlags flags).
[override virtual]
void
QRasterPaintEngine::
drawLines
(const
QLine
*
lines
,
int
lineCount
)
重实现: QPaintEngine::drawLines (const QLine *lines, int lineCount).
[override virtual]
void
QRasterPaintEngine::
drawLines
(const
QLineF
*
lines
,
int
lineCount
)
重实现: QPaintEngine::drawLines (const QLineF *lines, int lineCount).
[override virtual]
void
QRasterPaintEngine::
drawPixmap
(const
QRectF
&
r
, const
QPixmap
&
pixmap
, const
QRectF
&
sr
)
重实现: QPaintEngine::drawPixmap (const QRectF &r, const QPixmap &pm, const QRectF &sr).
[override virtual]
void
QRasterPaintEngine::
drawPoints
(const
QPointF
*
points
,
int
pointCount
)
重实现: QPaintEngine::drawPoints (const QPointF *points, int pointCount).
[override virtual]
void
QRasterPaintEngine::
drawPolygon
(const
QPointF
*
points
,
int
pointCount
,
QPaintEngine::PolygonDrawMode
mode
)
重实现: QPaintEngine::drawPolygon (const QPointF *points, int pointCount, QPaintEngine::PolygonDrawMode mode).
[override virtual]
void
QRasterPaintEngine::
drawPolygon
(const
QPoint
*
points
,
int
pointCount
,
QPaintEngine::PolygonDrawMode
mode
)
重实现: QPaintEngine::drawPolygon (const QPoint *points, int pointCount, QPaintEngine::PolygonDrawMode mode).
[override virtual]
void
QRasterPaintEngine::
drawRects
(const
QRect
*
rects
,
int
rectCount
)
重实现: QPaintEngine::drawRects (const QRect *rects, int rectCount).
[override virtual]
void
QRasterPaintEngine::
drawRects
(const
QRectF
*
rects
,
int
rectCount
)
重实现: QPaintEngine::drawRects (const QRectF *rects, int rectCount).
[override virtual]
void
QRasterPaintEngine::
drawStaticTextItem
(
QStaticTextItem
*
textItem
)
[override virtual]
void
QRasterPaintEngine::
drawTextItem
(const
QPointF
&
p
, const
QTextItem
&
textItem
)
重实现: QPaintEngine::drawTextItem (const QPointF &p, const QTextItem &textItem).
[override virtual]
void
QRasterPaintEngine::
drawTiledPixmap
(const
QRectF
&
r
, const
QPixmap
&
pixmap
, const
QPointF
&
sr
)
重实现: QPaintEngine::drawTiledPixmap (const QRectF &rect, const QPixmap &pixmap, const QPointF &p).
[override virtual]
bool
QRasterPaintEngine::
end
()
重实现: QPaintEngine::end ().
[override virtual]
void
QRasterPaintEngine::
fillRect
(const
QRectF
&
r
, const
QBrush
&
brush
)
[override virtual]
void
QRasterPaintEngine::
fillRect
(const
QRectF
&
r
, const
QColor
&
color
)
[override virtual]
bool
QRasterPaintEngine::
shouldDrawCachedGlyphs
(
QFontEngine
*
fontEngine
, const
QTransform
&
m
) const
Returns whether glyph caching is supported by the font engine fontEngine with the given transform m applied.
A struct equivalent to QT_FT_Span, containing a position (x, y), the span's length in pixels and its color/coverage (a value ranging from 0 to 255).