Qt 4.8
|
The QBrush class defines the fill pattern of shapes drawn by QPainter. More...
#include <qbrush.h>
Public Types | |
typedef QScopedPointer< QBrushData, QBrushDataPointerDeleter > | DataPtr |
Public Functions | |
const QColor & | color () const |
Returns the brush color. More... | |
DataPtr & | data_ptr () |
const QGradient * | gradient () const |
Returns the gradient describing this brush. More... | |
bool | isDetached () const |
bool | isOpaque () const |
Returns true if the brush is fully opaque otherwise false. More... | |
const QMatrix & | matrix () const |
Returns the current transformation matrix for the brush. More... | |
operator QVariant () const | |
Returns the brush as a QVariant. More... | |
bool | operator!= (const QBrush &b) const |
Returns true if the brush is different from the given brush; otherwise returns false. More... | |
QBrush & | operator= (const QBrush &brush) |
Assigns the given brush to this brush and returns a reference to this brush. More... | |
bool | operator== (const QBrush &b) const |
Returns true if the brush is equal to the given brush; otherwise returns false. More... | |
QBrush () | |
Constructs a default black brush with the style Qt::NoBrush (i.e. More... | |
QBrush (Qt::BrushStyle bs) | |
Constructs a black brush with the given style. More... | |
QBrush (const QColor &color, Qt::BrushStyle bs=Qt::SolidPattern) | |
Constructs a brush with the given color and style. More... | |
QBrush (Qt::GlobalColor color, Qt::BrushStyle bs=Qt::SolidPattern) | |
Constructs a brush with the given color and style. More... | |
QBrush (const QColor &color, const QPixmap &pixmap) | |
Constructs a brush with the given color and the custom pattern stored in pixmap. More... | |
QBrush (Qt::GlobalColor color, const QPixmap &pixmap) | |
Constructs a brush with the given color and the custom pattern stored in pixmap. More... | |
QBrush (const QPixmap &pixmap) | |
Constructs a brush with a black color and a texture set to the given pixmap. More... | |
QBrush (const QImage &image) | |
Constructs a brush with a black color and a texture set to the given image. More... | |
QBrush (const QBrush &brush) | |
Constructs a copy of other. More... | |
QBrush (const QGradient &gradient) | |
Constructs a brush based on the given gradient. More... | |
void | setColor (const QColor &color) |
Sets the brush color to the given color. More... | |
void | setColor (Qt::GlobalColor color) |
Sets the brush color to the given color. More... | |
void | setMatrix (const QMatrix &mat) |
Sets matrix as an explicit transformation matrix on the current brush. More... | |
void | setStyle (Qt::BrushStyle) |
Sets the brush style to style. More... | |
void | setTexture (const QPixmap &pixmap) |
Sets the brush pixmap to pixmap. More... | |
void | setTextureImage (const QImage &image) |
Sets the brush image to image. More... | |
void | setTransform (const QTransform &) |
Sets matrix as an explicit transformation matrix on the current brush. More... | |
Qt::BrushStyle | style () const |
Returns the brush style. More... | |
void | swap (QBrush &other) |
Swaps brush other with this brush. More... | |
QPixmap | texture () const |
Returns the custom brush pattern, or a null pixmap if no custom brush pattern has been set. More... | |
QImage | textureImage () const |
Returns the custom brush pattern, or a null image if no custom brush pattern has been set. More... | |
QTransform | transform () const |
Returns the current transformation matrix for the brush. More... | |
~QBrush () | |
Destroys the brush. More... | |
Private Functions | |
void | cleanUp (QBrushData *x) |
void | detach (Qt::BrushStyle newStyle) |
void | init (const QColor &color, Qt::BrushStyle bs) |
Initializes the brush. More... | |
Properties | |
QScopedPointer< QBrushData, QBrushDataPointerDeleter > | d |
Friends | |
bool Q_GUI_EXPORT | qHasPixmapTexture (const QBrush &brush) |
class | QPainter |
class | QRasterPaintEngine |
class | QRasterPaintEnginePrivate |
struct | QSpanData |
class | QX11PaintEngine |
Related Functions | |
(Note that these are not member functions.) | |
QDataStream & | operator<< (QDataStream &stream, const QBrush &brush) |
Writes the given brush to the given stream and returns a reference to the stream. More... | |
QDataStream & | operator>> (QDataStream &stream, QBrush &brush) |
Reads the given brush from the given stream and returns a reference to the stream. More... | |
The QBrush class defines the fill pattern of shapes drawn by QPainter.
A brush has a style, a color, a gradient and a texture.
The brush style() defines the fill pattern using the Qt::BrushStyle enum. The default brush style is Qt::NoBrush (depending on how you construct a brush). This style tells the painter to not fill shapes. The standard style for filling is Qt::SolidPattern. The style can be set when the brush is created using the appropriate constructor, and in addition the setStyle() function provides means for altering the style once the brush is constructed.
The brush color() defines the color of the fill pattern. The color can either be one of Qt's predefined colors, Qt::GlobalColor, or any other custom QColor. The currently set color can be retrieved and altered using the color() and setColor() functions, respectively.
The gradient() defines the gradient fill used when the current style is either Qt::LinearGradientPattern, Qt::RadialGradientPattern or Qt::ConicalGradientPattern. Gradient brushes are created by giving a QGradient as a constructor argument when creating the QBrush. Qt provides three different gradients: QLinearGradient, QConicalGradient, and QRadialGradient
The texture() defines the pixmap used when the current style is Qt::TexturePattern. You can create a brush with a texture by providing the pixmap when the brush is created or by using setTexture().
Note that applying setTexture() makes style() == Qt::TexturePattern, regardless of previous style settings. Also, calling setColor() will not make a difference if the style is a gradient. The same is the case if the style is Qt::TexturePattern style unless the current texture is a QBitmap.
The isOpaque() function returns true if the brush is fully opaque otherwise false. A brush is considered opaque if:
To specify the style and color of lines and outlines, use the QPainter's QPen{pen} combined with Qt::PenStyle and Qt::GlobalColor: QPainter painter(this); painter.setBrush(Qt::cyan); painter.setPen(Qt::darkCyan); painter.drawRect(0, 0, 100,100); painter.setBrush(Qt::NoBrush); painter.setPen(Qt::darkGreen); painter.drawRect(40, 40, 100, 100); Note that, by default, QPainter renders the outline (using the currently set pen) when drawing shapes. Use Qt::NoPen{ |
For more information about painting in general, see the Paint System.
QBrush::QBrush | ( | ) |
Constructs a default black brush with the style Qt::NoBrush (i.e.
this brush will not fill shapes).
Definition at line 426 of file qbrush.cpp.
Referenced by operator>>().
QBrush::QBrush | ( | Qt::BrushStyle | style | ) |
Constructs a black brush with the given style.
Definition at line 466 of file qbrush.cpp.
QBrush::QBrush | ( | const QColor & | color, |
Qt::BrushStyle | style = Qt::SolidPattern |
||
) |
Constructs a brush with the given color and style.
Definition at line 482 of file qbrush.cpp.
QBrush::QBrush | ( | Qt::GlobalColor | color, |
Qt::BrushStyle | style = Qt::SolidPattern |
||
) |
Constructs a brush with the given color and style.
Definition at line 502 of file qbrush.cpp.
Constructs a brush with the given color and the custom pattern stored in pixmap.
The style is set to Qt::TexturePattern. The color will only have an effect for QBitmaps.
Definition at line 522 of file qbrush.cpp.
QBrush::QBrush | ( | Qt::GlobalColor | color, |
const QPixmap & | pixmap | ||
) |
Constructs a brush with the given color and the custom pattern stored in pixmap.
The style is set to Qt::TexturePattern. The color will only have an effect for QBitmaps.
Definition at line 538 of file qbrush.cpp.
QBrush::QBrush | ( | const QPixmap & | pixmap | ) |
Constructs a brush with a black color and a texture set to the given pixmap.
The style is set to Qt::TexturePattern.
Definition at line 440 of file qbrush.cpp.
QBrush::QBrush | ( | const QImage & | image | ) |
Constructs a brush with a black color and a texture set to the given image.
The style is set to Qt::TexturePattern.
Definition at line 454 of file qbrush.cpp.
QBrush::QBrush | ( | const QBrush & | brush | ) |
QBrush::QBrush | ( | const QGradient & | gradient | ) |
Constructs a brush based on the given gradient.
The brush style is set to the corresponding gradient style (either Qt::LinearGradientPattern, Qt::RadialGradientPattern or Qt::ConicalGradientPattern).
Definition at line 561 of file qbrush.cpp.
QBrush::~QBrush | ( | ) |
|
private |
Definition at line 586 of file qbrush.cpp.
|
inline |
Returns the brush color.
Definition at line 183 of file qbrush.h.
Referenced by QTextEditPrivate::_q_currentCharFormatChanged(), QPdfEnginePrivate::addBrushPattern(), QAccessibleTextWidget::attributes(), QRenderRule::configurePalette(), QCalendarModel::data(), QTextLine::draw(), QGL2PaintEngineExPrivate::drawCachedGlyphs(), QCommonStyle::drawComplexControl(), QWindowsCEStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QWindowsMobileStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QWindowsStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), QGtkStyle::drawComplexControl(), QMotifStyle::drawComplexControl(), QStyleSheetStyle::drawComplexControl(), QWindowsCEStyle::drawControl(), QCommonStyle::drawControl(), QWindowsVistaStyle::drawControl(), QWindowsMobileStyle::drawControl(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QWindowsXPStyle::drawControl(), QWindowsStyle::drawControl(), QGtkStyle::drawControl(), QMotifStyle::drawControl(), QMacStyle::drawControl(), QStyleSheetStyle::drawControl(), QStyleHelper::drawDial(), QWindowsCEStyle::drawItemText(), QStyle::drawItemText(), QPainterPrivate::drawOpaqueBackground(), QWindowsMobileStylePrivate::drawPanelItemViewSelected(), QWindowsCEStyle::drawPrimitive(), QCommonStyle::drawPrimitive(), QWindowsVistaStyle::drawPrimitive(), QWindowsMobileStyle::drawPrimitive(), QPlastiqueStyle::drawPrimitive(), QCleanlooksStyle::drawPrimitive(), QCDEStyle::drawPrimitive(), QWindowsXPStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), QGtkStyle::drawPrimitive(), QMotifStyle::drawPrimitive(), QMacStyle::drawPrimitive(), QDirectFBPaintEngine::drawRects(), QWindowsMobileStylePrivate::drawScrollbarGroove(), QWindowsMobileStylePrivate::drawScrollbarHandleDown(), QWindowsMobileStylePrivate::drawScrollbarHandleUp(), QLCDNumberPrivate::drawSegment(), QWindowsMobileStylePrivate::drawTabBarTab(), QWin32PrintEngine::drawTextItem(), QWindowsCEStylePrivate::drawWinCEButton(), QWindowsCEStylePrivate::drawWinCEPanel(), QTextHtmlExporter::emitBackgroundAttribute(), QTextHtmlExporter::emitCharFormatStyle(), QTextHtmlExporter::emitFrameStyle(), QVGCompositionHelper::fillBackground(), QX11PaintEnginePrivate::fillPolygon_dev(), QDirectFBPaintEngine::fillRect(), QVGPaintEngine::fillRect(), QPainter::fillRect(), QOpenGLPaintEnginePrivate::flushDrawQueue(), QWindowsMobileStyle::generatedIconPixmap(), getPatternFill(), hash(), QTextControlPrivate::inputMethodEvent(), make_widget_eventUPP(), QWidgetPrivate::mapFromGlobal(), operator<<(), operator>>(), QScreen::paintBackground(), QDecorationWindows::paintButton(), QCommandLinkButton::paintEvent(), QLabel::paintEvent(), QLineEdit::paintEvent(), QWizardHeader::paintEvent(), QColorLuminancePicker::paintEvent(), QmlJSDebugger::ColorPickerTool::pickColor(), QWindowsStyle::polish(), QWindowsXPStyle::polish(), QWindowsVistaStyle::polish(), QWindowsMobileStyle::polish(), QCleanlooksStyle::polish(), QLineControl::processInputMethodEvent(), qBrushDark(), qBrushLight(), qBrushSetAlphaF(), QSvgPaintEngine::qbrushToSvg(), qDrawEdge(), qDrawPlainRect(), qDrawRoundedCorners(), qDrawShadeLine(), qDrawShadePanel(), qDrawShadeRect(), qDrawWinButton(), qDrawWinPanel(), qt_cleanlooks_draw_mdibutton(), qt_graphicsItem_highlightSelected(), qt_mac_display_change_callbk(), qt_plastique_draw_handle(), qt_plastique_drawFrame(), qt_plastique_drawShadedPanel(), qt_set_windows_color_resources(), QPainter::setBackground(), QVGPaintEnginePrivate::setBrush(), QPainter::setBrush(), QPalette::setColorGroup(), QOpenGLPaintEnginePrivate::setGradientOps(), QPdfBaseEngine::setPen(), QSpanData::setup(), QInputContext::standardFormat(), QCleanlooksStyle::standardPalette(), QGtkStyle::standardPalette(), QWindowsMobileStyle::standardPixmap(), QCleanlooksStyle::styleHint(), QStyleSheetStyle::styleHint(), QPicturePaintEngine::updateBackground(), QX11PaintEngine::updateBrush(), QGL2PaintEngineExPrivate::updateBrushUniforms(), QPainterPrivate::updateEmulationSpecifier(), QWin32PrintEngine::updateState(), QTextOdfWriter::writeBlockFormat(), and QTextOdfWriter::writeCharacterFormat().
|
inline |
|
private |
Definition at line 592 of file qbrush.cpp.
Referenced by setColor(), setStyle(), setTexture(), setTextureImage(), and setTransform().
const QGradient * QBrush::gradient | ( | ) | const |
Returns the gradient describing this brush.
Definition at line 871 of file qbrush.cpp.
Referenced by cgColorForQColor(), QPainterPrivate::checkEmulation(), coordinateMode(), detach(), QPlastiqueStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QPlastiqueStyle::drawPrimitive(), QCleanlooksStyle::drawPrimitive(), QEmulationPaintEngine::drawTextItem(), QCoreGraphicsPaintEngine::drawTextItem(), QEmulationPaintEngine::fill(), fillBackground(), QPainter::fillPath(), QPainter::fillRect(), fillRegion(), isOpaque(), needsResolving(), operator<<(), QBrush(), qBrushDark(), qBrushLight(), qBrushSetAlphaF(), QSvgPaintEngine::qbrushToSvg(), qMapBrushToRect(), qt_isExtendedRadialGradient(), rasterFallbackWarn(), QVGPaintEnginePrivate::setBrush(), QSpanData::setup(), stretchGradientToUserSpace(), QEmulationPaintEngine::stroke(), QPainter::strokePath(), QCoreGraphicsPaintEngine::updateBrush(), QGL2PaintEngineExPrivate::updateBrushTexture(), QGL2PaintEngineExPrivate::updateBrushUniforms(), QOpenGLPaintEnginePrivate::updateGradient(), and QPdfEnginePrivate::~QPdfEnginePrivate().
|
private |
Initializes the brush.
Definition at line 396 of file qbrush.cpp.
Referenced by QBrush().
|
inline |
bool QBrush::isOpaque | ( | ) | const |
Returns true if the brush is fully opaque otherwise false.
A brush is considered opaque if:
Definition at line 910 of file qbrush.cpp.
Referenced by QPdfEnginePrivate::addBrushPattern(), QPaintEngineEx::drawPoints(), QGL2PaintEngineExPrivate::fill(), QVGPaintEngine::fillRect(), QWidgetPrivate::init(), QWidgetPrivate::isBackgroundInherited(), QWidgetPrivate::mapFromGlobal(), QWidgetPrivate::paintBackground(), QGraphicsView::paintEvent(), QMdiArea::setBackground(), QPdfBaseEngine::setPen(), QSpanData::setup(), QGL2PaintEngineExPrivate::stroke(), QX11PaintEngine::updateBrush(), QPainterPrivate::updateEmulationSpecifier(), QDirectFBWindowSurface::updateIsOpaque(), QWidgetPrivate::updateIsOpaque(), QAlphaPaintEngine::updateState(), QPdfBaseEngine::updateState(), and QPdfEnginePrivate::~QPdfEnginePrivate().
|
inline |
Returns the current transformation matrix for the brush.
Definition at line 184 of file qbrush.h.
Referenced by setTransform().
QBrush::operator QVariant | ( | ) | const |
Returns the brush as a QVariant.
Definition at line 665 of file qbrush.cpp.
|
inline |
Returns true if the brush is different from the given brush; otherwise returns false.
Two brushes are different if they have different styles, colors or transforms or different pixmaps or gradients depending on the style.
Definition at line 127 of file qbrush.h.
Assigns the given brush to this brush and returns a reference to this brush.
Definition at line 640 of file qbrush.cpp.
bool QBrush::operator== | ( | const QBrush & | brush | ) | const |
Returns true if the brush is equal to the given brush; otherwise returns false.
Two brushes are equal if they have equal styles, colors and transforms and equal pixmaps or gradients depending on the style.
Definition at line 1017 of file qbrush.cpp.
void QBrush::setColor | ( | const QColor & | color | ) |
Sets the brush color to the given color.
Note that calling setColor() will not make a difference if the style is a gradient. The same is the case if the style is Qt::TexturePattern style unless the current texture is a QBitmap.
Definition at line 725 of file qbrush.cpp.
Referenced by QSvgAnimateColor::apply(), QGL2PaintEngineExPrivate::drawCachedGlyphs(), qBrushDark(), qBrushLight(), and qBrushSetAlphaF().
|
inline |
Sets the brush color to the given color.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 155 of file qbrush.h.
void QBrush::setMatrix | ( | const QMatrix & | matrix | ) |
Sets matrix as an explicit transformation matrix on the current brush.
The brush transformation matrix is merged with QPainter transformation matrix to produce the final result.
Definition at line 951 of file qbrush.cpp.
Referenced by QSvgGradientStyle::brush().
void QBrush::setStyle | ( | Qt::BrushStyle | style | ) |
void QBrush::setTexture | ( | const QPixmap & | pixmap | ) |
Sets the brush pixmap to pixmap.
The style is set to Qt::TexturePattern.
The current brush color will only have an effect for monochrome pixmaps, i.e. for QPixmap::depth() == 1 (QBitmap{QBitmaps}).
Definition at line 802 of file qbrush.cpp.
Referenced by QBrush(), qBrushDark(), qBrushLight(), and qBrushSetAlphaF().
void QBrush::setTextureImage | ( | const QImage & | image | ) |
Sets the brush image to image.
The style is set to Qt::TexturePattern.
Note the current brush color will not have any affect on monochrome images, as opposed to calling setTexture() with a QBitmap. If you want to change the color of monochrome image brushes, either convert the image to QBitmap with QBitmap::fromImage()
and set the resulting QBitmap as a texture, or change the entries in the color table for the image.
Definition at line 856 of file qbrush.cpp.
Referenced by QWindowsMobileStylePrivate::drawScrollbarGroove(), and QBrush().
void QBrush::setTransform | ( | const QTransform & | matrix | ) |
Sets matrix as an explicit transformation matrix on the current brush.
The brush transformation matrix is merged with QPainter transformation matrix to produce the final result.
Definition at line 968 of file qbrush.cpp.
Referenced by QOpenGLPaintEnginePrivate::drawImageAsPath(), QEmulationPaintEngine::drawTextItem(), QOpenGLPaintEnginePrivate::drawTiledImageAsPath(), QVGPaintEngine::drawTiledPixmap(), QEmulationPaintEngine::fill(), fillBackground(), operator>>(), setMatrix(), stretchGradientToUserSpace(), QEmulationPaintEngine::stroke(), and QPaintEngineEx::stroke().
|
inline |
Returns the brush style.
Definition at line 182 of file qbrush.h.
Referenced by QPdfEnginePrivate::addBrushPattern(), QTextHtmlParserNode::applyCssDeclarations(), QAccessibleTextWidget::attributes(), QRenderRule::configurePalette(), coordinateMode(), QVGPaintEnginePrivate::draw(), QSvgPolyline::draw(), QTextLayout::draw(), QTextLine::draw(), QRenderRule::drawBackground(), QGL2PaintEngineExPrivate::drawCachedGlyphs(), QOpenGLPaintEnginePrivate::drawItem(), QPainterPrivate::drawOpaqueBackground(), QWindowsVistaStyle::drawPrimitive(), QPlastiqueStyle::drawPrimitive(), QDirectFBPaintEngine::drawRects(), QPainterPrivate::drawStretchedGradient(), QTextDocumentLayoutPrivate::drawTableCell(), QWin32PrintEngine::drawTextItem(), QWidgetPrivate::drawWidget(), QTextHtmlExporter::emitBackgroundAttribute(), QTextHtmlExporter::emitBlockAttributes(), QTextHtmlExporter::emitCharFormatStyle(), QRasterPaintEngine::ensureBrush(), QEmulationPaintEngine::fill(), QOpenGLPaintEngine::fill(), QDirectFBPaintEngine::fill(), QVGPaintEnginePrivate::fill(), QVGCompositionHelper::fillBackground(), fillBackground(), QX11PaintEnginePrivate::fillPolygon_dev(), QBlitterPaintEngine::fillRect(), QDirectFBPaintEngine::fillRect(), QVGPaintEngine::fillRect(), QPainter::fillRect(), fillRegion(), QRenderRule::fixupBorder(), QOpenGLPaintEnginePrivate::flushDrawQueue(), getPatternFill(), hash(), QWidgetPrivate::init(), QTextControlPrivate::inputMethodEvent(), is_brush_transparent(), QWidgetPrivate::isBackgroundInherited(), QWidgetPrivate::mapFromGlobal(), needsResolving(), operator<<(), operator>>(), QScreen::paintBackground(), QPdf::patternForBrush(), QGL2PaintEngineExPrivate::prepareForDraw(), QTextHtmlImporter::processBlockNode(), QLineControl::processInputMethodEvent(), QTextHtmlImporter::processSpecialNodes(), QSvgPaintEngine::qbrushToSvg(), qHasPixmapTexture(), QRenderRule::QRenderRule(), qt_isExtendedRadialGradient(), QTextHtmlImporter::scanTable(), QWorkspace::setBackground(), QPainter::setBackground(), QDirectFBPaintEnginePrivate::setBrush(), QVGPaintEnginePrivate::setBrush(), QPainter::setBrush(), QGL2PaintEngineExPrivate::setBrush(), QOpenGLPaintEnginePrivate::setGradientOps(), QGraphicsOpacityEffect::setOpacityMask(), QDirectFBPaintEnginePrivate::setPen(), QPainter::setPen(), QPdfBaseEngine::setPen(), setPenAndDrawBackground(), setStyle(), stretchGradientToUserSpace(), QSvgNode::strokeWidth(), QStyleSheetStyle::styleHint(), QPicturePaintEngine::updateBackground(), QPicturePaintEngine::updateBrush(), QOpenGLPaintEngine::updateBrush(), QGL2PaintEngineExPrivate::updateBrushTexture(), QGL2PaintEngineExPrivate::updateBrushUniforms(), QPainterPrivate::updateEmulationSpecifier(), QOpenGLPaintEnginePrivate::updateGradient(), QDirectFBWindowSurface::updateIsOpaque(), QWidgetPrivate::updateIsOpaque(), QOpenGLPaintEngine::updatePen(), QAlphaPaintEngine::updateState(), QWin32PrintEngine::updateState(), QOpenGLPaintEngine::updateState(), and QPdfBaseEngine::updateState().
|
inline |
QPixmap QBrush::texture | ( | ) | const |
Returns the custom brush pattern, or a null pixmap if no custom brush pattern has been set.
Definition at line 785 of file qbrush.cpp.
Referenced by QPdfEnginePrivate::addBrushPattern(), QPlastiqueStyle::drawComplexControl(), QWindowsCEStyle::drawControl(), QPlastiqueStyle::drawControl(), QWindowsStyle::drawControl(), QPlastiqueStyle::drawPrimitive(), QWidgetPrivate::drawWidget(), QTextHtmlExporter::emitBackgroundAttribute(), QX11PaintEnginePrivate::fillPolygon_dev(), QBlitterPaintEngine::fillRect(), QDirectFBPaintEngine::fillRect(), fillRegion(), is_brush_transparent(), isOpaque(), QWidgetPrivate::mapFromGlobal(), operator<<(), qBrushDark(), qBrushLight(), qBrushSetAlphaF(), qt_mac_display_change_callbk(), qt_mac_fill_background(), QVGPaintEnginePrivate::setBrush(), QGL2PaintEngineExPrivate::setBrush(), QOpenGLPaintEnginePrivate::setGradientOps(), QSpanData::setup(), QGL2PaintEngineExPrivate::updateBrushTexture(), QGL2PaintEngineExPrivate::updateBrushUniforms(), QPainterPrivate::updateEmulationSpecifier(), and QOpenGLPaintEnginePrivate::updateFragmentProgramData().
QImage QBrush::textureImage | ( | ) | const |
Returns the custom brush pattern, or a null image if no custom brush pattern has been set.
If the texture was set as a QPixmap it will be converted to a QImage.
Definition at line 829 of file qbrush.cpp.
Referenced by QOpenGLPaintEnginePrivate::composite(), QTextHtmlExporter::emitBackgroundAttribute(), is_brush_transparent(), isOpaque(), QSpanData::setup(), and QPainterPrivate::updateEmulationSpecifier().
|
inline |
Returns the current transformation matrix for the brush.
Definition at line 185 of file qbrush.h.
Referenced by QEmulationPaintEngine::drawTextItem(), QEmulationPaintEngine::fill(), QBlitterPaintEngine::fillRect(), QDirectFBPaintEngine::fillRect(), operator<<(), operator>>(), QGL2PaintEngineExPrivate::setBrush(), QVGPaintEnginePrivate::setBrushTransform(), stretchGradientToUserSpace(), QEmulationPaintEngine::stroke(), QPaintEngineEx::stroke(), QRasterPaintEngine::updateBrush(), QGL2PaintEngineExPrivate::updateBrushUniforms(), QPainterPrivate::updateEmulationSpecifier(), QOpenGLPaintEnginePrivate::updateGradient(), QRasterPaintEnginePrivate::updateMatrixData(), and QRasterPaintEngine::updatePen().
|
related |
Writes the given brush to the given stream and returns a reference to the stream.
Definition at line 1111 of file qbrush.cpp.
|
related |
Reads the given brush from the given stream and returns a reference to the stream.
Definition at line 1182 of file qbrush.cpp.
|
friend |
Definition at line 223 of file qbrush.cpp.
Referenced by isOpaque().
|
friend |
|
friend |
|
friend |
|
private |
Definition at line 146 of file qbrush.h.
Referenced by detach(), gradient(), isOpaque(), operator=(), operator==(), QBrush(), qHasPixmapTexture(), QPainter::setBrush(), setColor(), setStyle(), setTexture(), setTextureImage(), setTransform(), swap(), texture(), textureImage(), and QRasterPaintEnginePrivate::updateMatrixData().