diff options
Diffstat (limited to 'chalk/core/kis_brush.cc')
-rw-r--r-- | chalk/core/kis_brush.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/chalk/core/kis_brush.cc b/chalk/core/kis_brush.cc index 9720a3e1..60f475f0 100644 --- a/chalk/core/kis_brush.cc +++ b/chalk/core/kis_brush.cc @@ -392,7 +392,7 @@ KisAlphaMaskSP KisBrush::tqmask(const KisPaintInformation& info, double subPixel KisAlphaMaskSP outputMask = 0; if (belowBrush != 0) { - // We're in between two tqmasks. Interpolate between them. + // We're in between two masks. Interpolate between them. KisAlphaMaskSP scaledAboveMask = scaleMask(aboveBrush, scale, subPixelX, subPixelY); KisAlphaMaskSP scaledBelowMask = scaleMask(belowBrush, scale, subPixelX, subPixelY); @@ -608,13 +608,13 @@ double KisBrush::scaleForPressure(double pressure) return scale; } -TQ_INT32 KisBrush::tqmaskWidth(const KisPaintInformation& info) const +TQ_INT32 KisBrush::maskWidth(const KisPaintInformation& info) const { // Add one for sub-pixel shift return static_cast<TQ_INT32>(ceil(width() * scaleForPressure(info.pressure)) + 1); } -TQ_INT32 KisBrush::tqmaskHeight(const KisPaintInformation& info) const +TQ_INT32 KisBrush::maskHeight(const KisPaintInformation& info) const { // Add one for sub-pixel shift return static_cast<TQ_INT32>(ceil(height() * scaleForPressure(info.pressure)) + 1); @@ -971,7 +971,7 @@ void KisBrush::findScaledBrushes(double scale, const ScaledBrush **aboveBrush, c } } -KisAlphaMaskSP KisBrush::scaleSinglePixelMask(double scale, TQ_UINT8 tqmaskValue, double subPixelX, double subPixelY) +KisAlphaMaskSP KisBrush::scaleSinglePixelMask(double scale, TQ_UINT8 maskValue, double subPixelX, double subPixelY) { int srcWidth = 1; int srcHeight = 1; @@ -986,10 +986,10 @@ KisAlphaMaskSP KisBrush::scaleSinglePixelMask(double scale, TQ_UINT8 tqmaskValue for (int y = 0; y < dstHeight; y++) { for (int x = 0; x < dstWidth; x++) { - TQ_UINT8 topLeft = (x > 0 && y > 0) ? tqmaskValue : OPACITY_TRANSPARENT; - TQ_UINT8 bottomLeft = (x > 0 && y < srcHeight) ? tqmaskValue : OPACITY_TRANSPARENT; - TQ_UINT8 topRight = (x < srcWidth && y > 0) ? tqmaskValue : OPACITY_TRANSPARENT; - TQ_UINT8 bottomRight = (x < srcWidth && y < srcHeight) ? tqmaskValue : OPACITY_TRANSPARENT; + TQ_UINT8 topLeft = (x > 0 && y > 0) ? maskValue : OPACITY_TRANSPARENT; + TQ_UINT8 bottomLeft = (x > 0 && y < srcHeight) ? maskValue : OPACITY_TRANSPARENT; + TQ_UINT8 topRight = (x < srcWidth && y > 0) ? maskValue : OPACITY_TRANSPARENT; + TQ_UINT8 bottomRight = (x < srcWidth && y < srcHeight) ? maskValue : OPACITY_TRANSPARENT; // Bi-linear interpolation int d = static_cast<int>(a * b * topLeft @@ -1244,8 +1244,8 @@ void KisBrush::setHeight(TQ_INT32 h) KisLayerSP layer = image(KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA",""),""), KisPaintInformation(pressure)); KisBoundary bounds(layer.data()); - int w = tqmaskWidth(pressure); - int h = tqmaskHeight(pressure); + int w = maskWidth(pressure); + int h = maskHeight(pressure); bounds.generateBoundary(w, h); TQPixmap pix(bounds.pixmap(w, h)); @@ -1256,8 +1256,8 @@ void KisBrush::setHeight(TQ_INT32 h) void KisBrush::generateBoundary() { KisPaintDeviceSP dev; - int w = tqmaskWidth(KisPaintInformation()); - int h = tqmaskHeight(KisPaintInformation()); + int w = maskWidth(KisPaintInformation()); + int h = maskHeight(KisPaintInformation()); if (brushType() == IMAGE || brushType() == PIPE_IMAGE) { dev = image(KisMetaRegistry::instance()->csRegistry() ->getColorSpace(KisID("RGBA",""),""), KisPaintInformation()); |