//bool AutoClose //{ // get { return m_auto_close; } // set { this.m_auto_close = value; } //} //-------------------------------------------------------------------- public void ResetGamma(IGammaFunction gamma_function) { for (int i = AA_SCALE - 1; i >= 0; --i) { m_gammaLut[i] = (int)AggMath.uround( gamma_function.GetGamma((float)(i) / AA_MASK) * AA_MASK); } }
void SetGamma(float g) { m_gamma = g; float inv_g = (float)(1.0 / g); for (int i = GAMMA_SIZE - 1; i >= 0; --i) { m_dir_gamma[i] = (byte)AggMath.uround(Math.Pow(i / (float)GAMMA_MASK, m_gamma) * (float)GAMMA_MASK); m_inv_gamma[i] = (byte)AggMath.uround(Math.Pow(i / (float)GAMMA_MASK, inv_g) * (float)GAMMA_MASK); } }