예제 #1
0
 static PreBuiltLineAAGammaTable()
 {
     {
         byte[] gammaValues = new byte[LineProfileAnitAlias.AA_SCALE];
         for (int i = LineProfileAnitAlias.AA_SCALE - 1; i >= 0; --i)
         {
             gammaValues[i] = (byte)(AggMath.uround(((float)(i) / LineProfileAnitAlias.AA_MASK) * LineProfileAnitAlias.AA_MASK));
         }
         None = new PreBuiltLineAAGammaTable(gammaValues);
     }
 }
예제 #2
0
        public LineProfileAnitAlias(double w, PreBuiltLineAAGammaTable preBuiltGammaTable)
        {
            //1. init value
            _subpixel_width = 0;
            _min_width      = 1.0;
            _smoother_width = 1.0;

            //2. set gamma before set width
            _gammaTable = preBuiltGammaTable;
            _gamma      = preBuiltGammaTable._gammaValues;
            //3. set width table
            SetWidth(w);
        }