00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Mark Alexander 00008 * Side Effects Software Inc 00009 * 477 Richmond Street West 00010 * Toronto, Ontario 00011 * Canada M5V 3E7 00012 * 416-504-9876 00013 * 00014 * NAME: IMG_FileFilterTile ( IMG Library, C++) 00015 * 00016 * COMMENTS: 00017 * 00018 * Allows reading and writing files using a tile interface rather than 00019 * scanlines. 00020 */ 00021 #ifndef IMG_FILE_FILTER_TILE_H 00022 #define IMG_FILE_FILTER_TILE_H 00023 00024 class UT_IntArray; 00025 00026 #include <UT/UT_PtrArray.h> 00027 #include "IMG_FileFilter.h" 00028 00029 class IMG_API IMG_FileFilterTile : public IMG_FileFilter 00030 { 00031 public: 00032 IMG_FileFilterTile(IMG_File *file_to_filter); 00033 virtual ~IMG_FileFilterTile(); 00034 00035 virtual const char *className() const { return "IMG_FileFilterTile"; } 00036 00037 void initTile(IMG_Interleave i); 00038 00039 virtual bool readTile(const UT_InclusiveRect &rect, 00040 void *data, const IMG_Plane *plane=0); 00041 00042 virtual bool writeTile(const UT_InclusiveRect &rect, 00043 const void *data, 00044 const IMG_Plane *plane=0); 00045 00046 virtual void computeCommonData(); 00047 private: 00048 00049 // These methods do not work with tiles. Do not call them. 00050 // 00051 virtual const void *readPlaneScanline(int y, const IMG_Plane &pi); 00052 00053 virtual int writePlaneScanline(const void *data, int y, 00054 const IMG_Plane &pi); 00055 00056 int myWidth; 00057 int myHeight; 00058 bool myInterleaved; 00059 UT_PtrArray<UT_IntArray *> myProcessedPixels; 00060 }; 00061 00062 00063 00064 00065 00066 #endif
1.5.9