Ejemplo n.º 1
0
        public static Canvas Create(PixelDataProvider pdp)
        {
            Canvas c = null;

            switch (pdp.BitsPerPixel)
            {
            case 32:
                c = new Canvas32();
                break;

            case 24:
                c = new Canvas24();
                break;

            case 8:
                c = new Canvas8();
                break;

            default:
                return(null);
            }
            c.PixelDataProvider = pdp;
            return(c);
        }
Ejemplo n.º 2
0
 public static Canvas Create(PixelDataProvider pdp)
 {
     Canvas c = null;
     switch (pdp.BitsPerPixel)
     {
         case 32:
             c = new Canvas32();
             break;
         case 24:
             c = new Canvas24();
             break;
         case 8:
             c = new Canvas8();
             break;
         default:
             return null;
     }
     c.PixelDataProvider = pdp;
     return c;
 }