本文整理汇总了C++中KisPaintInformation::tiltElevation方法的典型用法代码示例。如果您正苦于以下问题:C++ KisPaintInformation::tiltElevation方法的具体用法?C++ KisPaintInformation::tiltElevation怎么用?C++ KisPaintInformation::tiltElevation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KisPaintInformation
的用法示例。
在下文中一共展示了KisPaintInformation::tiltElevation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: brushOutline
QPainterPath KisGridPaintOpSettings::brushOutline(const KisPaintInformation &info, OutlineMode mode) const
{
QPainterPath path;
if (mode == CursorIsOutline || mode == CursorIsCircleOutline || mode == CursorTiltOutline) {
qreal sizex = getInt(GRID_WIDTH) * getDouble(GRID_SCALE);
qreal sizey = getInt(GRID_HEIGHT) * getDouble(GRID_SCALE);
QRectF rc(0, 0, sizex, sizey);
rc.translate(-rc.center());
path.addRect(rc);
QPainterPath tiltLine;
QLineF tiltAngle(QPointF(0.0,0.0), QPointF(0.0,sizex));
tiltAngle.setLength(qMax(sizex*0.5, 50.0) * (1 - info.tiltElevation(info, 60.0, 60.0, true)));
tiltAngle.setAngle((360.0 - fmod(KisPaintInformation::tiltDirection(info, true) * 360.0 + 270.0, 360.0))-3.0);
tiltLine.moveTo(tiltAngle.p1());
tiltLine.lineTo(tiltAngle.p2());
tiltAngle.setAngle((360.0 - fmod(KisPaintInformation::tiltDirection(info, true) * 360.0 + 270.0, 360.0))+3.0);
tiltLine.lineTo(tiltAngle.p2());
tiltLine.lineTo(tiltAngle.p1());
path = outlineFetcher()->fetchOutline(info, this, path);
if (mode == CursorTiltOutline) {
path.addPath(outlineFetcher()->fetchOutline(info, this, tiltLine, 1.0, 0.0, true, 0, 0));
}
}
return path;
}