//-------------------------------------------------------------------- public void Gamma(IGammaFunction gamma_function) { for (int i = 0; i < (int)AAScale.Scale; i++) { m_gamma[i] = (int)Basics.RoundUint(gamma_function.GetGamma((double)(i) / (int)AAScale.Mask) * (int)AAScale.Mask); } }
//-------------------------------------------------------------------- public void gamma(IGammaFunction gamma_function) { for (int i = 0; i < (int)aa_scale_e.aa_scale; i++) { m_gamma[i] = (int)agg_basics.uround(gamma_function.GetGamma((double)(i) / (int)aa_scale_e.aa_mask) * (int)aa_scale_e.aa_mask); } }
//-------------------------------------------------------------------- public void ResetGamma(IGammaFunction gamma_function) { for (int i = AA_SCALE - 1; i >= 0; --i) { m_gammaLut[i] = (int)AggBasics.uround( gamma_function.GetGamma((float)(i) / AA_MASK) * AA_MASK); } }
public PrebuiltGammaTable(IGammaFunction gamma_function) { for (int i = ScanlineRasterizer.AA_SCALE - 1; i >= 0; --i) { _gammaLut[i] = AggMath.uround( gamma_function.GetGamma((float)(i) / ScanlineRasterizer.AA_MASK) * ScanlineRasterizer.AA_MASK); } }
void SetGamma(IGammaFunction gamma_function) { int i; for (i = 0; i < AA_SCALE; i++) { m_gamma[i] = (byte)(AggBasics.uround(gamma_function.GetGamma((float)(i) / AA_MASK) * AA_MASK)); } }
void SetGamma(IGammaFunction gamma_function) { //TODO:review gamma again*** if (gamma_function == null) { m_gamma = s_gamma_none; } else { m_gamma = new byte[AA_SCALE]; for (int i = AA_SCALE - 1; i >= 0; --i) { //pass i to gamma func *** m_gamma[i] = (byte)(AggBasics.uround(gamma_function.GetGamma((float)(i) / AA_MASK) * AA_MASK)); } } }
//--------------------------------------------------------------------- public void gamma(IGammaFunction gamma_function) { int i; for (i = 0; i < aa_scale; i++) { m_gamma[i] = (byte)(agg_basics.uround(gamma_function.GetGamma((double)(i) / aa_mask) * aa_mask)); } }