亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? qpen.cpp

?? qt-x11-opensource-src-4.1.4.tar.gz源碼
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/******************************************************************************** Copyright (C) 1992-2006 Trolltech ASA. All rights reserved.**** This file is part of the QtGui module of the Qt Toolkit.**** This file may be used under the terms of the GNU General Public** License version 2.0 as published by the Free Software Foundation** and appearing in the file LICENSE.GPL included in the packaging of** this file.  Please review the following information to ensure GNU** General Public Licensing requirements will be met:** http://www.trolltech.com/products/qt/opensource.html**** If you are unsure which license is appropriate for your use, please** review the following information:** http://www.trolltech.com/products/qt/licensing.html or contact the** sales department at sales@trolltech.com.**** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.******************************************************************************/#include "qpen.h"#include "qdatastream.h"#include "qvariant.h"#include "qbrush.h"#include <qdebug.h>/*!    \class QPen    \ingroup multimedia    \ingroup shared    \mainclass    \brief The QPen class defines how a QPainter should draw lines and outlines    of shapes.    A pen has a style(), width(), brush(), capStyle() and joinStyle().    The pen style defines the line type. The brush is used to fill    strokes generated with the pen. Use the QBrush class to specify    fill styles.  The cap style determines the line end caps that can    be drawn using QPainter, while the join style describes how joins    between two lines are drawn. The pen width can be specified in    both integer (width()) and floating point (widthF()) 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 \l    {QPainter#Coordinate Transformations}{transformation} set on the    painter.    The various settings can easily be modified using the    corresponding setStyle(), setWidth(), setBrush(), setCapStyle()    and setJoinStyle() functions (note that the painter's pen must be    reset when altering the pen's properties).    For example:    \code        QPainter painter(this);        QPen pen(Qt::green, 3, Qt::DashDotLine, Qt::RoundCap. Qt::RoundJoin);        painter.setPen(pen);    \endcode    which is equivalent to    \code        QPainter painter(this);        QPen pen();  // 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);    \endcode    The default pen is a solid black brush with 0 width, square    cap style (Qt::SquareCap), and  bevel join style (Qt::BevelJoin).    In addition QPen provides the color() and setColor()    convenience functions to extract and set the color of the pen's    brush, respectively. Pens may also be compared and streamed.    For more information about painting in general, see {The Paint    System} documentation.    \tableofcontents    \section1 Pen Style    Qt provides several built-in styles represented by the    Qt::PenStyle enum:    \table    \row    \o \inlineimage qpen-solid.png    \o \inlineimage qpen-dash.png    \o \inlineimage qpen-dot.png    \row    \o Qt::SolidLine    \o Qt::DashLine    \o Qt::DotLine    \row    \o \inlineimage qpen-dashdot.png    \o \inlineimage qpen-dashdotdot.png    \o \inlineimage qpen-custom.png    \row    \o Qt::DashDotLine    \o Qt::DashDotDotLine    \o Qt::CustomDashLine    \endtable    Simply use the setStyle() 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.    Since Qt 4.1 it is also possible to specify a custom dash pattern    using the setDashPattern() 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 \l qreal entries    where the entries 1, 3, 5... are the dashes and 2, 4, 6... are the    spaces. For example, the custom pattern shown above is created    using the following code:    \code    QPen pen;    QVector<qreal> dashes;    qreal space = 4;    dashes << 1 << space << 3 << space << 9 << space               << 27 << space << 9;    pen.setDashPattern(dashes);    \endcode    Note that the dash pattern is specified in units of the pens    width, e.g. a dash of length 5 in width 10 is 50 pixels long.    The currently set dash pattern can be retrieved using the    dashPattern() function. Use the isSolid() function to determine    whether the pen has a solid fill, or not.    \section1 Cap Style    The cap style defines how the end points of lines are drawn using    QPainter.  The cap style only apply to wide lines, i.e. when the    width is 1 or greater. The Qt::PenCapStyle enum provides the    following styles:    \table    \row    \o \inlineimage qpen-square.png    \o \inlineimage qpen-flat.png    \o \inlineimage qpen-roundcap.png    \row    \o Qt::SquareCap    \o Qt::FlatCap    \o Qt::RoundCap    \endtable    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.    The default is Qt::SquareCap.    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.    \section1 Join Style    The join style defines how joins between two connected lines can    be drawn using QPainter. The join style only apply to wide lines,    i.e. when the width is 1 or greater. The Qt::PenJoinStyle enum    provides the following styles:    \table    \row    \o \inlineimage qpen-bevel.png    \o \inlineimage qpen-miter.png    \o \inlineimage qpen-roundjoin.png    \row    \o Qt::BevelJoin    \o Qt::MiterJoin    \o Qt::RoundJoin    \endtable    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.    The default is Qt::BevelJoin.    \image qpen-miterlimit.png    When the Qt::MiterJoin style is applied, it is possible to use the    setMiterLimit() function to specify how far the miter join can    extend from the join point. The miterLimit() is used to reduce    artifacts between line joins where the lines are close to    parallel.    The miterLimit() must be specified in units of the pens width,    e.g. a miter limit of 5 in width 10 is 50 pixels long. The    default miter limit is 2, i.e. twice the pen width in pixels.    \table 100%    \row    \o \inlineimage qpen-demo.png    \o \bold {\l {demos/pathstroke}{The Path Stroking Demo}}    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.    \endtable    \sa QPainter, QBrush, {demos/pathstroke}{The Path Stroking Demo}*/class QPenPrivate {public:    QPenPrivate(const QBrush &brush, qreal width, Qt::PenStyle, Qt::PenCapStyle,                Qt::PenJoinStyle _joinStyle);    QAtomic ref;    qreal width;    QBrush brush;    Qt::PenStyle style;    Qt::PenCapStyle capStyle;    Qt::PenJoinStyle joinStyle;    mutable QVector<qreal> dashPattern;    qreal miterLimit;};/*!  \internal*/inline QPenPrivate::QPenPrivate(const QBrush &_brush, qreal _width, Qt::PenStyle penStyle,                                Qt::PenCapStyle _capStyle, Qt::PenJoinStyle _joinStyle)    : ref(1), width(_width), brush(_brush), style(penStyle), capStyle(_capStyle),      joinStyle(_joinStyle), miterLimit(2){}static const Qt::PenCapStyle qpen_default_cap = Qt::SquareCap;static const Qt::PenJoinStyle qpen_default_join = Qt::BevelJoin;class QPenStatic{public:    QPenPrivate *pointer;    bool destroyed;    inline QPenStatic()        : pointer(0), destroyed(false)    { }    inline ~QPenStatic()    {        if (!pointer->ref.deref())            delete pointer;        pointer = 0;        destroyed = true;    }};static QPenPrivate *defaultPenInstance(){    static QPenStatic defaultPen;    if (!defaultPen.pointer && !defaultPen.destroyed) {        QPenPrivate *x = new QPenPrivate(Qt::black, 0, Qt::SolidLine,                                         qpen_default_cap, qpen_default_join);        if (!q_atomic_test_and_set_ptr(&defaultPen.pointer, 0, x))            delete x;    }    return defaultPen.pointer;}static QPenPrivate *nullPenInstance(){    static QPenStatic defaultPen;    if (!defaultPen.pointer && !defaultPen.destroyed) {        QPenPrivate *x = new QPenPrivate(Qt::black, 0, Qt::NoPen, qpen_default_cap, qpen_default_join);        if (!q_atomic_test_and_set_ptr(&defaultPen.pointer, 0, x))            delete x;    }    return defaultPen.pointer;}/*!    Constructs a default black solid line pen with 0 width.*/QPen::QPen(){    d = defaultPenInstance();    d->ref.ref();}/*!    Constructs a black pen with 0 width and the given \a style.    \sa setStyle()*/QPen::QPen(Qt::PenStyle style){    if (style == Qt::NoPen) {        d = nullPenInstance();        d->ref.ref();    } else {        d = new QPenPrivate(Qt::black, 0, style, qpen_default_cap, qpen_default_join);    }}/*!    Constructs a pen with 0 width and the given \a color.    \sa setBrush(), setColor()*/QPen::QPen(const QColor &color){    d = new QPenPrivate(color, 0, Qt::SolidLine, qpen_default_cap, qpen_default_join);}/*!    \fn QPen::QPen(const QBrush &brush, qreal width, Qt::PenStyle style, Qt::PenCapStyle cap, Qt::PenJoinStyle join)    Constructs a pen with the specified \a brush, \a width, pen \a style,    \a cap style and \a join style.    \sa setBrush(), setWidth(), setStyle(),  setCapStyle(), setJoinStyle()*/QPen::QPen(const QBrush &brush, qreal width, Qt::PenStyle s, Qt::PenCapStyle c, Qt::PenJoinStyle j){    d = new QPenPrivate(brush, width, s, c, j);}/*!    \fn QPen::QPen(const QPen &pen)    Constructs a pen that is a copy of the given \a pen.*/QPen::QPen(const QPen &p){    d = p.d;    d->ref.ref();}/*!    Destroys the pen.*/QPen::~QPen(){    if (!d->ref.deref())        delete d;}/*!    \fn void QPen::detach()    Detaches from shared pen data to make sure that this pen is the    only one referring the data.    If multiple pens share common data, this pen dereferences the data    and gets a copy of the data. Nothing is done if there is just a    single reference.*/void QPen::detach(){    if (d->ref == 1)        return;    QPenPrivate *x = new QPenPrivate(d->brush, d->width, d->style, d->capStyle,                                     d->joinStyle);    x->miterLimit = d->miterLimit;    x->dashPattern = d->dashPattern;    x = qAtomicSetPtr(&d, x);    if (!x->ref.deref())        delete x;}/*!    \fn QPen &QPen::operator=(const QPen &pen)    Assigns the given \a pen to this pen and returns a reference to    this pen.*/QPen &QPen::operator=(const QPen &p){    qAtomicAssign(d, p.d);    return *this;}/*!   Returns the pen as a QVariant.*/QPen::operator QVariant() const{    return QVariant(QVariant::Pen, this);}/*!    \fn Qt::PenStyle QPen::style() const    Returns the pen style.    \sa setStyle(), {QPen#Pen Style}{Pen Style}*/Qt::PenStyle QPen::style() const{    return d->style;}/*!    \fn void QPen::setStyle(Qt::PenStyle style)    Sets the pen style to the given \a style.    See the \l Qt::PenStyle documentation for a list of the available    styles. Since Qt 4.1 it is also possible to specify a custom dash    pattern using the setDashPattern() function which implicitly    converts the style of the pen to Qt::CustomDashLine.    \sa style(), {QPen#Pen Style}{Pen Style}*/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美在线观看视频一区二区三区 | 在线综合视频播放| 伊人开心综合网| 欧美在线观看你懂的| 亚洲国产成人va在线观看天堂| 欧美中文字幕一区| 日韩国产精品久久久| 欧美一级在线观看| 激情文学综合插| 国产人久久人人人人爽| 99国产精品一区| 一二三区精品视频| 日韩精品一区二| 国产一区二区免费在线| 国产精品乱码一区二区三区软件 | 韩日精品视频一区| 欧美精品一区二区精品网| 丰满少妇在线播放bd日韩电影| 国产精品青草久久| 在线免费观看视频一区| 日韩福利电影在线| 中文字幕欧美区| 欧美日韩精品一区二区三区蜜桃 | 在线观看亚洲专区| 丝袜美腿亚洲一区| 久久蜜臀精品av| 在线视频国产一区| 国产在线精品一区二区三区不卡| 国产精品久久久久久久久久久免费看 | 国产乱人伦精品一区二区在线观看| 中文字幕av一区二区三区免费看| 在线观看www91| 激情五月婷婷综合网| 亚洲色图.com| 精品免费视频一区二区| 99国产精品久| 国产做a爰片久久毛片| 亚洲激情中文1区| 久久久久国产精品麻豆ai换脸| 色噜噜夜夜夜综合网| 国产毛片精品一区| 亚洲成av人在线观看| 中文字幕精品一区二区精品绿巨人| 欧美综合欧美视频| av一区二区三区| 九色综合狠狠综合久久| 亚洲成人激情社区| 成人免费在线观看入口| 精品粉嫩aⅴ一区二区三区四区| 91精品91久久久中77777| 国产乱码精品一品二品| 日本成人在线不卡视频| 一区二区久久久| 国产精品麻豆视频| 久久美女艺术照精彩视频福利播放 | 日韩精品乱码免费| 一区二区三区在线视频免费观看| 久久精品夜色噜噜亚洲a∨| 欧美一卡二卡三卡四卡| 欧美日韩色一区| 色综合久久久久久久久久久| 国产精品资源在线看| 精品一区二区三区久久| 视频一区二区三区中文字幕| 亚洲自拍偷拍麻豆| 亚洲图片你懂的| 国产精品理伦片| 日本一区二区视频在线| 久久精品在线免费观看| 久久伊99综合婷婷久久伊| 欧美一级欧美三级在线观看| 宅男在线国产精品| 欧美一区二区三区小说| 欧美一区二区在线免费播放 | 99这里只有精品| 粗大黑人巨茎大战欧美成人| 高清不卡一区二区| 大胆亚洲人体视频| 99re这里只有精品首页| 不卡视频在线观看| 色哟哟国产精品| 色综合av在线| 欧美日韩精品一区二区天天拍小说| 欧美日韩一本到| 欧美精品日韩综合在线| 欧美一级黄色大片| 日韩三级高清在线| 日韩精品一区二区在线| 久久免费看少妇高潮| 国产婷婷精品av在线| 中文字幕一区二区三区在线不卡| 亚洲丝袜自拍清纯另类| 亚洲精品亚洲人成人网| 亚洲高清视频在线| 免费成人在线网站| 韩日欧美一区二区三区| 成人性生交大片| 日本福利一区二区| 在线播放中文一区| 久久亚洲综合av| 国产精品理论片| 婷婷国产v国产偷v亚洲高清| 久久99精品一区二区三区三区| 国产又黄又大久久| voyeur盗摄精品| 欧美日韩一区在线观看| 精品国产乱码久久久久久夜甘婷婷| 欧美国产欧美综合| 亚洲成人资源网| 久久精品国产一区二区三| 成人av中文字幕| 欧美日韩国产成人在线免费| 欧美mv和日韩mv的网站| 国产精品美女久久久久久久久久久| 亚洲成人中文在线| 国产精品亚洲成人| 在线看一区二区| 久久综合一区二区| 一区二区免费看| 国产一区二区免费视频| 色八戒一区二区三区| 精品国产91久久久久久久妲己 | 国产午夜精品一区二区三区四区| 亚洲视频一二区| 国内精品国产三级国产a久久| 91美女在线观看| 日韩欧美综合在线| 中文字幕欧美一| 国内外成人在线| 欧美日韩视频在线第一区| 中文久久乱码一区二区| 美女网站一区二区| 91国在线观看| 国产精品久久午夜夜伦鲁鲁| 久久精品国产精品亚洲精品| 色网综合在线观看| 欧美激情综合网| 国产在线精品不卡| 欧美日韩高清一区二区不卡| 中文字幕在线一区| 国产自产视频一区二区三区| 欧美精品 日韩| 一区二区三区中文免费| 成人手机电影网| 欧美videofree性高清杂交| 亚洲午夜一区二区三区| 99vv1com这只有精品| 久久精品无码一区二区三区| 麻豆91免费看| 在线不卡中文字幕| 亚洲不卡av一区二区三区| 91丝袜美腿高跟国产极品老师| 久久久久久久综合| 精品一区二区久久久| 欧美一级欧美三级在线观看| 日本中文在线一区| 7777精品伊人久久久大香线蕉完整版 | 欧美日韩一区在线| 亚洲精品菠萝久久久久久久| 91麻豆高清视频| 国产精品国产三级国产专播品爱网| 国产成人在线免费观看| 国产亚洲一本大道中文在线| 精品在线一区二区| 欧美精品一区二区久久婷婷| 久久不见久久见免费视频1| 日韩午夜av电影| 国产精品国产三级国产普通话99| 韩国av一区二区三区四区| 日韩欧美精品三级| 国内精品视频666| 久久人人超碰精品| 国产乱色国产精品免费视频| 欧美国产乱子伦| www.日韩大片| 亚洲手机成人高清视频| 欧美亚洲国产一区二区三区| 亚洲国产sm捆绑调教视频 | 国产一区二区三区美女| 久久久久9999亚洲精品| 国产成人免费av在线| 中文字幕一区二区三区av| 不卡av在线免费观看| 亚洲精品亚洲人成人网在线播放| 欧美最猛黑人xxxxx猛交| 亚洲777理论| 日韩欧美精品在线| 丁香啪啪综合成人亚洲小说| 中文字幕在线视频一区| 色一区在线观看| 免费成人在线播放| 久久先锋影音av鲁色资源| eeuss鲁片一区二区三区| 亚洲国产精品天堂| 精品88久久久久88久久久| 成人av在线观| 亚洲国产日韩一区二区| www成人在线观看| 91麻豆swag| 精品一二三四区|