本文整理汇总了C++中KisBrushSP::paintDevice方法的典型用法代码示例。如果您正苦于以下问题:C++ KisBrushSP::paintDevice方法的具体用法?C++ KisBrushSP::paintDevice怎么用?C++ KisBrushSP::paintDevice使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KisBrushSP
的用法示例。
在下文中一共展示了KisBrushSP::paintDevice方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: KisPaintOp
KisHairyPaintOp::KisHairyPaintOp(const KisBrushBasedPaintOpSettings *settings, KisPainter * painter, KisNodeSP node, KisImageSP image)
: KisPaintOp(painter)
{
Q_UNUSED(image)
Q_ASSERT(settings);
m_dev = node ? node->paintDevice() : 0;
KisBrushOption brushOption;
brushOption.readOptionSetting(settings);
KisBrushSP brush = brushOption.brush();
KisFixedPaintDeviceSP dab = cachedDab(painter->device()->compositionSourceColorSpace());
if (brush->brushType() == IMAGE || brush->brushType() == PIPE_IMAGE) {
dab = brush->paintDevice(source()->colorSpace(), 1.0, 0.0, KisPaintInformation());
}
else {
brush->mask(dab, painter->paintColor(), 1.0, 1.0, 0.0, KisPaintInformation());
}
m_brush.fromDabWithDensity(dab, settings->getDouble(HAIRY_BRISTLE_DENSITY) * 0.01);
m_brush.setInkColor(painter->paintColor());
loadSettings(settings);
m_brush.setProperties(&m_properties);
m_rotationOption.readOptionSetting(settings);
m_opacityOption.readOptionSetting(settings);
m_sizeOption.readOptionSetting(settings);
m_rotationOption.resetAllSensors();
m_opacityOption.resetAllSensors();
m_sizeOption.resetAllSensors();
}