+package jp.nyatla.nyartoolkit.core.raster.rgb;\r
+\r
+import jp.nyatla.nyartoolkit.core.rasterreader.*;\r
+import jp.nyatla.nyartoolkit.core.types.*;\r
+import jp.nyatla.nyartoolkit.*;\r
+\r
+public class NyARRgbRaster extends NyARRgbRaster_BasicClass\r
+{\r
+ protected Object _ref_buf;\r
+\r
+ private INyARRgbPixelReader _reader;\r
+ private INyARBufferReader _buffer_reader;\r
+ private void init(NyARIntSize i_size,int i_raster_type) throws NyARException\r
+ {\r
+ switch(i_raster_type)\r
+ {\r
+ case INyARBufferReader.BUFFERFORMAT_INT1D_X8R8G8B8_32:\r
+ this._ref_buf=new int[i_size.w*i_size.h];\r
+ this._reader=new NyARRgbPixelReader_INT1D_X8R8G8B8_32((int[])this._ref_buf,i_size);\r
+ break;\r
+ default:\r
+ throw new NyARException();\r
+ }\r
+ this._buffer_reader=new NyARBufferReader(this._ref_buf,i_raster_type);\r
+ }\r
+ public NyARRgbRaster(NyARIntSize i_size,int i_raster_type) throws NyARException\r
+ {\r
+ super(i_size);\r
+ init(i_size,i_raster_type);\r
+ return;\r
+ }\r
+ public INyARRgbPixelReader getRgbPixelReader()\r
+ {\r
+ return this._reader;\r
+ }\r
+ public INyARBufferReader getBufferReader()\r
+ {\r
+ return this._buffer_reader;\r
+ } \r
+}\r