1 // Created by: Kirill GAVRILOV
2 // Copyright (c) 2013-2015 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
15 #ifndef _Font_Rect_H__
16 #define _Font_Rect_H__
18 #include <NCollection_Vec2.hxx>
20 //! Auxiliary POD structure - 2D rectangle definition.
24 float Left; //!< left position
25 float Right; //!< right position
26 float Top; //!< top position
27 float Bottom; //!< bottom position
29 //! Top-left corner as vec2.
30 NCollection_Vec2<float> TopLeft() const
32 return NCollection_Vec2<float> (Left, Top);
35 //! Top-left corner as vec2.
36 NCollection_Vec2<float>& TopLeft (NCollection_Vec2<float>& theVec) const
43 //! Top-right corner as vec2.
44 NCollection_Vec2<float>& TopRight (NCollection_Vec2<float>& theVec) const
51 //! Bottom-left corner as vec2.
52 NCollection_Vec2<float>& BottomLeft (NCollection_Vec2<float>& theVec) const
59 //! Bottom-right corner as vec2.
60 NCollection_Vec2<float>& BottomRight (NCollection_Vec2<float>& theVec) const
81 #endif // _Font_Rect_H__