示例#1
0
//==============================================================
//  Функция вызывается при перерисовке
//==============================================================
void FormAnimationFrames::paintEvent(QPaintEvent*)
{
    QPainter painter {this};

    drawFrames(painter);
    drawCurrentFrame(painter);
    drawBorder(painter);
}
示例#2
0
//==============================================================
//  Функция вызывается при перерисовке
//==============================================================
void FormAnimation::paintEvent(QPaintEvent*)
{
    QPainter painter {this};

    painter.setRenderHint(QPainter::SmoothPixmapTransform);

    drawTimeScale(&painter);
    drawFrames(&painter);
    drawCurrentFrame(&painter);
}
void DrawProfiler::draw(OpenGLRenderer* canvas) {
    RETURN_IF_DISABLED();

    if (mShowDirtyRegions) {
        mFlashToggle = !mFlashToggle;
        if (mFlashToggle) {
            SkPaint paint;
            paint.setColor(0x7fff0000);
            canvas->drawRect(mDirtyRegion.fLeft, mDirtyRegion.fTop,
                    mDirtyRegion.fRight, mDirtyRegion.fBottom, &paint);
        }
    }

    if (mType == kBars) {
        prepareShapes(canvas->getViewportHeight());
        drawGraph(canvas);
        drawCurrentFrame(canvas);
        drawThreshold(canvas);
    }
}