CVB++ 15.0
decl_image_rect.hpp
1#pragma once
2
3#include "../../global.hpp"
4#include "../../size_2d.hpp"
5#include "../../point_2d.hpp"
6
7namespace Cvb
8{
9
10 CVB_BEGIN_INLINE_NS
11
12 namespace Driver
13 {
14
16
17 class ImageRect
18 {
19
20 public:
21 explicit ImageRect(const DevicePtr &parent) noexcept
22 : parent_(parent)
23 {
24 }
25
27
31 DevicePtr Parent() const noexcept
32 {
33 return parent_;
34 }
35
37
41 Size2D<int> SensorSize() const;
42
44
48 Size2D<int> Size() const;
49
51
56 void ApplySize(Size2D<int> size, DeviceUpdateMode mode);
57
59
63 Point2D<int> Offset() const;
64
66
70 void SetOffset(Point2D<int> point);
71
73
77 void Update(DeviceUpdateMode mode);
78
79 private:
80 DevicePtr parent_;
81 };
82
83 } // namespace Driver
84
85 using Driver::ImageRect;
86
87 CVB_END_INLINE_NS
88
89} // namespace Cvb
Size2D< int > Size() const
Gets the current rectangle size.
Definition detail_image_rect.hpp:35
Size2D< int > SensorSize() const
Gets the sensor size.
Definition detail_image_rect.hpp:18
void SetOffset(Point2D< int > point)
Sets the offset of the image rectangle.
Definition detail_image_rect.hpp:82
Point2D< int > Offset() const
Gets the offset of the image rectangle.
Definition detail_image_rect.hpp:70
void ApplySize(Size2D< int > size, DeviceUpdateMode mode)
Sets the size.
Definition detail_image_rect.hpp:49
DevicePtr Parent() const noexcept
Gets the parent device of this interface.
Definition decl_image_rect.hpp:31
void Update(DeviceUpdateMode mode)
Updates the CVB buffer according to the current device settings.
Definition detail_image_rect.hpp:96
Multi-purpose 2D vector class.
Definition point_2d.hpp:20
Stores a pair of numbers that represents the width and the height of a subject, typically a rectangle...
Definition size_2d.hpp:20
Namespace for driver or device related operations.
Definition decl_composite.hpp:28
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17
std::shared_ptr< Device > DevicePtr
Convenience shared pointer for Device.
Definition global.hpp:98
DeviceUpdateMode
Defines how to treat the optional device image, when the device itself is updated.
Definition global.hpp:252