2 * Copyright@ Samsung Electronics Co. LTD
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 * \brief header file for ExynosRect
20 * \author Sangwoo, Park(sw5771.park@samsung.com)
23 * <b>Revision History: </b>
24 * - 2010/06/03 : Sangwoo, Park(sw5771.park@samsung.com) \n
27 * - 2012/03/14 : sangwoo.park(sw5771.park@samsung.com) \n
28 * Change file, struct name to ExynosXXX.
32 #ifndef EXYNOS_RECT_H_
33 #define EXYNOS_RECT_H_
35 //! Rectangle information
45 int fullW
; //!< full width of image
46 int fullH
; //!< full height of image
47 int colorFormat
; //!< V4L2_PIX_FMT_XXX
51 ExynosRect(int _x_
= 0,
57 int _colorFormat_
= 0)
65 colorFormat
= _colorFormat_
;
69 ExynosRect(const ExynosRect
*other
)
77 colorFormat
= other
->colorFormat
;
80 //! Operator(=) override
81 ExynosRect
& operator =(const ExynosRect
&other
)
89 colorFormat
= other
.colorFormat
;
93 //! Operator(==) override
94 bool operator ==(const ExynosRect
&other
) const
100 && fullW
== other
.fullW
101 && fullH
== other
.fullH
102 && colorFormat
== other
.colorFormat
);
105 //! Operator(!=) override
106 bool operator !=(const ExynosRect
&other
) const
109 return !(*this == other
);
120 int x1
; //!< Left (The x-coordinate value of upper-left corner)
121 int y1
; //!< Top (The y-coordinate value of upper-left corner)
122 int x2
; //!< Right (The x-coordinate value of lower-right corner)
123 int y2
; //!< Bottom (The y-coordinate value of lower-right corner)
127 ExynosRect2(int _x1_
= 0, int _y1_
= 0, int _x2_
= 0, int _y2_
= 0)
136 ExynosRect2(const ExynosRect2
*other
)
144 //! Operator(=) override
145 ExynosRect2
& operator =(const ExynosRect2
&other
)
154 //! Operator(==) override
155 bool operator ==(const ExynosRect2
&other
) const
157 return ( x1
== other
.x1
163 //! Operator(!=) override
164 bool operator !=(const ExynosRect2
&other
) const
167 return !(*this == other
);
172 #endif //EXYNOS_RECT_H_