当前位置: 首页>>代码示例>>C++>>正文


C++ QPixmap::isQBitmap方法代码示例

本文整理汇总了C++中QPixmap::isQBitmap方法的典型用法代码示例。如果您正苦于以下问题:C++ QPixmap::isQBitmap方法的具体用法?C++ QPixmap::isQBitmap怎么用?C++ QPixmap::isQBitmap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QPixmap的用法示例。


在下文中一共展示了QPixmap::isQBitmap方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: drawPixmapFragments

void QEmulationPaintEngine::drawPixmapFragments(const QPainter::PixmapFragment *fragments, int fragmentCount, const QPixmap &pixmap,
                                                QPainter::PixmapFragmentHints hints)
{
    if (state()->bgMode == Qt::OpaqueMode && pixmap.isQBitmap()) {
        qreal oldOpacity = real_engine->state()->opacity;
        QTransform oldTransform = real_engine->state()->matrix;

        for (int i = 0; i < fragmentCount; ++i) {
            QTransform transform = oldTransform;
            transform.translate(fragments[i].x, fragments[i].y);
            transform.rotate(fragments[i].rotation);
            real_engine->state()->opacity = oldOpacity * fragments[i].opacity;
            real_engine->state()->matrix = transform;
            real_engine->opacityChanged();
            real_engine->transformChanged();

            qreal w = fragments[i].scaleX * fragments[i].width;
            qreal h = fragments[i].scaleY * fragments[i].height;
            fillBGRect(QRectF(-0.5 * w, -0.5 * h, w, h));
        }

        real_engine->state()->opacity = oldOpacity;
        real_engine->state()->matrix = oldTransform;
        real_engine->opacityChanged();
        real_engine->transformChanged();
    }

    real_engine->drawPixmapFragments(fragments, fragmentCount, pixmap, hints);
}
开发者ID:13W,项目名称:phantomjs,代码行数:29,代码来源:qemulationpaintengine.cpp

示例2: drawTiledPixmap

void QAlphaPaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s)
{
    Q_D(QAlphaPaintEngine);

    QRectF brect = d->m_transform.mapRect(r);

    if (d->m_pass == 0) {
        d->m_continueCall = false;
        if (pixmap.hasAlpha() || d->m_alphaOpacity || d->m_complexTransform || pixmap.isQBitmap()) {
            d->addAlphaRect(brect);
        }
        if (d->m_picengine)
            d->m_picengine->drawTiledPixmap(r, pixmap, s);
    } else {
        d->m_continueCall = !d->fullyContained(brect);
    }
}
开发者ID:,项目名称:,代码行数:17,代码来源:

示例3: drawPixmap

void QAlphaPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr)
{
    Q_D(QAlphaPaintEngine);

    QRectF tr = d->m_transform.mapRect(r);
    if (d->m_pass == 0) {
        d->m_continueCall = false;
        if (pm.hasAlpha() || d->m_alphaOpacity || d->m_complexTransform || pm.isQBitmap()) {
            d->addAlphaRect(tr);
        }

        if (d->m_picengine)
            d->m_picengine->drawPixmap(r, pm, sr);

    } else {
        d->m_continueCall = !d->fullyContained(tr);
    }
}
开发者ID:,项目名称:,代码行数:18,代码来源:

示例4: drawTiledPixmap

void QEmulationPaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s)
{
    if (state()->bgMode == Qt::OpaqueMode && pixmap.isQBitmap())
        fillBGRect(r);
    real_engine->drawTiledPixmap(r, pixmap, s);
}
开发者ID:13W,项目名称:phantomjs,代码行数:6,代码来源:qemulationpaintengine.cpp

示例5: drawPixmap

void QEmulationPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr)
{
    if (state()->bgMode == Qt::OpaqueMode && pm.isQBitmap())
        fillBGRect(r);
    real_engine->drawPixmap(r, pm, sr);
}
开发者ID:13W,项目名称:phantomjs,代码行数:6,代码来源:qemulationpaintengine.cpp


注:本文中的QPixmap::isQBitmap方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。