HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IMG_FileFilterWindow.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_FileFilterWindow ( IMG Library, C++)
7  *
8  * COMMENTS:
9  *
10  * Implements data windowing abstraction for files.
11  *
12  */
13 
14 #pragma once
15 
16 #ifndef IMG_FILE_FILTER_WINDOW_H
17 #define IMG_FILE_FILTER_WINDOW_H
18 
19 #include "IMG_API.h"
20 #include "IMG_FileFilter.h"
21 #include <UT/UT_IntArray.h>
22 #include <UT/UT_NonCopyable.h>
23 #include <UT/UT_Rect.h>
24 #include <UT/UT_ValArray.h>
25 
26 class PXL_FillParms;
27 
29 {
30 public:
31  IMG_FileFilterWindow(IMG_File *file_to_filter);
32  ~IMG_FileFilterWindow() override;
33 
35 
36  const char *className() const override { return "IMG_FileFilterWindow"; }
37 
38  void initWindow(const UT_DimRect &user_area);
39 
40  const void *readPlaneScanline(int y, const IMG_Plane &pi) override;
41 
42  int writePlaneScanline(const void *data, int y,
43  const IMG_Plane &pi) override;
44 
45  void computeCommonData() override;
46 
47  int getDeepPixelSamples(int x, int y) override;
48  bool getDeepPixelPlaneData(int x, int y,
49  const IMG_Plane &plane,
50  float *data) override;
51  bool getDeepPixelData(int x, int y, float * const *data) override;
52  bool readDeepPixelData(int x, int y,
53  PXL_DeepSampleList &p) override;
54  bool writeDeepPixelData(int x, int y,
55  const PXL_DeepSampleListPtr &p) override;
56 private:
57 
58  void fillBG(void *buffer, const IMG_Plane &pi,
59  PXL_FillParms *parms);
60  void fillScan(void *buffer, const void *input,
61  const IMG_Plane &pi,
62  IMG_Stat &stat, IMG_Stat &istat);
63  void clearScan(void *buffer, const IMG_Plane &pi);
64 
65  void finishedScanline(int scan) override;
66 
67  bool computeXY(int &x, int &y);
68 
69  UT_DimRect myInWindow;
70  UT_DimRect myOutWindow;
71  bool myDisjointFlag;
72  fpreal myBGColor[4];
73  bool myStreakFlag;
74 
75  UT_ValArray<PXL_FillParms *> myPlaneFill;
76  UT_ValArray<PXL_FillParms *> myPlaneFillLeft;
77  UT_ValArray<PXL_FillParms *> myPlaneFillRight;
78  UT_IntArray myPlaneScanline;
79 };
80 
81 #endif
bool getDeepPixelPlaneData(int x, int y, const IMG_Plane &plane, float *data) override
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
int getDeepPixelSamples(int x, int y) override
#define IMG_API
Definition: IMG_API.h:10
bool getDeepPixelData(int x, int y, float *const *data) override
Definition: core.h:760
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
void computeCommonData() override
GLint GLenum GLint x
Definition: glcorearb.h:409
bool writeDeepPixelData(int x, int y, const PXL_DeepSampleListPtr &p) override
fpreal64 fpreal
Definition: SYS_Types.h:277
bool readDeepPixelData(int x, int y, PXL_DeepSampleList &p) override
Contains the details of a specific image file, used by IMG_File. This class contains all the high-lev...
Definition: IMG_Stat.h:38
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