⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qbrush.3qt

📁 Linux下的基于X11的图形开发环境。
💻 3QT
字号:
'\" t.TH QBrush 3qt "9 December 2002" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS.  All rights reserved.  See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQBrush \- Defines the fill pattern of shapes drawn by a QPainter.SH SYNOPSIS\fC#include <qbrush.h>\fR.PPInherits Qt..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQBrush\fR ()".br.ti -1c.BI "\fBQBrush\fR ( BrushStyle style )".br.ti -1c.BI "\fBQBrush\fR ( const QColor & color, BrushStyle style = SolidPattern )".br.ti -1c.BI "\fBQBrush\fR ( const QColor & color, const QPixmap & pixmap )".br.ti -1c.BI "\fBQBrush\fR ( const QBrush & b )".br.ti -1c.BI "\fB~QBrush\fR ()".br.ti -1c.BI "QBrush & \fBoperator=\fR ( const QBrush & b )".br.ti -1c.BI "BrushStyle \fBstyle\fR () const".br.ti -1c.BI "void \fBsetStyle\fR ( BrushStyle s )".br.ti -1c.BI "const QColor & \fBcolor\fR () const".br.ti -1c.BI "void \fBsetColor\fR ( const QColor & c )".br.ti -1c.BI "QPixmap * \fBpixmap\fR () const".br.ti -1c.BI "void \fBsetPixmap\fR ( const QPixmap & pixmap )".br.ti -1c.BI "bool \fBoperator==\fR ( const QBrush & b ) const".br.ti -1c.BI "bool \fBoperator!=\fR ( const QBrush & b ) const".br.in -1c.SH RELATED FUNCTION DOCUMENTATION.in +1c.ti -1c.BI "QDataStream & \fBoperator<<\fR ( QDataStream & s, const QBrush & b )".br.ti -1c.BI "QDataStream & \fBoperator>>\fR ( QDataStream & s, QBrush & b )".br.in -1c.SH DESCRIPTIONThe QBrush class defines the fill pattern of shapes drawn by a QPainter..PPA brush has a style and a color. One of the brush styles is a custom pattern, which is defined by a QPixmap..PPThe brush style defines the fill pattern. The default brush style is NoBrush (depending on how you construct a brush). This style tells the painter to not fill shapes. The standard style for filling is SolidPattern..PPThe brush color defines the color of the fill pattern. The QColor documentation lists the predefined colors..PPUse the QPen class for specifying line/outline styles..PPExample:.PP.nf.br        QPainter painter;.br        QBrush   brush( yellow );           // yellow solid pattern.br        painter.begin( &anyPaintDevice );   // paint something.br        painter.setBrush( brush );          // set the yellow brush.br        painter.setPen( NoPen );            // do not draw outline.br        painter.drawRect( 40,30, 200,100 ); // draw filled rectangle.br        painter.setBrush( NoBrush );        // do not fill.br        painter.setPen( black );            // set black pen, 0 pixel width.br        painter.drawRect( 10,10, 30,20 );   // draw rectangle outline.br        painter.end();                      // painting done.br.fi.PPSee the setStyle() function for a complete list of brush styles..PP<center>.ce 1.B "[Image Omitted]".PP</center>.PPSee also QPainter, QPainter::setBrush(), QPainter::setBrushOrigin(), Graphics Classes, Image Processing Classes, and Implicitly and Explicitly Shared Classes..SH MEMBER FUNCTION DOCUMENTATION.SH "QBrush::QBrush ()"Constructs a default black brush with the style NoBrush (will not fill shapes)..SH "QBrush::QBrush ( BrushStyle style )"Constructs a black brush with the style \fIstyle\fR..PPSee also setStyle()..SH "QBrush::QBrush ( const QColor & color, BrushStyle style = SolidPattern )"Constructs a brush with the color \fIcolor\fR and the style \fIstyle\fR..PPSee also setColor() and setStyle()..SH "QBrush::QBrush ( const QColor & color, const QPixmap & pixmap )"Constructs a brush with the color \fIcolor\fR and a custom pattern stored in \fIpixmap\fR..PPThe color will only have an effect for monochrome pixmaps, i.e. for QPixmap::depth() == 1..PPPixmap brushes are currently not supported when printing on X11..PPSee also setColor() and setPixmap()..SH "QBrush::QBrush ( const QBrush & b )"Constructs a brush that is a shallow copy of \fIb\fR..SH "QBrush::~QBrush ()"Destroys the brush..SH "const QColor & QBrush::color () const"Returns the brush color..PPSee also setColor()..SH "bool QBrush::operator!= ( const QBrush & b ) const"Returns TRUE if the brush is different from \fIb\fR; otherwise returns FALSE..PPTwo brushes are different if they have different styles, colors or pixmaps..PPSee also operator==()..SH "QBrush & QBrush::operator= ( const QBrush & b )"Assigns \fIb\fR to this brush and returns a reference to this brush..SH "bool QBrush::operator== ( const QBrush & b ) const"Returns TRUE if the brush is equal to \fIb\fR; otherwise returns FALSE..PPTwo brushes are equal if they have equal styles, colors and pixmaps..PPSee also operator!=()..SH "QPixmap * QBrush::pixmap () const"Returns a pointer to the custom brush pattern, or 0 if no custom brush pattern has been set..PPSee also setPixmap()..PPExample: richtext/richtext.cpp..SH "void QBrush::setColor ( const QColor & c )"Sets the brush color to \fIc\fR..PPSee also color() and setStyle()..PPExample: picture/picture.cpp..SH "void QBrush::setPixmap ( const QPixmap & pixmap )"Sets the brush pixmap to \fIpixmap\fR. The style is set to CustomPattern..PPThe current brush color will only have an effect for monochrome pixmaps, i.e. for QPixmap::depth() == 1..PPPixmap brushes are currently not supported when printing on X11..PPSee also pixmap() and color()..PPExample: richtext/richtext.cpp..SH "void QBrush::setStyle ( BrushStyle s )"Sets the brush style to \fIs\fR..PPThe brush styles are: <center>.nf.TSl - l. Pattern Meaning NoBrush will not fill shapes (default). SolidPattern solid (100%) fill pattern. Dense1Pattern 94% fill pattern. Dense2Pattern 88% fill pattern. Dense3Pattern 63% fill pattern. Dense4Pattern 50% fill pattern. Dense5Pattern 37% fill pattern. Dense6Pattern 12% fill pattern. Dense7Pattern 6% fill pattern. HorPattern horizontal lines pattern. VerPattern vertical lines pattern. CrossPattern crossing lines pattern. BDiagPattern diagonal lines (directed /) pattern. FDiagPattern diagonal lines (directed &#92;) pattern. DiagCrossPattern diagonal crossing lines pattern. CustomPattern.TE.fi</center>.PPOn Windows, dense and custom patterns cannot be transparent..PPSee the Detailed Description for a picture of all the styles..PPSee also style()..SH "BrushStyle QBrush::style () const"Returns the brush style..PPSee also setStyle()..SH RELATED FUNCTION DOCUMENTATION.SH "QDataStream & operator<< ( QDataStream & s, const QBrush & b )"Writes the brush \fIb\fR to the stream \fIs\fR and returns a reference to the stream..PPSee also Format of the QDataStream operators..SH "QDataStream & operator>> ( QDataStream & s, QBrush & b )"Reads the brush \fIb\fR from the stream \fIs\fR and returns a reference to the stream..PPSee also Format of the QDataStream operators..SH "SEE ALSO".BR http://doc.trolltech.com/qbrush.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com.  See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf you find a bug in Qt, please report it as described in.BR http://doc.trolltech.com/bughowto.html .Good bug reports help us to help you. Thank you..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qbrush.3qt) and the Qtversion (3.1.1).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -