<class name="QPen" doc="/**
&lt;p&gt;The &lt;a href=&quot;QPen.html#QPen(com.trolltech.qt.gui.QBrush, double, com.trolltech.qt.core.Qt.PenStyle, com.trolltech.qt.core.Qt.PenCapStyle, com.trolltech.qt.core.Qt.PenJoinStyle)&quot;&gt;&lt;tt&gt;QPen&lt;/tt&gt;&lt;/a&gt; class defines how a &lt;a href=&quot;QPainter.html&quot;&gt;&lt;tt&gt;QPainter&lt;/tt&gt;&lt;/a&gt; should draw lines and outlines of shapes.&lt;/p&gt;
&lt;p&gt;A pen has a &lt;a href=&quot;QPen.html#style()&quot;&gt;&lt;tt&gt;style&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QPen.html#width()&quot;&gt;&lt;tt&gt;width&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QPen.html#brush()&quot;&gt;&lt;tt&gt;brush&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QPen.html#capStyle()&quot;&gt;&lt;tt&gt;capStyle&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QPen.html#joinStyle()&quot;&gt;&lt;tt&gt;joinStyle&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The pen style defines the line type. The brush is used to fill strokes generated with the pen. Use the &lt;a href=&quot;QBrush.html&quot;&gt;&lt;tt&gt;QBrush&lt;/tt&gt;&lt;/a&gt; class to specify fill styles. The cap style determines the line end caps that can be drawn using &lt;a href=&quot;QPainter.html&quot;&gt;&lt;tt&gt;QPainter&lt;/tt&gt;&lt;/a&gt;, while the join style describes how joins between two lines are drawn. The pen width can be specified in both integer (&lt;a href=&quot;QPen.html#width()&quot;&gt;&lt;tt&gt;width&lt;/tt&gt;&lt;/a&gt;) and floating point (&lt;a href=&quot;QPen.html#widthF()&quot;&gt;&lt;tt&gt;widthF&lt;/tt&gt;&lt;/a&gt;) precision. A line width of zero indicates a cosmetic pen. This means that the pen width is always drawn one pixel wide, independent of the &lt;a href=&quot;QPainter.html#coordinate-transformations&quot;&gt;transformation&lt;/tt&gt;&lt;/a&gt; set on the painter.&lt;/p&gt;
&lt;p&gt;The various settings can easily be modified using the corresponding &lt;a href=&quot;QPen.html#setStyle(com.trolltech.qt.core.Qt.PenStyle)&quot;&gt;&lt;tt&gt;setStyle&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QPen.html#setWidth(int)&quot;&gt;&lt;tt&gt;setWidth&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QPen.html#setBrush(com.trolltech.qt.gui.QBrush)&quot;&gt;&lt;tt&gt;setBrush&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QPen.html#setCapStyle(com.trolltech.qt.core.Qt.PenCapStyle)&quot;&gt;&lt;tt&gt;setCapStyle&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QPen.html#setJoinStyle(com.trolltech.qt.core.Qt.PenJoinStyle)&quot;&gt;&lt;tt&gt;setJoinStyle&lt;/tt&gt;&lt;/a&gt; functions (note that the painter's pen must be reset when altering the pen's properties).&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;pre&gt;    QPainter painter(this);
    QPen pen(Qt::green, 3, Qt::DashDotLine, Qt::RoundCap, Qt::RoundJoin);
    painter.setPen(pen);&lt;/pre&gt;
&lt;p&gt;which is equivalent to&lt;/p&gt;
&lt;pre&gt;    QPainter painter(this);
    QPen pen();  &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; creates a default pen

    pen.setStyle(Qt::DashDotLine);
    pen.setWidth(3);
    pen.setBrush(Qt::green);
    pen.setCapStyle(Qt::RoundCap);
    pen.setJoinStyle(Qt::RoundJoin);

    painter.setPen(pen);&lt;/pre&gt;
&lt;p&gt;The default pen is a solid black brush with 0 width, square cap style (Qt::SquareCap), and bevel join style (Qt::BevelJoin).&lt;/p&gt;
&lt;p&gt;In addition &lt;a href=&quot;QPen.html#QPen(com.trolltech.qt.gui.QBrush, double, com.trolltech.qt.core.Qt.PenStyle, com.trolltech.qt.core.Qt.PenCapStyle, com.trolltech.qt.core.Qt.PenJoinStyle)&quot;&gt;&lt;tt&gt;QPen&lt;/tt&gt;&lt;/a&gt; provides the &lt;a href=&quot;QPen.html#color()&quot;&gt;&lt;tt&gt;color&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QPen.html#setColor(com.trolltech.qt.gui.QColor)&quot;&gt;&lt;tt&gt;setColor&lt;/tt&gt;&lt;/a&gt; convenience functions to extract and set the color of the pen's brush, respectively. Pens may also be compared and streamed.&lt;/p&gt;
&lt;p&gt;For more information about painting in general, see &lt;a href=&quot;%2E%2E/paintsystem.html&quot;&gt;The Paint System&lt;/tt&gt;&lt;/a&gt; documentation.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;#pen-style&quot;&gt;Pen Style&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#cap-style&quot;&gt;Cap Style&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#join-style&quot;&gt;Join Style&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;a name=&quot;pen-style&quot;&gt;&lt;/a&gt;
&lt;h3&gt;Pen Style&lt;/h3&gt;
&lt;p&gt;Qt provides several built-in styles represented by the Qt::PenStyle enum:&lt;/p&gt;
&lt;p&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;2&quot; cellspacing=&quot;1&quot; border=&quot;0&quot;&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/qpen-solid.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/qpen-dash.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/qpen-dot.png&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;Qt::SolidLine&lt;/td&gt;&lt;td&gt;Qt::DashLine&lt;/td&gt;&lt;td&gt;Qt::DotLine&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/qpen-dashdot.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/qpen-dashdotdot.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/qpen-custom.png&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;Qt::DashDotLine&lt;/td&gt;&lt;td&gt;Qt::DashDotDotLine&lt;/td&gt;&lt;td&gt;Qt::CustomDashLine&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/p&gt;
&lt;p&gt;Simply use the &lt;a href=&quot;QPen.html#setStyle(com.trolltech.qt.core.Qt.PenStyle)&quot;&gt;&lt;tt&gt;setStyle&lt;/tt&gt;&lt;/a&gt; function to convert the pen style to either of the built-in styles, except the Qt::CustomDashLine style which we will come back to shortly. Setting the style to Qt::NoPen tells the painter to not draw lines or outlines. The default pen style is Qt::SolidLine.&lt;/p&gt;
&lt;p&gt;Since Qt 4.1 it is also possible to specify a custom dash pattern using the &lt;a href=&quot;QPen.html#setDashPattern(java.util.List&lt;java.lang.Double&gt;)&quot;&gt;&lt;tt&gt;setDashPattern&lt;/tt&gt;&lt;/a&gt; function which implicitly converts the style of the pen to Qt::CustomDashLine. The pattern argument, a QVector, must be specified as an even number of qreal&lt;/tt&gt; entries where the entries 1, 3, 5..&amp;#x2e; are the dashes and 2, 4, 6..&amp;#x2e; are the spaces. For example, the custom pattern shown above is created using the following code:&lt;/p&gt;
&lt;pre&gt;    QPen pen;
    QVector&amp;lt;qreal&amp;gt; dashes;
    qreal space = 4;

    dashes &amp;lt;&amp;lt; 1 &amp;lt;&amp;lt; space &amp;lt;&amp;lt; 3 &amp;lt;&amp;lt; space &amp;lt;&amp;lt; 9 &amp;lt;&amp;lt; space
               &amp;lt;&amp;lt; 27 &amp;lt;&amp;lt; space &amp;lt;&amp;lt; 9;

    pen.setDashPattern(dashes);&lt;/pre&gt;
&lt;p&gt;Note that the dash pattern is specified in units of the pens width, e.g&amp;#x2e; a dash of length 5 in width 10 is 50 pixels long.&lt;/p&gt;
&lt;p&gt;The currently set dash pattern can be retrieved using the &lt;a href=&quot;QPen.html#dashPattern()&quot;&gt;&lt;tt&gt;dashPattern&lt;/tt&gt;&lt;/a&gt; function. Use the &lt;a href=&quot;QPen.html#isSolid()&quot;&gt;&lt;tt&gt;isSolid&lt;/tt&gt;&lt;/a&gt; function to determine whether the pen has a solid fill, or not.&lt;/p&gt;
&lt;a name=&quot;cap-style&quot;&gt;&lt;/a&gt;
&lt;h3&gt;Cap Style&lt;/h3&gt;
&lt;p&gt;The cap style defines how the end points of lines are drawn using &lt;a href=&quot;QPainter.html&quot;&gt;&lt;tt&gt;QPainter&lt;/tt&gt;&lt;/a&gt;. The cap style only apply to wide lines, i.e&amp;#x2e; when the width is 1 or greater. The Qt::PenCapStyle enum provides the following styles:&lt;/p&gt;
&lt;p&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;2&quot; cellspacing=&quot;1&quot; border=&quot;0&quot;&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/qpen-square.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/qpen-flat.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/qpen-roundcap.png&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;Qt::SquareCap&lt;/td&gt;&lt;td&gt;Qt::FlatCap&lt;/td&gt;&lt;td&gt;Qt::RoundCap&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/p&gt;
&lt;p&gt;The Qt::SquareCap style is a square line end that covers the end point and extends beyond it by half the line width. The Qt::FlatCap style is a square line end that does not cover the end point of the line. And the Qt::RoundCap style is a rounded line end covering the end point.&lt;/p&gt;
&lt;p&gt;The default is Qt::SquareCap.&lt;/p&gt;
&lt;p&gt;Whether or not end points are drawn when the pen width is 0 or 1 depends on the cap style. Using Qt::SquareCap or Qt::RoundCap they are drawn, using Qt::FlatCap they are not drawn.&lt;/p&gt;
&lt;a name=&quot;join-style&quot;&gt;&lt;/a&gt;
&lt;h3&gt;Join Style&lt;/h3&gt;
&lt;p&gt;The join style defines how joins between two connected lines can be drawn using &lt;a href=&quot;QPainter.html&quot;&gt;&lt;tt&gt;QPainter&lt;/tt&gt;&lt;/a&gt;. The join style only apply to wide lines, i.e&amp;#x2e; when the width is 1 or greater. The Qt::PenJoinStyle enum provides the following styles:&lt;/p&gt;
&lt;p&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;2&quot; cellspacing=&quot;1&quot; border=&quot;0&quot;&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/qpen-bevel.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/qpen-miter.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/qpen-roundjoin.png&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;Qt::BevelJoin&lt;/td&gt;&lt;td&gt;Qt::MiterJoin&lt;/td&gt;&lt;td&gt;Qt::RoundJoin&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/p&gt;
&lt;p&gt;The Qt::BevelJoin style fills the triangular notch between the two lines. The Qt::MiterJoin style extends the lines to meet at an angle. And the Qt::RoundJoin style fills a circular arc between the two lines.&lt;/p&gt;
&lt;p&gt;The default is Qt::BevelJoin.&lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;%2E%2E/images/qpen-miterlimit.png&quot; /&gt;&lt;/p&gt;&lt;p&gt;When the Qt::MiterJoin style is applied, it is possible to use the &lt;a href=&quot;QPen.html#setMiterLimit(double)&quot;&gt;&lt;tt&gt;setMiterLimit&lt;/tt&gt;&lt;/a&gt; function to specify how far the miter join can extend from the join point. The &lt;a href=&quot;QPen.html#miterLimit()&quot;&gt;&lt;tt&gt;miterLimit&lt;/tt&gt;&lt;/a&gt; is used to reduce artifacts between line joins where the lines are close to parallel.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;QPen.html#miterLimit()&quot;&gt;&lt;tt&gt;miterLimit&lt;/tt&gt;&lt;/a&gt; must be specified in units of the pens width, e.g&amp;#x2e; a miter limit of 5 in width 10 is 50 pixels long. The default miter limit is 2, i.e&amp;#x2e; twice the pen width in pixels.&lt;/p&gt;
&lt;p&gt;&lt;table width=&quot;100%&quot; align=&quot;center&quot; cellpadding=&quot;2&quot; cellspacing=&quot;1&quot; border=&quot;0&quot;&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/qpen-demo.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;The Path Stroking Demo&lt;/tt&gt;&lt;/b&gt;&lt;p&gt;The Path Stroking demo shows Qt's built-in dash patterns and shows how custom patterns can be used to extend the range of available patterns.&lt;/p&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/p&gt;

@see &lt;a href=&quot;QPainter.html&quot;&gt;&lt;tt&gt;QPainter&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QBrush.html&quot;&gt;&lt;tt&gt;QBrush&lt;/tt&gt;&lt;/a&gt;
@see Path Stroking Demo&lt;/tt&gt;
@see Scribble Example&lt;/tt&gt; */">
    <method name="public QPen(com.trolltech.qt.gui.QPen pen)" doc="/**
&lt;p&gt;Constructs a pen that is a copy of the given &lt;tt&gt;pen&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public QPen()" doc="/**
&lt;p&gt;Constructs a default black solid line pen with 0 width.&lt;/p&gt;
 */"/>
    <method name="public QPen(com.trolltech.qt.core.Qt.PenStyle arg__1)" doc="/**
&lt;p&gt;Constructs a black pen with 0 width and the given &lt;tt&gt;arg__1&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#setStyle(com.trolltech.qt.core.Qt.PenStyle)&quot;&gt;&lt;tt&gt;setStyle&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public QPen(com.trolltech.qt.gui.QColor color)" doc="/**
&lt;p&gt;Constructs a solid line pen with 0 width and the given &lt;tt&gt;color&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#setBrush(com.trolltech.qt.gui.QBrush)&quot;&gt;&lt;tt&gt;setBrush&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QPen.html#setColor(com.trolltech.qt.gui.QColor)&quot;&gt;&lt;tt&gt;setColor&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public QPen(com.trolltech.qt.gui.QBrush brush, double width, com.trolltech.qt.core.Qt.PenStyle s, com.trolltech.qt.core.Qt.PenCapStyle c, com.trolltech.qt.core.Qt.PenJoinStyle j)" doc="/**
&lt;p&gt;Constructs a pen with the specified &lt;tt&gt;brush&lt;/tt&gt;, &lt;tt&gt;width&lt;/tt&gt;, pen &lt;tt&gt;s&lt;/tt&gt;, &lt;tt&gt;c&lt;/tt&gt; style and &lt;tt&gt;j&lt;/tt&gt; style.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#setBrush(com.trolltech.qt.gui.QBrush)&quot;&gt;&lt;tt&gt;setBrush&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QPen.html#setWidth(int)&quot;&gt;&lt;tt&gt;setWidth&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QPen.html#setStyle(com.trolltech.qt.core.Qt.PenStyle)&quot;&gt;&lt;tt&gt;setStyle&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QPen.html#setCapStyle(com.trolltech.qt.core.Qt.PenCapStyle)&quot;&gt;&lt;tt&gt;setCapStyle&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QPen.html#setJoinStyle(com.trolltech.qt.core.Qt.PenJoinStyle)&quot;&gt;&lt;tt&gt;setJoinStyle&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public QPen(com.trolltech.qt.gui.QBrush brush, double width, com.trolltech.qt.core.Qt.PenStyle s, com.trolltech.qt.core.Qt.PenCapStyle c)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QPen.html#QPen(com.trolltech.qt.gui.QBrush, double, com.trolltech.qt.core.Qt.PenStyle, com.trolltech.qt.core.Qt.PenCapStyle, com.trolltech.qt.core.Qt.PenJoinStyle)&quot;&gt;&lt;tt&gt;QPen&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;brush&lt;/tt&gt;, &lt;tt&gt;width&lt;/tt&gt;, &lt;tt&gt;s&lt;/tt&gt;, &lt;tt&gt;c&lt;/tt&gt;, Qt::BevelJoin). */"/>
    <method name="public QPen(com.trolltech.qt.gui.QBrush brush, double width, com.trolltech.qt.core.Qt.PenStyle s)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QPen.html#QPen(com.trolltech.qt.gui.QBrush, double, com.trolltech.qt.core.Qt.PenStyle, com.trolltech.qt.core.Qt.PenCapStyle, com.trolltech.qt.core.Qt.PenJoinStyle)&quot;&gt;&lt;tt&gt;QPen&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;brush&lt;/tt&gt;, &lt;tt&gt;width&lt;/tt&gt;, &lt;tt&gt;s&lt;/tt&gt;, Qt::SquareCap, Qt::BevelJoin). */"/>
    <method name="public QPen(com.trolltech.qt.gui.QBrush brush, double width)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QPen.html#QPen(com.trolltech.qt.gui.QBrush, double, com.trolltech.qt.core.Qt.PenStyle, com.trolltech.qt.core.Qt.PenCapStyle, com.trolltech.qt.core.Qt.PenJoinStyle)&quot;&gt;&lt;tt&gt;QPen&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;brush&lt;/tt&gt;, &lt;tt&gt;width&lt;/tt&gt;, Qt::SolidLine, Qt::SquareCap, Qt::BevelJoin). */"/>
    <method name="public final com.trolltech.qt.gui.QBrush brush()" doc="/**
&lt;p&gt;Returns the brush used to fill strokes generated with this pen.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#setBrush(com.trolltech.qt.gui.QBrush)&quot;&gt;&lt;tt&gt;setBrush&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.core.Qt.PenCapStyle capStyle()" doc="/**
&lt;p&gt;Returns the pen's cap style.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#setCapStyle(com.trolltech.qt.core.Qt.PenCapStyle)&quot;&gt;&lt;tt&gt;setCapStyle&lt;/tt&gt;&lt;/a&gt;
@see Cap Style&lt;/tt&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QColor color()" doc="/**
&lt;p&gt;Returns the color of this pen's brush.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#brush()&quot;&gt;&lt;tt&gt;brush&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QPen.html#setColor(com.trolltech.qt.gui.QColor)&quot;&gt;&lt;tt&gt;setColor&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final double dashOffset()" doc="/**
&lt;p&gt;Returns the dash offset for the pen.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#setDashOffset(double)&quot;&gt;&lt;tt&gt;setDashOffset&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.util.List&lt;java.lang.Double&gt; dashPattern()" doc="/**
&lt;p&gt;Returns the dash pattern of this pen.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#setDashPattern(java.util.List&lt;java.lang.Double&gt;)&quot;&gt;&lt;tt&gt;setDashPattern&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QPen.html#style()&quot;&gt;&lt;tt&gt;style&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QPen.html#isSolid()&quot;&gt;&lt;tt&gt;isSolid&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean isCosmetic()" doc="/**
&lt;p&gt;Returns true if the pen is cosmetic; otherwise returns false.&lt;/p&gt;
&lt;p&gt;Cosmetic pens are used to draw strokes that have a constant width regardless of any transformations applied to the &lt;a href=&quot;QPainter.html&quot;&gt;&lt;tt&gt;QPainter&lt;/tt&gt;&lt;/a&gt; they are used with. Drawing a shape with a cosmetic pen ensures that its outline will have the same thickness at different scale factors.&lt;/p&gt;
&lt;p&gt;A zero width pen is cosmetic by default; pens with a non-zero width are non-cosmetic.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#setCosmetic(boolean)&quot;&gt;&lt;tt&gt;setCosmetic&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QPen.html#widthF()&quot;&gt;&lt;tt&gt;widthF&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean isSolid()" doc="/**
&lt;p&gt;Returns true if the pen has a solid fill, otherwise false.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#style()&quot;&gt;&lt;tt&gt;style&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QPen.html#dashPattern()&quot;&gt;&lt;tt&gt;dashPattern&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.core.Qt.PenJoinStyle joinStyle()" doc="/**
&lt;p&gt;Returns the pen's join style.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#setJoinStyle(com.trolltech.qt.core.Qt.PenJoinStyle)&quot;&gt;&lt;tt&gt;setJoinStyle&lt;/tt&gt;&lt;/a&gt;
@see Join Style&lt;/tt&gt; */"/>
    <method name="public final double miterLimit()" doc="/**
&lt;p&gt;Returns the miter limit of the pen. The miter limit is only relevant when the join style is set to Qt::MiterJoin.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#setMiterLimit(double)&quot;&gt;&lt;tt&gt;setMiterLimit&lt;/tt&gt;&lt;/a&gt;
@see Join Style&lt;/tt&gt; */"/>
    <method name="public final void writeTo(com.trolltech.qt.core.QDataStream arg__1)"/>
    <method name="public final void readFrom(com.trolltech.qt.core.QDataStream arg__1)"/>
    <method name="public final void setBrush(com.trolltech.qt.gui.QBrush brush)" doc="/**
&lt;p&gt;Sets the brush used to fill strokes generated with this pen to the given &lt;tt&gt;brush&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#brush()&quot;&gt;&lt;tt&gt;brush&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QPen.html#setColor(com.trolltech.qt.gui.QColor)&quot;&gt;&lt;tt&gt;setColor&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setCapStyle(com.trolltech.qt.core.Qt.PenCapStyle pcs)" doc="/**
&lt;p&gt;Sets the pen's cap style to the given &lt;tt&gt;pcs&lt;/tt&gt;. The default value is Qt::SquareCap.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#capStyle()&quot;&gt;&lt;tt&gt;capStyle&lt;/tt&gt;&lt;/a&gt;
@see Cap Style&lt;/tt&gt; */"/>
    <method name="public final void setColor(com.trolltech.qt.gui.QColor color)" doc="/**
&lt;p&gt;Sets the color of this pen's brush to the given &lt;tt&gt;color&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#setBrush(com.trolltech.qt.gui.QBrush)&quot;&gt;&lt;tt&gt;setBrush&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QPen.html#color()&quot;&gt;&lt;tt&gt;color&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setCosmetic(boolean cosmetic)" doc="/**
&lt;p&gt;Sets this pen to cosmetic or non-cosmetic, depending on the value of &lt;tt&gt;cosmetic&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#isCosmetic()&quot;&gt;&lt;tt&gt;isCosmetic&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setDashOffset(double doffset)" doc="/**
&lt;p&gt;Sets the dash offset for this pen to the given &lt;tt&gt;doffset&lt;/tt&gt;. This implicitly converts the style of the pen to Qt::CustomDashLine.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#dashOffset()&quot;&gt;&lt;tt&gt;dashOffset&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setDashPattern(java.util.List&lt;java.lang.Double&gt; pattern)" doc="/**
&lt;p&gt;Sets the dash pattern for this pen to the given &lt;tt&gt;pattern&lt;/tt&gt;. This implicitly converts the style of the pen to Qt::CustomDashLine.&lt;/p&gt;
&lt;p&gt;The pattern must be specified as an even number of entries where the entries 1, 3, 5..&amp;#x2e; are the dashes and 2, 4, 6..&amp;#x2e; are the spaces. For example:&lt;/p&gt;
&lt;p&gt;&lt;table width=&quot;100%&quot; align=&quot;center&quot; cellpadding=&quot;2&quot; cellspacing=&quot;1&quot; border=&quot;0&quot;&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/qpen-custom.png&quot; /&gt;&lt;/td&gt;&lt;td&gt;&lt;pre&gt;    QPen pen;
    QVector&amp;lt;qreal&amp;gt; dashes;
    qreal space = 4;
    dashes &amp;lt;&amp;lt; 1 &amp;lt;&amp;lt; space &amp;lt;&amp;lt; 3 &amp;lt;&amp;lt; space &amp;lt;&amp;lt; 9 &amp;lt;&amp;lt; space
               &amp;lt;&amp;lt; 27 &amp;lt;&amp;lt; space &amp;lt;&amp;lt; 9;
    pen.setDashPattern(dashes);&lt;/pre&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/p&gt;
&lt;p&gt;The dash pattern is specified in units of the pens width, e.g&amp;#x2e; a dash of length 5 in width 10 is 50 pixels long. Each dash is also subject to cap styles so a dash of 1 with square cap set will extend 0.5 pixels out in each direction resulting in a total width of 2.&lt;/p&gt;
&lt;p&gt;Note that the default cap style is Qt::SquareCap, meaning that a square line end covers the end point and extends beyond it by half the line width.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#setStyle(com.trolltech.qt.core.Qt.PenStyle)&quot;&gt;&lt;tt&gt;setStyle&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QPen.html#dashPattern()&quot;&gt;&lt;tt&gt;dashPattern&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QPen.html#setCapStyle(com.trolltech.qt.core.Qt.PenCapStyle)&quot;&gt;&lt;tt&gt;setCapStyle&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setJoinStyle(com.trolltech.qt.core.Qt.PenJoinStyle pcs)" doc="/**
&lt;p&gt;Sets the pen's join style to the given &lt;tt&gt;pcs&lt;/tt&gt;. The default value is Qt::BevelJoin.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#joinStyle()&quot;&gt;&lt;tt&gt;joinStyle&lt;/tt&gt;&lt;/a&gt;
@see Join Style&lt;/tt&gt; */"/>
    <method name="public final void setMiterLimit(double limit)" doc="/**
&lt;p&gt;Sets the miter limit of this pen to the given &lt;tt&gt;limit&lt;/tt&gt;.&lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;%2E%2E/images/qpen-miterlimit.png&quot; /&gt;&lt;/p&gt;&lt;p&gt;The miter limit describes how far a miter join can extend from the join point. This is used to reduce artifacts between line joins where the lines are close to parallel.&lt;/p&gt;
&lt;p&gt;This value does only have effect when the pen style is set to Qt::MiterJoin. The value is specified in units of the pen's width, e.g&amp;#x2e; a miter limit of 5 in width 10 is 50 pixels long. The default miter limit is 2, i.e&amp;#x2e; twice the pen width in pixels.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#miterLimit()&quot;&gt;&lt;tt&gt;miterLimit&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QPen.html#setJoinStyle(com.trolltech.qt.core.Qt.PenJoinStyle)&quot;&gt;&lt;tt&gt;setJoinStyle&lt;/tt&gt;&lt;/a&gt;
@see Join Style&lt;/tt&gt; */"/>
    <method name="public final void setStyle(com.trolltech.qt.core.Qt.PenStyle arg__1)" doc="/**
&lt;p&gt;Sets the pen style to the given &lt;tt&gt;arg__1&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;See the &lt;tt&gt;Qt::PenStyle&lt;/tt&gt; documentation for a list of the available styles. Since Qt 4.1 it is also possible to specify a custom dash pattern using the &lt;a href=&quot;QPen.html#setDashPattern(java.util.List&lt;java.lang.Double&gt;)&quot;&gt;&lt;tt&gt;setDashPattern&lt;/tt&gt;&lt;/a&gt; function which implicitly converts the style of the pen to Qt::CustomDashLine.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#style()&quot;&gt;&lt;tt&gt;style&lt;/tt&gt;&lt;/a&gt;
@see Pen Style&lt;/tt&gt; */"/>
    <method name="public final void setWidth(int width)" doc="/**
&lt;p&gt;Sets the pen width to the given &lt;tt&gt;width&lt;/tt&gt; in pixels with integer precision.&lt;/p&gt;
&lt;p&gt;A line width of zero indicates a cosmetic pen. This means that the pen width is always drawn one pixel wide, independent of the &lt;a href=&quot;QPainter.html#coordinate-transformations&quot;&gt;transformation&lt;/tt&gt;&lt;/a&gt; set on the painter.&lt;/p&gt;
&lt;p&gt;Setting a pen width with a negative value is not supported.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#setWidthF(double)&quot;&gt;&lt;tt&gt;setWidthF&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QPen.html#width()&quot;&gt;&lt;tt&gt;width&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setWidthF(double width)" doc="/**
&lt;p&gt;Sets the pen width to the given &lt;tt&gt;width&lt;/tt&gt; in pixels with floating point precision.&lt;/p&gt;
&lt;p&gt;A line width of zero indicates a cosmetic pen. This means that the pen width is always drawn one pixel wide, independent of the &lt;a href=&quot;QPainter.html#coordinate-transformations&quot;&gt;transformation&lt;/tt&gt;&lt;/a&gt; on the painter.&lt;/p&gt;
&lt;p&gt;Setting a pen width with a negative value is not supported.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#setWidth(int)&quot;&gt;&lt;tt&gt;setWidth&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QPen.html#widthF()&quot;&gt;&lt;tt&gt;widthF&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.core.Qt.PenStyle style()" doc="/**
&lt;p&gt;Returns the pen style.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#setStyle(com.trolltech.qt.core.Qt.PenStyle)&quot;&gt;&lt;tt&gt;setStyle&lt;/tt&gt;&lt;/a&gt;
@see Pen Style&lt;/tt&gt; */"/>
    <method name="public final int width()" doc="/**
&lt;p&gt;Returns the pen width with integer precision.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#setWidth(int)&quot;&gt;&lt;tt&gt;setWidth&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QPen.html#widthF()&quot;&gt;&lt;tt&gt;widthF&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final double widthF()" doc="/**
&lt;p&gt;Returns the pen width with floating point precision.&lt;/p&gt;

@see &lt;a href=&quot;QPen.html#setWidthF(double)&quot;&gt;&lt;tt&gt;setWidthF&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QPen.html#width()&quot;&gt;&lt;tt&gt;width&lt;/tt&gt;&lt;/a&gt; */"/>
</class>
