-
Notifications
You must be signed in to change notification settings - Fork 1
/
Led.h
47 lines (37 loc) · 1.21 KB
/
Led.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//---------------------------------------------------------------------------
#ifndef LedH
#define LedH
#include <System.hpp>
#include <vector>
#include "VclGdiplus.h"
namespace SclLedCtrl {
class GdiPlusSessionManager {
public:
GdiPlusSessionManager();
~GdiPlusSessionManager();
private:
GdiPlusSessionManager( GdiPlusSessionManager const & );
GdiPlusSessionManager& operator =( GdiPlusSessionManager const & );
Gdiplus::GdiplusStartupInput gdiplusStartupInput_;
ULONG_PTR gdiplusToken_;
};
class Led {
public:
Led( float Size );
long GetIntensity() const;
void SetIntensity( long Val );
void Draw( Gdiplus::Graphics& Canvas,
Gdiplus::Color Color,
Gdiplus::PointF Offset = Gdiplus::PointF(),
Gdiplus::Color RingColor = Gdiplus::Color( 255, 8, 8, 8 ),
float RingSize = 2.0F ) const;
float GetSize() const { return size_; }
private:
typedef std::vector<Gdiplus::PointF> GlowCurvePointCont;
GdiPlusSessionManager gdiPlusSessionMngr_;
float size_;
GlowCurvePointCont glowCurvePoints_;
};
} // End of namespace SclLedCtrl
//---------------------------------------------------------------------------
#endif