本文整理汇总了C++中KisConfig::scrollCheckers方法的典型用法代码示例。如果您正苦于以下问题:C++ KisConfig::scrollCheckers方法的具体用法?C++ KisConfig::scrollCheckers怎么用?C++ KisConfig::scrollCheckers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KisConfig
的用法示例。
在下文中一共展示了KisConfig::scrollCheckers方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getQPainterCheckersInfo
void KisCoordinatesConverter::getQPainterCheckersInfo(QTransform *transform,
QPointF *brushOrigin,
QPolygonF *polygon) const
{
/**
* Qt has different rounding for QPainter::drawRect/drawImage.
* The image is rounded mathematically, while rect in aligned
* to the next integer. That causes transparent line appear on
* the canvas.
*
* See: https://bugreports.qt.nokia.com/browse/QTBUG-22827
*/
QRectF imageRect = imageRectInViewportPixels();
imageRect.adjust(0,0,-0.5,-0.5);
KisConfig cfg;
if (cfg.scrollCheckers()) {
*transform = viewportToWidgetTransform();
*polygon = imageRect;
*brushOrigin = imageToViewport(QPointF(0,0));
}
else {
*transform = QTransform();
*polygon = viewportToWidgetTransform().map(imageRect);
*brushOrigin = QPoint(0,0);
}
}
示例2: notifyConfigChanged
void KisOpenGLCanvas2::slotConfigChanged()
{
KisConfig cfg;
d->checkSizeScale = KisOpenGLImageTextures::BACKGROUND_TEXTURE_CHECK_SIZE / static_cast<GLfloat>(cfg.checkSize());
d->scrollCheckers = cfg.scrollCheckers();
d->openGLImageTextures->generateCheckerTexture(createCheckersImage(cfg.checkSize()));
d->openGLImageTextures->updateConfig(cfg.useOpenGLTextureBuffer(), cfg.numMipmapLevels());
d->filterMode = (KisOpenGL::FilterMode) cfg.openGLFilteringMode();
notifyConfigChanged();
}
示例3: getOpenGLCheckersInfo
void KisCoordinatesConverter::getOpenGLCheckersInfo(const QRectF &viewportRect,
QTransform *textureTransform,
QTransform *modelTransform,
QRectF *textureRect,
QRectF *modelRect) const
{
KisConfig cfg;
if(cfg.scrollCheckers()) {
*textureTransform = QTransform();
*textureRect = QRectF(0, 0, viewportRect.width(),viewportRect.height());
}
else {
*textureTransform = viewportToWidgetTransform();
*textureRect = viewportRect;
}
*modelTransform = viewportToWidgetTransform();
*modelRect = viewportRect;
}