本文整理汇总了C++中KisImageWSP::pixelToDocument方法的典型用法代码示例。如果您正苦于以下问题:C++ KisImageWSP::pixelToDocument方法的具体用法?C++ KisImageWSP::pixelToDocument怎么用?C++ KisImageWSP::pixelToDocument使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KisImageWSP
的用法示例。
在下文中一共展示了KisImageWSP::pixelToDocument方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: paintOutline
void KisExperimentPaintOpSettings::paintOutline(const QPointF& pos, KisImageWSP image, QPainter &painter, OutlineMode _mode) const
{
if (_mode != CursorIsOutline) return;
qreal width = getInt(EXPERIMENT_START_SIZE); /* scale();*/
qreal height = getInt(EXPERIMENT_START_SIZE); /* scale();*/
painter.setPen(QColor(255,128,255));
painter.setCompositionMode(QPainter::RasterOp_SourceXorDestination);
painter.drawEllipse(image->pixelToDocument(QRectF(0, 0, width, height).translated(- QPoint(width * 0.5, height * 0.5))).translated(pos));
}
示例2: paintOutlineRect
QRectF KisExperimentPaintOpSettings::paintOutlineRect(const QPointF& pos, KisImageWSP image, OutlineMode _mode) const
{
if (_mode != CursorIsOutline) return QRectF();
qreal width = getInt(EXPERIMENT_START_SIZE); /* scale();*/
qreal height = getInt(EXPERIMENT_START_SIZE); /* scale();*/
width += 10;
height += 10;
QRectF rc = QRectF(0, 0, width, height);
return image->pixelToDocument(rc.translated(- QPoint(width * 0.5, height * 0.5))).translated(pos);
}
示例3: duplicateOutlineRect
QRectF KisDuplicateOpSettings::duplicateOutlineRect(const QPointF& pos, KisImageWSP image) const
{
// Compute the rectangle for the offset
QRectF rect2 = QRectF(-5, -5, 10, 10);
if (m_isOffsetNotUptodate) {
rect2.translate(m_position);
} else {
rect2.translate(- m_offset + image->documentToPixel(pos));
}
return image->pixelToDocument(rect2);
}
示例4: paintOutlineRect
QRectF KisDuplicateOpSettings::paintOutlineRect(const QPointF& pos, KisImageWSP image, OutlineMode _mode) const
{
/*QRectF dubRect = duplicateOutlineRect(pos, image);
if (_mode == CursorIsOutline) {
dubRect |= KisBrushBasedPaintOpSettings::paintOutlineRect(pos, image, _mode);
}
return dubRect;*/
if (_mode != CursorIsOutline) return QRectF();
QPointF hotSpot = KisBrushBasedPaintOpSettings::brushOutline(pos,_mode).boundingRect().center();
QRectF boundRect = brushOutline(pos,_mode).boundingRect();
return image->pixelToDocument(boundRect.translated(-hotSpot)).translated(pos);
}
示例5: paintOutlineRect
QRectF KisPaintOpSettings::paintOutlineRect(const QPointF& pos, KisImageWSP image, OutlineMode _mode) const
{
Q_UNUSED(_mode);
QRectF rect = QRectF(-5, -5, 10, 10);
return image->pixelToDocument(rect).translated(pos);
}