HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IMG_FileFilterTile.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: IMG_FileFilterTile ( IMG Library, C++)
7  *
8  * COMMENTS:
9  *
10  * Allows reading and writing files using a tile interface rather than
11  * scanlines.
12  */
13 #ifndef IMG_FILE_FILTER_TILE_H
14 #define IMG_FILE_FILTER_TILE_H
15 
16 #include "IMG_API.h"
17 #include "IMG_FileFilter.h"
18 #include <UT/UT_NonCopyable.h>
19 #include <UT/UT_ValArray.h>
20 #include <UT/UT_VectorTypes.h>
21 
23 {
24 public:
25  IMG_FileFilterTile(IMG_File *file_to_filter);
26  ~IMG_FileFilterTile() override;
27 
29 
30  const char *className() const override { return "IMG_FileFilterTile"; }
31 
32  void initTile(IMG_Interleave i);
33 
34  bool readTile(const UT_InclusiveRect &rect,
35  void *data, const IMG_Plane *plane=0) override;
36 
37  bool writeTile(const UT_InclusiveRect &rect,
38  const void *data,
39  const IMG_Plane *plane=0) override;
40 
41  void computeCommonData() override;
42 private:
43 
44  // These methods do not work with tiles. Do not call them.
45  //
46  const void *readPlaneScanline(int y, const IMG_Plane &pi) override;
47 
48  int writePlaneScanline(const void *data, int y,
49  const IMG_Plane &pi) override;
50 
51  int myWidth;
52  int myHeight;
53  IMG_Interleave myInterleaved;
54  UT_ValArray<UT_IntArray *> myProcessedPixels;
55 };
56 
57 
58 
59 
60 
61 #endif
GLint y
Definition: glcorearb.h:103
Describes the format and layout of a single plane in an image The plane specifies the format and name...
Definition: IMG_Plane.h:48
#define IMG_API
Definition: IMG_API.h:10
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
void computeCommonData() override
Base Integer Rectangle class.
IMG_Interleave
Definition: IMG_FileTypes.h:77
constexpr T pi()
Pi constant taken from Boost to match old behaviour.
Definition: Math.h:119
#define const
Definition: zconf.h:214
Definition: format.h:895