HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IMG_FileFilterScale.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_FileFilterScale ( IMG Library, C++)
7  *
8  * COMMENTS:
9  *
10  * Scales a file from one res to another.
11  *
12  */
13 #ifndef IMG_FILE_FILTER_SCALE_H
14 #define IMG_FILE_FILTER_SCALE_H
15 
16 class img_PlaneScale;
17 
18 #include <UT/UT_ValArray.h>
19 #include <UT/UT_FilterType.h>
20 
21 #include "IMG_FileFilter.h"
22 
24 {
25 public:
26  IMG_FileFilterScale(IMG_File *file_to_filter);
27  ~IMG_FileFilterScale() override;
28 
29  const char *className() const override { return "IMG_FileFilterScale"; }
30 
31  void initScale(int xres, int yres, UT_FilterType filter);
32 
33  const void *readPlaneScanline(int y, const IMG_Plane &pi) override;
34 
35  int writePlaneScanline(const void *data, int y,
36  const IMG_Plane &pi) override;
37 private:
38  bool grabScan(void *buffer, int y, int pi, int comp);
39  void finishedScanline(int scan) override;
40 
41  UT_ValArray<img_PlaneScale *> myPlaneScale;
42  int mySupport;
43 
44  friend class img_PlaneScale;
45 };
46 
47 #endif
virtual void finishedScanline(int scan)
virtual int writePlaneScanline(const void *data, int y, const IMG_Plane &pi)
UT_FilterType
Definition: UT_FilterType.h:16
Describes the format and layout of a single plane in an image The plane specifies the format and name...
Definition: IMG_Plane.h:45
#define IMG_API
Definition: IMG_API.h:10
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glew.h:2981
GLint GLint GLint GLint GLint GLint y
Definition: glew.h:1252
const char * className() const override
GLuint buffer
Definition: glew.h:1680
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
Generic interface for reading and writing image files. This class handles the reading and writing of ...
Definition: IMG_File.h:55
constexpr T pi()
Pi constant taken from Boost to match old behaviour.
Definition: Math.h:108
virtual const void * readPlaneScanline(int y, const IMG_Plane &pi)