7 class ScopeMultiHistogram;
8 typedef std::shared_ptr<ScopeMultiHistogram> ScopeMultiHistogramPtr;
50 scope::ScopeMultiHistogramPtr
hist;
66 D2HistogramRender(
const uint32_t& _width,
const uint32_t& _channels, scope::ScopeMultiHistogramPtr _hist);
72 void Create(
const HWND& _hwnd);
81 void Size(
const CSize& size);
88 bool ClickedAt(
const CPoint _clickpoint, uint32_t& _channel,
bool& _uplo);
std::unique_ptr< RenderTarget > render_target
Direct2D render target.
D2HistogramRender operator=(const D2HistogramRender &)
Disable assignment.
const uint32_t width
constant width of the renderer
scope::ScopeMultiHistogramPtr hist
Pointer to the currently rendered multi histogram.
Wrappers around the Direct2D interface.
void SetHistogram(scope::ScopeMultiHistogramPtr _hist)
Sets the pointer to the current multi histogram.
void Render()
Draws the current multi histogram with the limit lines.
void DiscardDeviceResources()
Safely release all Direct2D resources.
Parts of the code are modified from Microsoft's Direct2D nbody example: Copyright (c) Microsoft Corpo...
std::shared_ptr< D2HistogramRender > D2HistogramRenderPtr
Shared pointer to a D2HistogramRenderPtr.
bool ClickedAt(const CPoint _clickpoint, uint32_t &_channel, bool &_uplo)
Checks if click hit a limit (+-5 pixel) and if yes, on which channel and upper or lower limit line...
D2HistogramRender(const D2HistogramRender &)
Disable copy.
Handles all Direct2D rendering in a CHistogramView.
std::vector< FLOAT > ulpos
Keeps track of the upper limit positions in screen coordinates.
ID2D1SolidColorBrush * brushwhite
Direct2D white brush.
void Create(const HWND &_hwnd)
Creates the render target for a hwnd, the brushes for painting, and sets the limit position to the wi...
void SetLowerLimitPosition(const uint32_t &_channel, const FLOAT &_pos)
Set position of a lower limit line.
std::vector< FLOAT > llpos
Keeps track of the lower limit positions in screen coordinates.
ID2D1SolidColorBrush * brushyellow
Direct2D yellow brush.
const uint32_t channels
number of channels
void Size(const CSize &size)
Resizes the renderer and the limit positions.
std::mutex mutex
mutex for protection
void SetUpperLimitPosition(const uint32_t &_channel, const FLOAT &_pos)
Set position of an upper limit line.
~D2HistogramRender()
Discard device resources.
ID2D1SolidColorBrush * brushred
Direct2D red brush.