2 #include "ScopeFOVDiagram.h"
3 #include "parameters\Scope.h"
20 CScopeFOVDiagram::~CScopeFOVDiagram() {
26 if ( SubclassWindow(hWnd) ) {
33 if ( ::IsWindow(m_hWnd) )
38 CDCHandle dc = lpdis->hDC;
43 dc.FillSolidRect ( &lpdis->rcItem, RGB(0,0,0) );
49 for ( uint32_t a = 0 ; a < SCOPE_NAREAS ; a++ ) {
57 const double scalerx = (lpdis->rcItem.right-lpdis->rcItem.left)/totalfovx;
58 const double scalery = (lpdis->rcItem.bottom-lpdis->rcItem.top)/totalfovy;
61 CPoint topleft(round2i16( (totalfovx/2 + zoomedx - zoomedfovx/2) * scalerx), round2i16( (totalfovy/2 + zoomedy - zoomedfovy/2) * scalery));
62 CPoint bottomright(round2i16( (totalfovx/2 + zoomedx + zoomedfovx/2) * scalerx), round2i16( (totalfovy/2 + zoomedy + zoomedfovy/2) * scalery));
63 CRect rect(topleft, bottomright);
67 dc.FillSolidRect(&rect, RGB(255,255,255));
69 dc.FillSolidRect(&rect, RGB(128,128,128));
ScopeNumber< double > masterfovsizey
The same for the y direction.
*bool AttachToDlgItem(HWND hWnd)
()
The master parameters class.
std::array< std::unique_ptr< Area >, SCOPE_NAREAS > areas
holds AreaParameters for all areas.
void DrawItem(LPDRAWITEMSTRUCT lpdis)
Called from COwnerDraw.
This is the include file for standard system include files, or project specific include files that ar...
ScopeNumber< double > masterfovsizex
Size of the maximally reachable field of view.
const uint32_t area
the area of this FPU
std::vector< boost::signals2::connection > connections
Stores connections to ScopeValues that are then disconnected on destruction.
const parameters::Scope *const params
Pointer to the scope parameters to use for calculations.
Various helper functions and classes for Scope.
CScopeFOVDiagram(const uint32_t &_area, const parameters::Scope *_params)
void UpdateDiagram()
Connected to scope parameters, called upon their change.