|
Enrollment 28.2.0
|
It holds rectangle vertexes, width, height. More...
#include <ImageAttribute.h>
Public Types | |
| using | Dimension = float |
| The rectangle dimension. | |
| using | Height = Dimension |
| Rectangle height. | |
| using | Width = Dimension |
| Rectangle width. | |
Public Member Functions | |
| const Point & | GetTopLeft () const |
| Provides top-left vertex. | |
| const Point & | GetTopRight () const |
| Provides top-right vertex. | |
| const Point & | GetBottomRight () const |
| Provides bottom-right vertex. | |
| const Point & | GetBottomLeft () const |
| Provides bottom-left vertex. | |
| Width | GetWidth () const |
| Provides width of rectangle The width is distance between top-left and top-right vertexes. | |
| Height | GetHeight () const |
| Provides height of rectangle The height is distance between bottom-left and top-left vertexes. | |
| Rectangle | Resize (Width w, Height h) const |
| Resize rectangle to given width and height. | |
| Point | CalculateCenter () const |
| Calculates the center point of the rectangle. | |
| void | WriteTo (Writer &writer) const final |
| Write itself into writer. | |
| Rectangle (Point topLeftPoint, Point topRightPoint, Point bottomRightPoint, Point bottomLeftPoint) | |
| Constructor store given coordinates. | |
| Rectangle (Point topLeftPoint, Point topRightPoint, Point bottomRightPoint, Point bottomLeftPoint, std::shared_ptr< ImageExecutor > executor) | |
| Constructor store given coordinates. | |
It holds rectangle vertexes, width, height.
The vertexes may not be rectangular. When SDK need real rectangle for its functionality it will use minimal bounding rectangle around given vertexes.
| using Dimension = float |
The rectangle dimension.
It is not integer because rectangle can be rotated.
|
inline |
Constructor store given coordinates.
The GlobalImageExecutor is used.
| topLeftPoint | top left point |
| topRightPoint | top right point |
| bottomLeftPoint | bottom left point |
| bottomRightPoint | bottom right point |
| EnrollmentException | when rectangle dimensions can not be calculated. |
References Rectangle().
Referenced by Rectangle(), and Resize().
|
inline |
Constructor store given coordinates.
| topLeftPoint | top left point |
| topRightPoint | top right point |
| bottomLeftPoint | bottom left point |
| bottomRightPoint | bottom right point |
| executor | ImageExecutor to modify rectangle |
| EnrollmentException | when rectangle dimensions can not be calculated. |
| NullArgumentException | when executor is null |
|
inlinenodiscard |
Calculates the center point of the rectangle.
Referenced by Circle::CreateInscribedCircle().
|
inlinenodiscard |
Provides bottom-left vertex.
Referenced by Image::CropAlignedRectangle(), Image::CropRectangle(), and Image::RectangleIntersection().
|
inlinenodiscard |
Provides bottom-right vertex.
Referenced by Image::CropAlignedRectangle(), Image::CropRectangle(), and Image::RectangleIntersection().
|
inlinenodiscard |
Provides height of rectangle The height is distance between bottom-left and top-left vertexes.
When given vertexes are not rectangular then minimal bounding rectangle is calculated and height of the rectangle is returned.
Referenced by Circle::CreateInscribedCircle(), and Image::CropAlignedRectangle().
|
inlinenodiscard |
Provides top-left vertex.
Referenced by Image::CropAlignedRectangle(), Image::CropRectangle(), and Image::RectangleIntersection().
|
inlinenodiscard |
Provides top-right vertex.
Referenced by Image::CropAlignedRectangle(), Image::CropRectangle(), and Image::RectangleIntersection().
|
inlinenodiscard |
Provides width of rectangle The width is distance between top-left and top-right vertexes.
When given vertexes are not rectangular then minimal bounding rectangle is calculated and width of the rectangle is returned.
Referenced by Circle::CreateInscribedCircle(), and Image::CropAlignedRectangle().
Resize rectangle to given width and height.
| w | width of new rectangle |
| h | height of new rectangle |
| EnrollmentInvalidArgumentException | when width is 1 or less |
| EnrollmentInvalidArgumentException | when height is 1 or less |
| EnrollmentException | when it is not possible to resize rectangle |
References Rectangle().
|
inlinefinalvirtual |
Write itself into writer.
| writer | Writer to use to serialize this Serializable |
Implements Serializable.