The QRasterPaintEngine class enables hardware acceleration of painting operations in Qt for Embedded Linux. 更多...
| 头: | #include <QRasterPaintEngine> |
| Since: | Qt 4.2 |
| 继承: | QPaintEngine |
该类在开发且可能改变。
| QRasterPaintEngine (QPaintDevice * device ) | |
| ~QRasterPaintEngine () | |
| virtual void | drawBufferSpan (const uint * buffer , int size , int x , int y , int length , uint alpha ) |
| virtual void | drawColorSpans (const QSpan * spans , int count , uint color ) |
| bool | supportsTransformations (const QFontEngine * fontEngine ) const |
| virtual bool | begin (QPaintDevice * device ) |
| virtual void | drawEllipse (const QRectF & rect ) |
| virtual void | drawEllipse (const QRect & rect ) |
| virtual void | drawImage (const QRectF & r , const QImage & img , const QRectF & sr , Qt::ImageConversionFlags falgs = Qt::AutoColor) |
| virtual void | drawLines (const QLine * lines , int lineCount ) |
| virtual void | drawLines (const QLineF * lines , int lineCount ) |
| virtual void | drawPixmap (const QRectF & r , const QPixmap & pixmap , const QRectF & sr ) |
| virtual void | drawPoints (const QPointF * points , int pointCount ) |
| virtual void | drawPoints (const QPoint * points , int pointCount ) |
| virtual void | drawPolygon (const QPointF * points , int pointCount , PolygonDrawMode mode ) |
| virtual void | drawPolygon (const QPoint * points , int pointCount , PolygonDrawMode mode ) |
| virtual void | drawRects (const QRect * rects , int rectCount ) |
| virtual void | drawRects (const QRectF * rects , int rectCount ) |
| virtual void | drawStaticTextItem (QStaticTextItem * textItem ) |
| virtual void | drawTextItem (const QPointF & p , const QTextItem & textItem ) |
| virtual void | drawTiledPixmap (const QRectF & r , const QPixmap & pixmap , const QPointF & sr ) |
| virtual bool | end () |
| virtual void | fillRect (const QRectF & r , const QBrush & brush ) |
| virtual void | fillRect (const QRectF & r , const QColor & color ) |
| virtual bool | supportsTransformations (qreal pixelSize , const QTransform & m ) const |
| virtual Type | type () const |
| typedef | QSpan |
The QRasterPaintEngine class enables hardware acceleration of painting operations in Qt for Embedded Linux.
Note that this functionality is only available in Qt for Embedded Linux .
在 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 (derived from the QCustomRasterPaintDevice class) and a custom window surface (derived from QWSWindowSurface) 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 .
见 Adding an Accelerated Graphics Driver to Qt for Embedded Linux 文档编制了解细节。
另请参阅 QCustomRasterPaintDevice and QPaintEngine .
Creates a raster based paint engine for operating on the given device , with the complete set of paint engine features and capabilities .
该函数在 Qt 4.5 引入。
销毁此描绘引擎。
[虚拟]
bool
QRasterPaintEngine::
begin
(
QPaintDevice
*
device
)
重实现自 QPaintEngine::begin ().
[虚拟]
void
QRasterPaintEngine::
drawBufferSpan
(const
uint
*
buffer
,
int
size
,
int
x
,
int
y
,
int
length
,
uint
alpha
)
绘制给定 buffer .
The default implementation does nothing; reimplement this function to draw a buffer that contains more than one color. Note that this function must be reimplemented if the framebuffer is not memory-mapped.
The size parameter specifies the total size of the given buffer , while the length parameter specifies the number of pixels to draw. The buffer's position is given by ( x , y ). The provided alpha value is added to each pixel in the buffer when drawing.
另请参阅 drawColorSpans ().
[虚拟]
void
QRasterPaintEngine::
drawColorSpans
(const
QSpan
*
spans
,
int
count
,
uint
color
)
Draws the given color spans 采用指定 color 。 count parameter specifies the number of spans.
The default implementation does nothing; reimplement this function to draw the given color spans 采用指定 color . Note that this function must be reimplemented if the framebuffer is not memory-mapped.
另请参阅 drawBufferSpan ().
[虚拟]
void
QRasterPaintEngine::
drawEllipse
(const
QRectF
&
rect
)
重实现自 QPaintEngine::drawEllipse ().
[虚拟]
void
QRasterPaintEngine::
drawEllipse
(const
QRect
&
rect
)
重实现自 QPaintEngine::drawEllipse ().
这是重载函数。
重实现此函数以绘制可以包含的最大椭圆,在矩形 rect .
[虚拟]
void
QRasterPaintEngine::
drawImage
(const
QRectF
&
r
, const
QImage
&
img
, const
QRectF
&
sr
,
Qt::ImageConversionFlags
falgs
= Qt::AutoColor)
重实现自 QPaintEngine::drawImage ().
[虚拟]
void
QRasterPaintEngine::
drawLines
(const
QLine
*
lines
,
int
lineCount
)
重实现自 QPaintEngine::drawLines ().
[虚拟]
void
QRasterPaintEngine::
drawLines
(const
QLineF
*
lines
,
int
lineCount
)
重实现自 QPaintEngine::drawLines ().
[虚拟]
void
QRasterPaintEngine::
drawPixmap
(const
QRectF
&
r
, const
QPixmap
&
pixmap
, const
QRectF
&
sr
)
重实现自 QPaintEngine::drawPixmap ().
[虚拟]
void
QRasterPaintEngine::
drawPoints
(const
QPointF
*
points
,
int
pointCount
)
重实现自 QPaintEngine::drawPoints ().
[虚拟]
void
QRasterPaintEngine::
drawPoints
(const
QPoint
*
points
,
int
pointCount
)
重实现自 QPaintEngine::drawPoints ().
这是重载函数。
绘制第一 pointCount 点在缓冲 points
默认实现转换第一 pointCount QPoints 在 points 成 QPointF 并调用浮点版本的 drawPoints .
[虚拟]
void
QRasterPaintEngine::
drawPolygon
(const
QPointF
*
points
,
int
pointCount
,
PolygonDrawMode
mode
)
重实现自 QPaintEngine::drawPolygon ().
[虚拟]
void
QRasterPaintEngine::
drawPolygon
(const
QPoint
*
points
,
int
pointCount
,
PolygonDrawMode
mode
)
重实现自 QPaintEngine::drawPolygon ().
[虚拟]
void
QRasterPaintEngine::
drawRects
(const
QRect
*
rects
,
int
rectCount
)
重实现自 QPaintEngine::drawRects ().
[虚拟]
void
QRasterPaintEngine::
drawRects
(const
QRectF
*
rects
,
int
rectCount
)
重实现自 QPaintEngine::drawRects ().
[虚拟]
void
QRasterPaintEngine::
drawStaticTextItem
(
QStaticTextItem
*
textItem
)
[虚拟]
void
QRasterPaintEngine::
drawTextItem
(const
QPointF
&
p
, const
QTextItem
&
textItem
)
重实现自 QPaintEngine::drawTextItem ().
[虚拟]
void
QRasterPaintEngine::
drawTiledPixmap
(const
QRectF
&
r
, const
QPixmap
&
pixmap
, const
QPointF
&
sr
)
重实现自 QPaintEngine::drawTiledPixmap ().
[虚拟]
bool
QRasterPaintEngine::
end
()
重实现自 QPaintEngine::end ().
[虚拟]
void
QRasterPaintEngine::
fillRect
(const
QRectF
&
r
, const
QBrush
&
brush
)
[虚拟]
void
QRasterPaintEngine::
fillRect
(const
QRectF
&
r
, const
QColor
&
color
)
[虚拟]
bool
QRasterPaintEngine::
supportsTransformations
(
qreal
pixelSize
, const
QTransform
&
m
) const
[虚拟]
Type
QRasterPaintEngine::
type
() const
重实现自 QPaintEngine::type ().
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).