public STR_Bitmap(int iWidthPx, int iHeightPx, int iStride) { miWidthPx = iWidthPx; miHeightPx = iHeightPx; mbmBitmap = new Bitmap(miWidthPx, miHeightPx); mrBitmapRect = new Rectangle(0, 0, mbmBitmap.Width, mbmBitmap.Height); miBufferStride = iStride; miBufferSize = miWidthPx * miHeightPx * miBufferStride; m_strpb_gen_PixelBuffer = new STR_PixelBuffer_GEN <T> (miBufferSize); }
//public STR_Bitmap ( STR_Engine streEngine , int iBufferSize ) //{ // miWidthPx = streEngine.Window.WidthPx; // miHeightPx = streEngine.Window.HeightPx; // miBufferSize = iBufferSize; // m_strpb_gen_PixelBuffer = new STR_PixelBuffer_GEN<T> ( iBufferSize ); //} public STR_Bitmap(STR_Bitmap <T> strbmBitmap) { miWidthPx = strbmBitmap.miWidthPx; miHeightPx = strbmBitmap.miHeightPx; miBufferSize = strbmBitmap.miWidthPx * strbmBitmap.miHeightPx; if (miBufferSize != strbmBitmap.miBufferSize) { throw new Exception("ERR"); //TODO: write this message } m_strpb_gen_PixelBuffer = strbmBitmap.BufferObject; }