5 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
26 #include <dali/public-api/common/dali-common.h>
31 * @addtogroup dali_core_common
36 * @brief Structure describing the a collection of uint16_t.
39 struct DALI_CORE_API Extents
42 * @brief Default constructor which provides an initialized Dali::Extents( 0u, 0u, 0u, 0u ).
48 * @brief Copy constructor.
50 * @param[in] copy A reference to the copied Extents
52 Extents( const Extents& copy ) = default;
58 * @param[in] start Start extent
59 * @param[in] end End extent
60 * @param[in] top Top extent
61 * @param[in] bottom Bottom extent
63 Extents( uint16_t start, uint16_t end, uint16_t top, uint16_t bottom );
66 * @brief Copy Assignment operator.
68 * @param[in] copy A reference to the copied Extents
71 Extents& operator=( const Extents& copy ) = default;
74 * @brief Assignment operator.
77 * @param[in] array Array of uint16_t
80 Extents& operator=( const uint16_t* array );
83 * @brief Equality operator.
86 * @param[in] rhs The Extents to test against
87 * @return True if the extents are equal
89 bool operator==( const Extents &rhs ) const;
92 * @brief Inequality operator.
95 * @param[in] rhs The Extents to test against
96 * @return True if the extents are not equal
98 bool operator!=( const Extents &rhs ) const;
101 uint16_t start; ///< The start extent. @SINCE_1_2.62
102 uint16_t end; ///< The end extent. @SINCE_1_2.62
103 uint16_t top; ///< The top extent. @SINCE_1_2.62
104 uint16_t bottom; ///< The bottom extent. @SINCE_1_2.62
109 * @brief Converts the value of the extents into a string and insert in to an output stream.
112 * @param[in] stream The output stream operator
113 * @param[in] extents The Extents to output
114 * @return The output stream operator
116 DALI_CORE_API std::ostream& operator<<( std::ostream& stream, const Extents& extents );
123 #endif // DALI_EXTENTS_H