void KisPaintingInformationBuilder::updateSettings() { KisConfig cfg; KisCubicCurve curve; curve.fromString(cfg.pressureTabletCurve()); m_pressureSamples = curve.floatTransfer(LEVEL_OF_PRESSURE_RESOLUTION + 1); }
KisCurveRectangleMaskGenerator::KisCurveRectangleMaskGenerator(qreal diameter, qreal ratio, qreal fh, qreal fv, int spikes, const KisCubicCurve &curve) : KisMaskGenerator(diameter, ratio, fh, fv, spikes, RECTANGLE, SoftId), d(new Private) { d->curveResolution = qRound( qMax(width(),height()) * OVERSAMPLING); d->curveData = curve.floatTransfer( d->curveResolution + 1); d->curvePoints = curve.points(); setCurveString(curve.toString()); d->dirty = false; d->m_halfWidth = KisMaskGenerator::d->diameter * 0.5; d->m_halfHeight = d->m_halfWidth * KisMaskGenerator::d->ratio; }