<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.5.0_09) on Tue Aug 07 16:58:37 CEST 2007 --> <TITLE> QBrush </TITLE> <META NAME="keywords" CONTENT="com.trolltech.qt.gui.QBrush class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="QBrush"; } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../com/trolltech/qt/gui/QBoxLayout.Direction.html" title="enum in com.trolltech.qt.gui"><B>PREV CLASS</B></A> <A HREF="../../../../com/trolltech/qt/gui/QButtonGroup.html" title="class in com.trolltech.qt.gui"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?com/trolltech/qt/gui/QBrush.html" target="_top"><B>FRAMES</B></A> <A HREF="QBrush.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#nested_classes_inherited_from_class_com.trolltech.qt.QSignalEmitter">NESTED</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> com.trolltech.qt.gui</FONT> <BR> Class QBrush</H2> <PRE> java.lang.Object <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/trolltech/qt/QSignalEmitter.html" title="class in com.trolltech.qt">com.trolltech.qt.QSignalEmitter</A> <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/trolltech/qt/QtJambiObject.html" title="class in com.trolltech.qt">com.trolltech.qt.QtJambiObject</A> <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.trolltech.qt.gui.QBrush</B> </PRE> <DL> <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../com/trolltech/qt/QtJambiInterface.html" title="interface in com.trolltech.qt">QtJambiInterface</A></DD> </DL> <HR> <DL> <DT><PRE>public class <B>QBrush</B><DT>extends <A HREF="../../../../com/trolltech/qt/QtJambiObject.html" title="class in com.trolltech.qt">QtJambiObject</A></DL> </PRE> <P> <p>The <a href="QBrush.html#QBrush(com.trolltech.qt.gui.QImage)"><tt>QBrush</tt></a> class defines the fill pattern of shapes drawn by <a href="QPainter.html"><tt>QPainter</tt></a>.</p> <p>A brush has a style, a color, a gradient and a texture.</p> <p>The brush <a href="QBrush.html#style()"><tt>style</tt></a> 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 <a href="QBrush.html#setStyle(com.trolltech.qt.core.Qt.BrushStyle)"><tt>setStyle</tt></a> function provides means for altering the style once the brush is constructed.</p> <p align="center"><img src="%2E%2E/images/brush-styles.png" alt="Brush Styles" /></p><p>The brush <a href="QBrush.html#color()"><tt>color</tt></a> defines the color of the fill pattern. The color can either be one of Qt's predefined colors, Qt::GlobalColor, or any other custom <a href="QColor.html"><tt>QColor</tt></a>. The currently set color can be retrieved and altered using the <a href="QBrush.html#color()"><tt>color</tt></a> and <a href="QBrush.html#setColor(com.trolltech.qt.gui.QColor)"><tt>setColor</tt></a> functions, respectively.</p> <p>The <a href="QBrush.html#gradient()"><tt>gradient</tt></a> 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 <a href="QGradient.html"><tt>QGradient</tt></a> as a constructor argument when creating the <a href="QBrush.html#QBrush(com.trolltech.qt.gui.QImage)"><tt>QBrush</tt></a>. Qt provides three different gradients: <a href="QLinearGradient.html"><tt>QLinearGradient</tt></a>, <a href="QConicalGradient.html"><tt>QConicalGradient</tt></a>, and <a href="QRadialGradient.html"><tt>QRadialGradient</tt></a> - all of which inherit <a href="QGradient.html"><tt>QGradient</tt></a>.</p> <pre> QRadialGradient gradient(50, 50, 50, 50, 50); gradient.setColorAt(0, QColor::fromRgbF(0, 1, 0, 1)); gradient.setColorAt(1, QColor::fromRgbF(0, 0, 0, 0)); QBrush brush(gradient);</pre> <p>The <a href="QBrush.html#texture()"><tt>texture</tt></a> 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 <a href="QBrush.html#setTexture(com.trolltech.qt.gui.QPixmap)"><tt>setTexture</tt></a>.</p> <p>Note that applying <a href="QBrush.html#setTexture(com.trolltech.qt.gui.QPixmap)"><tt>setTexture</tt></a> makes <a href="QBrush.html#style()"><tt>style</tt></a> == Qt::TexturePattern, regardless of previous style settings. Also, calling <a href="QBrush.html#setColor(com.trolltech.qt.gui.QColor)"><tt>setColor</tt></a> 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 <a href="QBitmap.html"><tt>QBitmap</tt></a>.</p> <p>The <a href="QBrush.html#isOpaque()"><tt>isOpaque</tt></a> function returns true if the brush is fully opaque otherwise false. A brush is considered opaque if:</p> <ul> <li>The alpha component of the <a href="QBrush.html#color()"><tt>color</tt></a> is 255.</li> <li>Its <a href="QBrush.html#texture()"><tt>texture</tt></a> does not have an alpha channel and is not a <a href="QBitmap.html"><tt>QBitmap</tt></a>.</li> <li>The colors in the <a href="QBrush.html#gradient()"><tt>gradient</tt></a> all have an alpha component that is 255.</li> </ul> <p><table width="100%" align="center" cellpadding="2" cellspacing="1" border="0"> <tr valign="top" class="odd"><td><img src="%2E%2E/images/brush-outline.png" alt="Outlines" /></td><td>To specify the style and color of lines and outlines, use the <a href="QPainter.html"><tt>QPainter</tt></a>'s <a href="QPen.html">pen</tt></a> combined with Qt::PenStyle and Qt::GlobalColor:<pre> 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);</pre> <p>Note that, by default, <a href="QPainter.html"><tt>QPainter</tt></a> renders the outline (using the currently set pen) when drawing shapes. Use <tt>painter.setPen(Qt::NoPen)</tt> to disable this behavior.</p> </td></tr> </table></p> <p>For more information about painting in general, see <a href="%2E%2E/paintsystem.html">The Paint System</tt></a> documentation.</p> <P> <P> <DL> <DT><B>See Also:</B><DD><tt>Qt::BrushStyle</tt>, <a href="QPainter.html"><tt>QPainter</tt></a>, <a href="QColor.html"><tt>QColor</tt></a></DL> <HR> <P> <!-- ======== NESTED CLASS SUMMARY ======== --> <A NAME="nested_class_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Nested Class Summary</B></FONT></TH> </TR> </TABLE> <A NAME="nested_classes_inherited_from_class_com.trolltech.qt.QSignalEmitter"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Nested classes/interfaces inherited from class com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QSignalEmitter.html" title="class in com.trolltech.qt">QSignalEmitter</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal0.html" title="class in com.trolltech.qt">QSignalEmitter.Signal0</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal1.html" title="class in com.trolltech.qt">QSignalEmitter.Signal1</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal1.html" title="type parameter in QSignalEmitter.Signal1">A</A>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="class in com.trolltech.qt">QSignalEmitter.Signal2</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="type parameter in QSignalEmitter.Signal2">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="type parameter in QSignalEmitter.Signal2">B</A>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="class in com.trolltech.qt">QSignalEmitter.Signal3</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="type parameter in QSignalEmitter.Signal3">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="type parameter in QSignalEmitter.Signal3">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="type parameter in QSignalEmitter.Signal3">C</A>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="class in com.trolltech.qt">QSignalEmitter.Signal4</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">D</A>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="class in com.trolltech.qt">QSignalEmitter.Signal5</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">E</A>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="class in com.trolltech.qt">QSignalEmitter.Signal6</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">F</A>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="class in com.trolltech.qt">QSignalEmitter.Signal7</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">F</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">G</A>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="class in com.trolltech.qt">QSignalEmitter.Signal8</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">F</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">G</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">H</A>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="class in com.trolltech.qt">QSignalEmitter.Signal9</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">F</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">G</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">H</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">I</A>></CODE></TD> </TR> </TABLE> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Field Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="../../../../com/trolltech/qt/gui/QBrush.html" title="class in com.trolltech.qt.gui">QBrush</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#NoBrush">NoBrush</A></B></CODE> <BR> </TD> </TR> </TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#QBrush()">QBrush</A></B>()</CODE> <BR> Constructs a default black brush with the style Qt.:NoBrush (i.e. this brush will not fill shapes).</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#QBrush(com.trolltech.qt.gui.QBrush)">QBrush</A></B>(<A HREF="../../../../com/trolltech/qt/gui/QBrush.html" title="class in com.trolltech.qt.gui">QBrush</A> brush)</CODE> <BR> Constructs a copy of <tt>brush</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#QBrush(com.trolltech.qt.gui.QColor)">QBrush</A></B>(<A HREF="../../../../com/trolltech/qt/gui/QColor.html" title="class in com.trolltech.qt.gui">QColor</A> color)</CODE> <BR> Equivalent to <a href="QBrush.html#QBrush(com.trolltech.qt.gui.QImage)"><tt>QBrush</tt></a>(<tt>color</tt>, Qt::SolidPattern).</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#QBrush(com.trolltech.qt.gui.QColor, com.trolltech.qt.gui.QPixmap)">QBrush</A></B>(<A HREF="../../../../com/trolltech/qt/gui/QColor.html" title="class in com.trolltech.qt.gui">QColor</A> color, <A HREF="../../../../com/trolltech/qt/gui/QPixmap.html" title="class in com.trolltech.qt.gui">QPixmap</A> pixmap)</CODE> <BR> Constructs a brush with the given <tt>color</tt> and the custom pattern stored in <tt>pixmap</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#QBrush(com.trolltech.qt.gui.QColor, com.trolltech.qt.core.Qt.BrushStyle)">QBrush</A></B>(<A HREF="../../../../com/trolltech/qt/gui/QColor.html" title="class in com.trolltech.qt.gui">QColor</A> color, <A HREF="../../../../com/trolltech/qt/core/Qt.BrushStyle.html" title="enum in com.trolltech.qt.core">Qt.BrushStyle</A> bs)</CODE> <BR> Constructs a brush with the given <tt>color</tt> and <tt>bs</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#QBrush(com.trolltech.qt.gui.QGradient)">QBrush</A></B>(<A HREF="../../../../com/trolltech/qt/gui/QGradient.html" title="class in com.trolltech.qt.gui">QGradient</A> gradient)</CODE> <BR> Constructs a brush based on the given <tt>gradient</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#QBrush(com.trolltech.qt.gui.QImage)">QBrush</A></B>(<A HREF="../../../../com/trolltech/qt/gui/QImage.html" title="class in com.trolltech.qt.gui">QImage</A> image)</CODE> <BR> Constructs a brush with a black color and a texture set to the given <tt>image</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#QBrush(com.trolltech.qt.gui.QPixmap)">QBrush</A></B>(<A HREF="../../../../com/trolltech/qt/gui/QPixmap.html" title="class in com.trolltech.qt.gui">QPixmap</A> pixmap)</CODE> <BR> Constructs a brush with a black color and a texture set to the given <tt>pixmap</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#QBrush(com.trolltech.qt.core.Qt.BrushStyle)">QBrush</A></B>(<A HREF="../../../../com/trolltech/qt/core/Qt.BrushStyle.html" title="enum in com.trolltech.qt.core">Qt.BrushStyle</A> bs)</CODE> <BR> Constructs a black brush with the given <tt>bs</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#QBrush(com.trolltech.qt.core.Qt.GlobalColor, com.trolltech.qt.gui.QPixmap)">QBrush</A></B>(<A HREF="../../../../com/trolltech/qt/core/Qt.GlobalColor.html" title="enum in com.trolltech.qt.core">Qt.GlobalColor</A> color, <A HREF="../../../../com/trolltech/qt/gui/QPixmap.html" title="class in com.trolltech.qt.gui">QPixmap</A> pixmap)</CODE> <BR> Constructs a brush with the given <tt>color</tt> and the custom pattern stored in <tt>pixmap</tt>.</TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/trolltech/qt/gui/QColor.html" title="class in com.trolltech.qt.gui">QColor</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#color()">color</A></B>()</CODE> <BR> Returns the brush color.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#equals(java.lang.Object)">equals</A></B>(java.lang.Object other)</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="../../../../com/trolltech/qt/gui/QBrush.html" title="class in com.trolltech.qt.gui">QBrush</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#fromNativePointer(com.trolltech.qt.QNativePointer)">fromNativePointer</A></B>(<A HREF="../../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A> nativePointer)</CODE> <BR> This function returns the QBrush instance pointed to by nativePointer</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/trolltech/qt/gui/QGradient.html" title="class in com.trolltech.qt.gui">QGradient</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#gradient()">gradient</A></B>()</CODE> <BR> Returns the gradient describing this brush.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#isOpaque()">isOpaque</A></B>()</CODE> <BR> Returns true if the brush is fully opaque otherwise false.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/trolltech/qt/gui/QMatrix.html" title="class in com.trolltech.qt.gui">QMatrix</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#matrix()">matrix</A></B>()</CODE> <BR> Returns the current transformation matrix for the brush.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="../../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#nativePointerArray(com.trolltech.qt.gui.QBrush[])">nativePointerArray</A></B>(<A HREF="../../../../com/trolltech/qt/gui/QBrush.html" title="class in com.trolltech.qt.gui">QBrush</A>[] array)</CODE> <BR> This function returns a QNativePointer that is pointing to the specified QBrush array.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#readFrom(com.trolltech.qt.core.QDataStream)">readFrom</A></B>(<A HREF="../../../../com/trolltech/qt/core/QDataStream.html" title="class in com.trolltech.qt.core">QDataStream</A> arg__1)</CODE> <BR> Reads a QBrush from arg__1.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#setColor(com.trolltech.qt.gui.QColor)">setColor</A></B>(<A HREF="../../../../com/trolltech/qt/gui/QColor.html" title="class in com.trolltech.qt.gui">QColor</A> color)</CODE> <BR> Sets the brush color to the given <tt>color</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#setColor(com.trolltech.qt.core.Qt.GlobalColor)">setColor</A></B>(<A HREF="../../../../com/trolltech/qt/core/Qt.GlobalColor.html" title="enum in com.trolltech.qt.core">Qt.GlobalColor</A> color)</CODE> <BR> Sets the brush color to the given <tt>color</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#setMatrix(com.trolltech.qt.gui.QMatrix)">setMatrix</A></B>(<A HREF="../../../../com/trolltech/qt/gui/QMatrix.html" title="class in com.trolltech.qt.gui">QMatrix</A> mat)</CODE> <BR> Sets <tt>mat</tt> as an explicit transformation matrix on the current brush.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#setStyle(com.trolltech.qt.core.Qt.BrushStyle)">setStyle</A></B>(<A HREF="../../../../com/trolltech/qt/core/Qt.BrushStyle.html" title="enum in com.trolltech.qt.core">Qt.BrushStyle</A> arg__1)</CODE> <BR> Sets the brush style to <tt>arg__1</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#setTexture(com.trolltech.qt.gui.QPixmap)">setTexture</A></B>(<A HREF="../../../../com/trolltech/qt/gui/QPixmap.html" title="class in com.trolltech.qt.gui">QPixmap</A> pixmap)</CODE> <BR> Sets the brush pixmap to <tt>pixmap</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#setTextureImage(com.trolltech.qt.gui.QImage)">setTextureImage</A></B>(<A HREF="../../../../com/trolltech/qt/gui/QImage.html" title="class in com.trolltech.qt.gui">QImage</A> image)</CODE> <BR> Sets the brush image to <tt>image</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#setTransform(com.trolltech.qt.gui.QTransform)">setTransform</A></B>(<A HREF="../../../../com/trolltech/qt/gui/QTransform.html" title="class in com.trolltech.qt.gui">QTransform</A> arg__1)</CODE> <BR> Sets <tt>arg__1</tt> as an explicit transformation matrix on the current brush.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/trolltech/qt/core/Qt.BrushStyle.html" title="enum in com.trolltech.qt.core">Qt.BrushStyle</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#style()">style</A></B>()</CODE> <BR> Returns the brush style.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/trolltech/qt/gui/QPixmap.html" title="class in com.trolltech.qt.gui">QPixmap</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#texture()">texture</A></B>()</CODE> <BR> Returns the custom brush pattern, or a null pixmap if no custom brush pattern has been set.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/trolltech/qt/gui/QImage.html" title="class in com.trolltech.qt.gui">QImage</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#textureImage()">textureImage</A></B>()</CODE> <BR> Returns the custom brush pattern, or a null image if no custom brush pattern has been set.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/trolltech/qt/gui/QTransform.html" title="class in com.trolltech.qt.gui">QTransform</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#transform()">transform</A></B>()</CODE> <BR> Returns the current transformation matrix for the brush.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QBrush.html#writeTo(com.trolltech.qt.core.QDataStream)">writeTo</A></B>(<A HREF="../../../../com/trolltech/qt/core/QDataStream.html" title="class in com.trolltech.qt.core">QDataStream</A> arg__1)</CODE> <BR> Writes thisQBrush to arg__1.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_com.trolltech.qt.QtJambiObject"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QtJambiObject.html" title="class in com.trolltech.qt">QtJambiObject</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../com/trolltech/qt/QtJambiObject.html#dispose()">dispose</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#disposed()">disposed</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#finalize()">finalize</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#reassignNativeResources(com.trolltech.qt.QtJambiObject, java.lang.Class)">reassignNativeResources</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#tr(java.lang.String)">tr</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#tr(java.lang.String, java.lang.String)">tr</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#tr(java.lang.String, java.lang.String, int)">tr</A></CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_com.trolltech.qt.QSignalEmitter"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QSignalEmitter.html" title="class in com.trolltech.qt">QSignalEmitter</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#blockSignals(boolean)">blockSignals</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#disconnect()">disconnect</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#disconnect(java.lang.Object)">disconnect</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#signalsBlocked()">signalsBlocked</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#signalSender()">signalSender</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#thread()">thread</A></CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>clone, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_com.trolltech.qt.QtJambiInterface"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from interface com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QtJambiInterface.html" title="interface in com.trolltech.qt">QtJambiInterface</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#disableGarbageCollection()">disableGarbageCollection</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#nativeId()">nativeId</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#nativePointer()">nativePointer</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#reenableGarbageCollection()">reenableGarbageCollection</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#setJavaOwnership()">setJavaOwnership</A></CODE></TD> </TR> </TABLE> <P> <!-- ============ FIELD DETAIL =========== --> <A NAME="field_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Field Detail</B></FONT></TH> </TR> </TABLE> <A NAME="NoBrush"><!-- --></A><H3> NoBrush</H3> <PRE> public static final <A HREF="../../../../com/trolltech/qt/gui/QBrush.html" title="class in com.trolltech.qt.gui">QBrush</A> <B>NoBrush</B></PRE> <DL> <DL> </DL> </DL> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="QBrush(com.trolltech.qt.gui.QPixmap)"><!-- --></A><H3> QBrush</H3> <PRE> public <B>QBrush</B>(<A HREF="../../../../com/trolltech/qt/gui/QPixmap.html" title="class in com.trolltech.qt.gui">QPixmap</A> pixmap)</PRE> <DL> <DD><p>Constructs a brush with a black color and a texture set to the given <tt>pixmap</tt>. The style is set to Qt::TexturePattern.</p> <P> <DL> <DT><B>See Also:</B><DD><a href="QBrush.html#setTexture(com.trolltech.qt.gui.QPixmap)"><tt>setTexture</tt></a></DL> </DL> <HR> <A NAME="QBrush(com.trolltech.qt.gui.QColor)"><!-- --></A><H3> QBrush</H3> <PRE> public <B>QBrush</B>(<A HREF="../../../../com/trolltech/qt/gui/QColor.html" title="class in com.trolltech.qt.gui">QColor</A> color)</PRE> <DL> <DD><p>Equivalent to <a href="QBrush.html#QBrush(com.trolltech.qt.gui.QImage)"><tt>QBrush</tt></a>(<tt>color</tt>, Qt::SolidPattern). <P> </DL> <HR> <A NAME="QBrush(com.trolltech.qt.gui.QColor, com.trolltech.qt.core.Qt.BrushStyle)"><!-- --></A><H3> QBrush</H3> <PRE> public <B>QBrush</B>(<A HREF="../../../../com/trolltech/qt/gui/QColor.html" title="class in com.trolltech.qt.gui">QColor</A> color, <A HREF="../../../../com/trolltech/qt/core/Qt.BrushStyle.html" title="enum in com.trolltech.qt.core">Qt.BrushStyle</A> bs)</PRE> <DL> <DD><p>Constructs a brush with the given <tt>color</tt> and <tt>bs</tt>.</p> <P> <DL> <DT><B>See Also:</B><DD><a href="QBrush.html#setColor(com.trolltech.qt.gui.QColor)"><tt>setColor</tt></a>, <a href="QBrush.html#setStyle(com.trolltech.qt.core.Qt.BrushStyle)"><tt>setStyle</tt></a></DL> </DL> <HR> <A NAME="QBrush(com.trolltech.qt.gui.QColor, com.trolltech.qt.gui.QPixmap)"><!-- --></A><H3> QBrush</H3> <PRE> public <B>QBrush</B>(<A HREF="../../../../com/trolltech/qt/gui/QColor.html" title="class in com.trolltech.qt.gui">QColor</A> color, <A HREF="../../../../com/trolltech/qt/gui/QPixmap.html" title="class in com.trolltech.qt.gui">QPixmap</A> pixmap)</PRE> <DL> <DD><p>Constructs a brush with the given <tt>color</tt> and the custom pattern stored in <tt>pixmap</tt>.</p> <p>The style is set to Qt::TexturePattern. The color will only have an effect for QBitmaps.</p> <P> <DL> <DT><B>See Also:</B><DD><a href="QBrush.html#setColor(com.trolltech.qt.gui.QColor)"><tt>setColor</tt></a>, <tt>setPixmap</tt></DL> </DL> <HR> <A NAME="QBrush()"><!-- --></A><H3> QBrush</H3> <PRE> public <B>QBrush</B>()</PRE> <DL> <DD><p>Constructs a default black brush with the style Qt.:NoBrush (i.e. this brush will not fill shapes).</p> <P> </DL> <HR> <A NAME="QBrush(com.trolltech.qt.gui.QBrush)"><!-- --></A><H3> QBrush</H3> <PRE> public <B>QBrush</B>(<A HREF="../../../../com/trolltech/qt/gui/QBrush.html" title="class in com.trolltech.qt.gui">QBrush</A> brush)</PRE> <DL> <DD><p>Constructs a copy of <tt>brush</tt>.</p> <P> </DL> <HR> <A NAME="QBrush(com.trolltech.qt.gui.QGradient)"><!-- --></A><H3> QBrush</H3> <PRE> public <B>QBrush</B>(<A HREF="../../../../com/trolltech/qt/gui/QGradient.html" title="class in com.trolltech.qt.gui">QGradient</A> gradient)</PRE> <DL> <DD><p>Constructs a brush based on the given <tt>gradient</tt>.</p> <p>The brush style is set to the corresponding gradient style (either Qt::LinearGradientPattern, Qt::RadialGradientPattern or Qt::ConicalGradientPattern).</p> <P> </DL> <HR> <A NAME="QBrush(com.trolltech.qt.core.Qt.BrushStyle)"><!-- --></A><H3> QBrush</H3> <PRE> public <B>QBrush</B>(<A HREF="../../../../com/trolltech/qt/core/Qt.BrushStyle.html" title="enum in com.trolltech.qt.core">Qt.BrushStyle</A> bs)</PRE> <DL> <DD><p>Constructs a black brush with the given <tt>bs</tt>.</p> <P> <DL> <DT><B>See Also:</B><DD><a href="QBrush.html#setStyle(com.trolltech.qt.core.Qt.BrushStyle)"><tt>setStyle</tt></a></DL> </DL> <HR> <A NAME="QBrush(com.trolltech.qt.core.Qt.GlobalColor, com.trolltech.qt.gui.QPixmap)"><!-- --></A><H3> QBrush</H3> <PRE> public <B>QBrush</B>(<A HREF="../../../../com/trolltech/qt/core/Qt.GlobalColor.html" title="enum in com.trolltech.qt.core">Qt.GlobalColor</A> color, <A HREF="../../../../com/trolltech/qt/gui/QPixmap.html" title="class in com.trolltech.qt.gui">QPixmap</A> pixmap)</PRE> <DL> <DD><p>Constructs a brush with the given <tt>color</tt> and the custom pattern stored in <tt>pixmap</tt>.</p> <p>The style is set to Qt::TexturePattern. The color will only have an effect for QBitmaps.</p> <P> <DL> <DT><B>See Also:</B><DD><a href="QBrush.html#setColor(com.trolltech.qt.gui.QColor)"><tt>setColor</tt></a>, <tt>setPixmap</tt></DL> </DL> <HR> <A NAME="QBrush(com.trolltech.qt.gui.QImage)"><!-- --></A><H3> QBrush</H3> <PRE> public <B>QBrush</B>(<A HREF="../../../../com/trolltech/qt/gui/QImage.html" title="class in com.trolltech.qt.gui">QImage</A> image)</PRE> <DL> <DD><p>Constructs a brush with a black color and a texture set to the given <tt>image</tt>. The style is set to Qt::TexturePattern.</p> <P> <DL> <DT><B>See Also:</B><DD><a href="QBrush.html#setTextureImage(com.trolltech.qt.gui.QImage)"><tt>setTextureImage</tt></a></DL> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="color()"><!-- --></A><H3> color</H3> <PRE> public final <A HREF="../../../../com/trolltech/qt/gui/QColor.html" title="class in com.trolltech.qt.gui">QColor</A> <B>color</B>()</PRE> <DL> <DD><p>Returns the brush color.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QBrush.html#setColor(com.trolltech.qt.gui.QColor)"><tt>setColor</tt></a></DL> </DD> </DL> <HR> <A NAME="gradient()"><!-- --></A><H3> gradient</H3> <PRE> public final <A HREF="../../../../com/trolltech/qt/gui/QGradient.html" title="class in com.trolltech.qt.gui">QGradient</A> <B>gradient</B>()</PRE> <DL> <DD><p>Returns the gradient describing this brush.</p> <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="isOpaque()"><!-- --></A><H3> isOpaque</H3> <PRE> public final boolean <B>isOpaque</B>()</PRE> <DL> <DD><p>Returns true if the brush is fully opaque otherwise false. A brush is considered opaque if:</p> <ul> <li>The alpha component of the <a href="QBrush.html#color()"><tt>color</tt></a> is 255.</li> <li>Its <a href="QBrush.html#texture()"><tt>texture</tt></a> does not have an alpha channel and is not a <a href="QBitmap.html"><tt>QBitmap</tt></a>.</li> <li>The colors in the <a href="QBrush.html#gradient()"><tt>gradient</tt></a> all have an alpha component that is 255.</li> </ul> <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="matrix()"><!-- --></A><H3> matrix</H3> <PRE> public final <A HREF="../../../../com/trolltech/qt/gui/QMatrix.html" title="class in com.trolltech.qt.gui">QMatrix</A> <B>matrix</B>()</PRE> <DL> <DD><p>Returns the current transformation matrix for the brush.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QBrush.html#setMatrix(com.trolltech.qt.gui.QMatrix)"><tt>setMatrix</tt></a></DL> </DD> </DL> <HR> <A NAME="writeTo(com.trolltech.qt.core.QDataStream)"><!-- --></A><H3> writeTo</H3> <PRE> public final void <B>writeTo</B>(<A HREF="../../../../com/trolltech/qt/core/QDataStream.html" title="class in com.trolltech.qt.core">QDataStream</A> arg__1)</PRE> <DL> <DD>Writes thisQBrush to arg__1. <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="readFrom(com.trolltech.qt.core.QDataStream)"><!-- --></A><H3> readFrom</H3> <PRE> public final void <B>readFrom</B>(<A HREF="../../../../com/trolltech/qt/core/QDataStream.html" title="class in com.trolltech.qt.core">QDataStream</A> arg__1)</PRE> <DL> <DD>Reads a QBrush from arg__1. <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="setColor(com.trolltech.qt.core.Qt.GlobalColor)"><!-- --></A><H3> setColor</H3> <PRE> public final void <B>setColor</B>(<A HREF="../../../../com/trolltech/qt/core/Qt.GlobalColor.html" title="enum in com.trolltech.qt.core">Qt.GlobalColor</A> color)</PRE> <DL> <DD><p>Sets the brush color to the given <tt>color</tt>.</p> <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="setColor(com.trolltech.qt.gui.QColor)"><!-- --></A><H3> setColor</H3> <PRE> public final void <B>setColor</B>(<A HREF="../../../../com/trolltech/qt/gui/QColor.html" title="class in com.trolltech.qt.gui">QColor</A> color)</PRE> <DL> <DD><p>Sets the brush color to the given <tt>color</tt>.</p> <p>Note that calling <a href="QBrush.html#setColor(com.trolltech.qt.gui.QColor)"><tt>setColor</tt></a> 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 <a href="QBitmap.html"><tt>QBitmap</tt></a>.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QBrush.html#color()"><tt>color</tt></a></DL> </DD> </DL> <HR> <A NAME="setMatrix(com.trolltech.qt.gui.QMatrix)"><!-- --></A><H3> setMatrix</H3> <PRE> public final void <B>setMatrix</B>(<A HREF="../../../../com/trolltech/qt/gui/QMatrix.html" title="class in com.trolltech.qt.gui">QMatrix</A> mat)</PRE> <DL> <DD><p>Sets <tt>mat</tt> as an explicit transformation matrix on the current brush. The brush transformation matrix is merged with <a href="QPainter.html"><tt>QPainter</tt></a> transformation matrix to produce the final result.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QBrush.html#matrix()"><tt>matrix</tt></a></DL> </DD> </DL> <HR> <A NAME="setStyle(com.trolltech.qt.core.Qt.BrushStyle)"><!-- --></A><H3> setStyle</H3> <PRE> public final void <B>setStyle</B>(<A HREF="../../../../com/trolltech/qt/core/Qt.BrushStyle.html" title="enum in com.trolltech.qt.core">Qt.BrushStyle</A> arg__1)</PRE> <DL> <DD><p>Sets the brush style to <tt>arg__1</tt>.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QBrush.html#style()"><tt>style</tt></a></DL> </DD> </DL> <HR> <A NAME="setTexture(com.trolltech.qt.gui.QPixmap)"><!-- --></A><H3> setTexture</H3> <PRE> public final void <B>setTexture</B>(<A HREF="../../../../com/trolltech/qt/gui/QPixmap.html" title="class in com.trolltech.qt.gui">QPixmap</A> pixmap)</PRE> <DL> <DD><p>Sets the brush pixmap to <tt>pixmap</tt>. The style is set to Qt::TexturePattern.</p> <p>The current brush color will only have an effect for monochrome pixmaps, i.e. for QPixmap::depth() == 1 (<a href="QBitmap.html">QBitmaps</a>).</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QBrush.html#texture()"><tt>texture</tt></a></DL> </DD> </DL> <HR> <A NAME="setTextureImage(com.trolltech.qt.gui.QImage)"><!-- --></A><H3> setTextureImage</H3> <PRE> public final void <B>setTextureImage</B>(<A HREF="../../../../com/trolltech/qt/gui/QImage.html" title="class in com.trolltech.qt.gui">QImage</A> image)</PRE> <DL> <DD><p>Sets the brush image to <tt>image</tt>. The style is set to Qt::TexturePattern.</p> <p>The current brush color will only have an effect for monochrome images, i.e. for QImage::depth() == 1.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QBrush.html#textureImage()"><tt>textureImage</tt></a></DL> </DD> </DL> <HR> <A NAME="setTransform(com.trolltech.qt.gui.QTransform)"><!-- --></A><H3> setTransform</H3> <PRE> public final void <B>setTransform</B>(<A HREF="../../../../com/trolltech/qt/gui/QTransform.html" title="class in com.trolltech.qt.gui">QTransform</A> arg__1)</PRE> <DL> <DD><p>Sets <tt>arg__1</tt> as an explicit transformation matrix on the current brush. The brush transformation matrix is merged with <a href="QPainter.html"><tt>QPainter</tt></a> transformation matrix to produce the final result.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QBrush.html#transform()"><tt>transform</tt></a></DL> </DD> </DL> <HR> <A NAME="style()"><!-- --></A><H3> style</H3> <PRE> public final <A HREF="../../../../com/trolltech/qt/core/Qt.BrushStyle.html" title="enum in com.trolltech.qt.core">Qt.BrushStyle</A> <B>style</B>()</PRE> <DL> <DD><p>Returns the brush style.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QBrush.html#setStyle(com.trolltech.qt.core.Qt.BrushStyle)"><tt>setStyle</tt></a></DL> </DD> </DL> <HR> <A NAME="texture()"><!-- --></A><H3> texture</H3> <PRE> public final <A HREF="../../../../com/trolltech/qt/gui/QPixmap.html" title="class in com.trolltech.qt.gui">QPixmap</A> <B>texture</B>()</PRE> <DL> <DD><p>Returns the custom brush pattern, or a null pixmap if no custom brush pattern has been set.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QBrush.html#setTexture(com.trolltech.qt.gui.QPixmap)"><tt>setTexture</tt></a></DL> </DD> </DL> <HR> <A NAME="textureImage()"><!-- --></A><H3> textureImage</H3> <PRE> public final <A HREF="../../../../com/trolltech/qt/gui/QImage.html" title="class in com.trolltech.qt.gui">QImage</A> <B>textureImage</B>()</PRE> <DL> <DD><p>Returns the custom brush pattern, or a null image if no custom brush pattern has been set.</p> <p>If the texture was set as a <a href="QPixmap.html"><tt>QPixmap</tt></a> it will be converted to a <a href="QImage.html"><tt>QImage</tt></a>.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QBrush.html#setTextureImage(com.trolltech.qt.gui.QImage)"><tt>setTextureImage</tt></a></DL> </DD> </DL> <HR> <A NAME="transform()"><!-- --></A><H3> transform</H3> <PRE> public final <A HREF="../../../../com/trolltech/qt/gui/QTransform.html" title="class in com.trolltech.qt.gui">QTransform</A> <B>transform</B>()</PRE> <DL> <DD><p>Returns the current transformation matrix for the brush.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QBrush.html#setTransform(com.trolltech.qt.gui.QTransform)"><tt>setTransform</tt></a></DL> </DD> </DL> <HR> <A NAME="fromNativePointer(com.trolltech.qt.QNativePointer)"><!-- --></A><H3> fromNativePointer</H3> <PRE> public static <A HREF="../../../../com/trolltech/qt/gui/QBrush.html" title="class in com.trolltech.qt.gui">QBrush</A> <B>fromNativePointer</B>(<A HREF="../../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A> nativePointer)</PRE> <DL> <DD>This function returns the QBrush instance pointed to by nativePointer <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>nativePointer</CODE> - the QNativePointer of which object should be returned.</DL> </DD> </DL> <HR> <A NAME="nativePointerArray(com.trolltech.qt.gui.QBrush[])"><!-- --></A><H3> nativePointerArray</H3> <PRE> public static <A HREF="../../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A> <B>nativePointerArray</B>(<A HREF="../../../../com/trolltech/qt/gui/QBrush.html" title="class in com.trolltech.qt.gui">QBrush</A>[] array)</PRE> <DL> <DD>This function returns a QNativePointer that is pointing to the specified QBrush array. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>array</CODE> - the array that the returned pointer will point to. <DT><B>Returns:</B><DD>a QNativePointer that is pointing to the specified array.</DL> </DD> </DL> <HR> <A NAME="equals(java.lang.Object)"><!-- --></A><H3> equals</H3> <PRE> public boolean <B>equals</B>(java.lang.Object other)</PRE> <DL> <DD> <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE>equals</CODE> in class <CODE>java.lang.Object</CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../com/trolltech/qt/gui/QBoxLayout.Direction.html" title="enum in com.trolltech.qt.gui"><B>PREV CLASS</B></A> <A HREF="../../../../com/trolltech/qt/gui/QButtonGroup.html" title="class in com.trolltech.qt.gui"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?com/trolltech/qt/gui/QBrush.html" target="_top"><B>FRAMES</B></A> <A HREF="QBrush.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#nested_classes_inherited_from_class_com.trolltech.qt.QSignalEmitter">NESTED</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>