summaryrefslogtreecommitdiff
path: root/inc/Image_DIndexedImage.hxx
blob: d274ba3e12ee75883534dbaea33256b16cf03a85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _Image_DIndexedImage_HeaderFile
#define _Image_DIndexedImage_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineHandle_HeaderFile
#include <Standard_DefineHandle.hxx>
#endif
#ifndef _Handle_Image_DIndexedImage_HeaderFile
#include <Handle_Image_DIndexedImage.hxx>
#endif

#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Standard_Address_HeaderFile
#include <Standard_Address.hxx>
#endif
#ifndef _Aspect_IndexPixel_HeaderFile
#include <Aspect_IndexPixel.hxx>
#endif
#ifndef _Image_Image_HeaderFile
#include <Image_Image.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Quantity_PlaneAngle_HeaderFile
#include <Quantity_PlaneAngle.hxx>
#endif
#ifndef _Handle_Image_Image_HeaderFile
#include <Handle_Image_Image.hxx>
#endif
#ifndef _Image_TypeOfImage_HeaderFile
#include <Image_TypeOfImage.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Image_PixelAddress_HeaderFile
#include <Image_PixelAddress.hxx>
#endif
#ifndef _Image_FlipType_HeaderFile
#include <Image_FlipType.hxx>
#endif
class Aspect_IndexPixel;
class Image_PixelRowOfDIndexedImage;
class Image_PixelFieldOfDIndexedImage;
class Image_PixelInterpolation;
class gp_GTrsf2d;
class gp_Trsf;
class Image_Image;
class Aspect_Pixel;



class Image_DIndexedImage : public Image_Image {

public:

  
  Standard_EXPORT   virtual  void Destroy() ;
~Image_DIndexedImage()
{
  Destroy();
}
  
  Standard_EXPORT     void SetBackgroundPixel(const Aspect_IndexPixel& aPixel) ;
  
  Standard_EXPORT    const Aspect_IndexPixel& BackgroundPixel() const;
  
  Standard_EXPORT    const Aspect_IndexPixel& Pixel(const Standard_Integer X,const Standard_Integer Y) const;
   const Aspect_IndexPixel& operator()(const Standard_Integer X,const Standard_Integer Y) const
{
  return Pixel(X,Y);
}
  
  Standard_EXPORT     void SetPixel(const Standard_Integer X,const Standard_Integer Y,const Aspect_IndexPixel& aPixel) ;
  
  Standard_EXPORT     Aspect_IndexPixel& MutPixel(const Standard_Integer X,const Standard_Integer Y) ;
    Aspect_IndexPixel& operator()(const Standard_Integer X,const Standard_Integer Y) 
{
  return MutPixel(X,Y);
}
  
  Standard_EXPORT     void SetRow(const Standard_Integer X,const Standard_Integer Y,const Image_PixelRowOfDIndexedImage& aRow) ;
  
  Standard_EXPORT     void Row(const Standard_Integer X,const Standard_Integer Y,Image_PixelRowOfDIndexedImage& aRow) const;
  
  Standard_EXPORT     void SwapRow(const Standard_Integer I,const Standard_Integer J) ;
  
  Standard_EXPORT     void SwapCol(const Standard_Integer I,const Standard_Integer J) ;
  
  Standard_EXPORT     void Zoom(const Image_PixelInterpolation& anInterpolation,const Standard_Real aCoefX,const Standard_Real aCoefY) ;
  
  Standard_EXPORT     void Rotate(const Image_PixelInterpolation& anInterpolation,const Quantity_PlaneAngle aAngle) ;
  
  Standard_EXPORT     void Translate(const Image_PixelInterpolation& anInterpolation,const Standard_Real DX,const Standard_Real DY) ;
  
  Standard_EXPORT     void Affine(const Image_PixelInterpolation& anInterpolation,const gp_GTrsf2d& Trsf) ;
  
  Standard_EXPORT     void Affine(const Image_PixelInterpolation& anInterpolation,const gp_Trsf& Trsf) ;
  
  Standard_EXPORT   virtual  void InternalDup(const Handle(Image_Image)& anImage) ;
  
  Standard_EXPORT     void SetOrigin(const Standard_Integer x,const Standard_Integer y) ;
  
  Standard_EXPORT     Standard_Integer LowerX() const;
  
  Standard_EXPORT     Standard_Integer UpperX() const;
  
  Standard_EXPORT     Standard_Integer Width() const;
  
  Standard_EXPORT     Standard_Integer LowerY() const;
  
  Standard_EXPORT     Standard_Integer UpperY() const;
  
  Standard_EXPORT     Standard_Integer Height() const;
  
  Standard_EXPORT     void Resize(const Standard_Real XOffset,const Standard_Real XScale,const Standard_Real YOffset,const Standard_Real YScale) ;
  
  Standard_EXPORT   virtual  Image_TypeOfImage Type() const = 0;
  
  Standard_EXPORT     Standard_Boolean isSamePixel(const Standard_Integer X,const Standard_Integer Y,const Handle(Image_Image)& anotherImage,const Standard_Integer anotherX,const Standard_Integer anotherY) const;
  
  Standard_EXPORT     void Pixel(const Standard_Integer X,const Standard_Integer Y,Aspect_Pixel& aPixel) const;
  
  Standard_EXPORT     void SetPixel(const Standard_Integer X,const Standard_Integer Y,const Aspect_Pixel& aPixel) ;
  
  Standard_EXPORT     void Pixel(const Standard_Integer X,const Standard_Integer Y,Image_PixelAddress& aPixel) const;
  
  Standard_EXPORT     void SetPixel(const Standard_Integer X,const Standard_Integer Y,const Image_PixelAddress& aPixel) ;
  
  Standard_EXPORT     void Transpose(const Image_FlipType aType) ;
  
  Standard_EXPORT     void Clip(const Standard_Integer X,const Standard_Integer Y,const Standard_Integer Width,const Standard_Integer Height) ;
  
  Standard_EXPORT     void Shift(const Standard_Integer XShifth,const Standard_Integer YShift) ;
  
  Standard_EXPORT     void Fill(const Handle(Image_Image)& SrcImage) ;
  
  Standard_EXPORT     void Fill(const Handle(Image_Image)& SrcImage,const Standard_Integer SrcX,const Standard_Integer SrcY,const Standard_Integer SrcWidth,const Standard_Integer SrcHeight,const Standard_Integer X,const Standard_Integer Y) ;
  
  Standard_EXPORT     void FillRect(const Aspect_IndexPixel& aPixel,const Standard_Integer X,const Standard_Integer Y,const Standard_Integer Width,const Standard_Integer Height) ;
  
  Standard_EXPORT     void DrawRect(const Aspect_IndexPixel& aPixel,const Standard_Integer X,const Standard_Integer Y,const Standard_Integer Width,const Standard_Integer Height) ;
  
  Standard_EXPORT     void DrawLine(const Aspect_IndexPixel& aPixel,const Standard_Integer X1,const Standard_Integer Y1,const Standard_Integer X2,const Standard_Integer Y2) ;
  
  Standard_EXPORT     void Clear() ;
  
  Standard_EXPORT     void Dump() const;



  DEFINE_STANDARD_RTTI(Image_DIndexedImage)

protected:

  
  Standard_EXPORT   Image_DIndexedImage(const Standard_Integer x,const Standard_Integer y,const Standard_Integer dx,const Standard_Integer dy,const Aspect_IndexPixel& BackPixel);



private: 

  
  Standard_EXPORT     void FlipHorizontal() ;
  
  Standard_EXPORT     void FlipVertical() ;
  
  Standard_EXPORT     void FlipMainDiagonal() ;
  
  Standard_EXPORT     void FlipAntiDiagonal() ;
  
  Standard_EXPORT     void Rotate90() ;
  
  Standard_EXPORT     void Rotate180() ;
  
  Standard_EXPORT     void Rotate270() ;
  
  Standard_EXPORT    const Image_PixelFieldOfDIndexedImage& PixelField() const;
  
  Standard_EXPORT     void PixelFieldCopyTo(Image_PixelFieldOfDIndexedImage& Dst,const Standard_Integer LowR,const Standard_Integer LowC,const Standard_Integer UpR,const Standard_Integer UpC,const Standard_Integer DstLowR,const Standard_Integer DstLowC) const;
  
  Standard_EXPORT     void PixelFieldCopyFrom(const Image_PixelFieldOfDIndexedImage& Dst,const Standard_Integer LowR,const Standard_Integer LowC,const Standard_Integer UpR,const Standard_Integer UpC,const Standard_Integer DstLowR,const Standard_Integer DstLowC) ;
  
  Standard_EXPORT     void PixelFieldDestroy() ;
  
  Standard_EXPORT     void CirclePixels(const Aspect_IndexPixel& Pixel,const Standard_Integer XCenter,const Standard_Integer YCenter,const Standard_Integer x,const Standard_Integer y,const Standard_Integer LowX,const Standard_Integer LowY,const Standard_Integer UpX,const Standard_Integer UpY) ;

Standard_Integer myX;
Standard_Integer myY;
Standard_Address myPixelField;
Aspect_IndexPixel myBackgroundPixel;


};





// other Inline functions and methods (like "C++: function call" methods)


#endif