Changeset View
Changeset View
Standalone View
Standalone View
libs/image/kis_antialiasing_fade_maker.h
Show First 20 Lines • Show All 205 Lines • ▼ Show 20 Line(s) | 203 | Vc::float_m needFade(Vc::float_v &xr, Vc::float_v &yr) const { | |||
---|---|---|---|---|---|
206 | Vc::float_v vYLimit(m_yLimit); | 206 | Vc::float_v vYLimit(m_yLimit); | ||
207 | 207 | | |||
208 | Vc::float_m outXMask = Vc::abs(xr) > vXLimit; | 208 | Vc::float_m outXMask = Vc::abs(xr) > vXLimit; | ||
209 | Vc::float_m outYMask = Vc::abs(yr) > vYLimit; | 209 | Vc::float_m outYMask = Vc::abs(yr) > vYLimit; | ||
210 | 210 | | |||
211 | return (outXMask | outYMask); | 211 | return (outXMask | outYMask); | ||
212 | } | 212 | } | ||
213 | 213 | | |||
214 | // Apply fader separatedly to avoid calculating vValue twice. | 214 | // Apply fader separately to avoid calculating vValue twice. | ||
215 | void apply2DFader(Vc::float_v &vValue, Vc::float_m &excludeMask, Vc::float_v &xr, Vc::float_v &yr) const { | 215 | void apply2DFader(Vc::float_v &vValue, Vc::float_m &excludeMask, Vc::float_v &xr, Vc::float_v &yr) const { | ||
216 | const Vc::float_v vValMax(255.f); | 216 | const Vc::float_v vValMax(255.f); | ||
217 | 217 | | |||
218 | if(m_enableAntialiasing){ | 218 | if(m_enableAntialiasing){ | ||
219 | Vc::float_v vXFadeLimitStart(m_xFadeLimitStart); | 219 | Vc::float_v vXFadeLimitStart(m_xFadeLimitStart); | ||
220 | Vc::float_v vYFadeLimitStart(m_yFadeLimitStart); | 220 | Vc::float_v vYFadeLimitStart(m_yFadeLimitStart); | ||
221 | Vc::float_v vXFadeCoeff(m_xFadeCoeff); | 221 | Vc::float_v vXFadeCoeff(m_xFadeCoeff); | ||
222 | Vc::float_v vYFadeCoeff(m_yFadeCoeff); | 222 | Vc::float_v vYFadeCoeff(m_yFadeCoeff); | ||
▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines |