/**
  * この関数は、i_rasterを操作するピクセルドライバインスタンスを生成します。
  * @param i_raster
  * @return
  * @
  */
 public static INyARRgbPixelDriver createDriver(INyARRgbRaster i_raster)
 {
     INyARRgbPixelDriver ret;
     switch (i_raster.getBufferType())
     {
         case NyARBufferType.BYTE1D_B8G8R8_24:
             ret = new NyARRgbPixelDriver_BYTE1D_B8G8R8_24();
             break;
         case NyARBufferType.BYTE1D_B8G8R8X8_32:
             ret = new NyARRgbPixelDriver_BYTE1D_B8G8R8X8_32();
             break;
         case NyARBufferType.BYTE1D_R8G8B8_24:
             ret = new NyARRgbPixelDriver_BYTE1D_R8G8B8_24();
             break;
         case NyARBufferType.BYTE1D_X8R8G8B8_32:
             ret = new NyARRgbPixelDriver_BYTE1D_X8R8G8B8_32();
             break;
         case NyARBufferType.INT1D_GRAY_8:
             ret = new NyARRgbPixelDriver_INT1D_GRAY_8();
             break;
         case NyARBufferType.INT1D_X8R8G8B8_32:
             ret = new NyARRgbPixelDriver_INT1D_X8R8G8B8_32();
             break;
         case NyARBufferType.BYTE1D_R5G6B5_16BE:
             ret = new NyARRgbPixelDriver_WORD1D_R5G6B5_16LE();
             break;
         default:
             throw new NyARException();
     }
     ret.switchRaster(i_raster);
     return ret;
 }
Esempio n. 2
0
        /**
         * この関数は、i_rasterを操作するピクセルドライバインスタンスを生成します。
         * @param i_raster
         * @return
         * @
         */
        public static INyARRgbPixelDriver createDriver(INyARRgbRaster i_raster)
        {
            INyARRgbPixelDriver ret;

            switch (i_raster.getBufferType())
            {
            case NyARBufferType.BYTE1D_B8G8R8_24:
                ret = new NyARRgbPixelDriver_BYTE1D_B8G8R8_24();
                break;

            case NyARBufferType.BYTE1D_B8G8R8X8_32:
                ret = new NyARRgbPixelDriver_BYTE1D_B8G8R8X8_32();
                break;

            case NyARBufferType.BYTE1D_R8G8B8_24:
                ret = new NyARRgbPixelDriver_BYTE1D_R8G8B8_24();
                break;

            case NyARBufferType.BYTE1D_X8R8G8B8_32:
                ret = new NyARRgbPixelDriver_BYTE1D_X8R8G8B8_32();
                break;

            case NyARBufferType.INT1D_GRAY_8:
                ret = new NyARRgbPixelDriver_INT1D_GRAY_8();
                break;

            case NyARBufferType.INT1D_X8R8G8B8_32:
                ret = new NyARRgbPixelDriver_INT1D_X8R8G8B8_32();
                break;

            case NyARBufferType.BYTE1D_R5G6B5_16BE:
                ret = new NyARRgbPixelDriver_WORD1D_R5G6B5_16LE();
                break;

            default:
                throw new NyARException();
            }
            ret.switchRaster(i_raster);
            return(ret);
        }