void Calculate(Imaging.IImageFilter filter, bool normalization) { double r = filter.GetRadius(); ReallocLut(r); int i; int pivot = Diameter << (ImgSubPixConst.SHIFT - 1); for (i = 0; i < pivot; i++) { double x = (double)i / (double)ImgSubPixConst.SCALE; double y = filter.CalculateWeight(x); m_weight_array[pivot + i] = m_weight_array[pivot - i] = AggBasics.iround(y * ImgFilterConst.SCALE); } int end = (Diameter << ImgSubPixConst.SHIFT) - 1; m_weight_array[0] = m_weight_array[end]; if (normalization) { Normalize(); } }