diff options
author | David Walter Seikel | 2013-01-13 17:29:19 +1000 |
---|---|---|
committer | David Walter Seikel | 2013-01-13 17:29:19 +1000 |
commit | 07274513e984f0b5544586c74508ccd16e7dcafa (patch) | |
tree | b32ff2a9136fbc1a4a6a0ed1e4d79cde0f5f16d9 /libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_font.h | |
parent | Added Irrlicht 1.8, but without all the Windows binaries. (diff) | |
download | SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.zip SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.gz SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.bz2 SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.xz |
Remove EFL, since it's been released now.
Diffstat (limited to 'libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_font.h')
-rw-r--r-- | libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_font.h | 113 |
1 files changed, 0 insertions, 113 deletions
diff --git a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_font.h b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_font.h deleted file mode 100644 index e8c0196..0000000 --- a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_object_font.h +++ /dev/null | |||
@@ -1,113 +0,0 @@ | |||
1 | #ifndef __EVAS_DIRECT3D_OBJECT_FONT_H__ | ||
2 | #define __EVAS_DIRECT3D_OBJECT_FONT_H__ | ||
3 | |||
4 | #include "evas_engine.h" | ||
5 | |||
6 | #include "ref.h" | ||
7 | #include "array.h" | ||
8 | |||
9 | #include "evas_direct3d_object.h" | ||
10 | |||
11 | class D3DObjectFont : public D3DObject | ||
12 | { | ||
13 | public: | ||
14 | |||
15 | class Glyph : public Referenc | ||
16 | { | ||
17 | public: | ||
18 | Glyph(void *source) | ||
19 | : _source(source), _width(0), _height(0) {}; | ||
20 | |||
21 | bool Compare(void *source) | ||
22 | { | ||
23 | return (_source == source); | ||
24 | } | ||
25 | void *Source() | ||
26 | { | ||
27 | return _source; | ||
28 | } | ||
29 | |||
30 | private: | ||
31 | friend class D3DObjectFont; | ||
32 | void *_source; | ||
33 | TArray<BYTE> _data; | ||
34 | int _width; | ||
35 | int _height; | ||
36 | }; | ||
37 | |||
38 | public: | ||
39 | D3DObjectFont(void *source, int image_id); | ||
40 | ~D3DObjectFont(); | ||
41 | |||
42 | inline bool Compare(void *source); | ||
43 | void CopyTo(D3DObjectFont *font); | ||
44 | |||
45 | virtual void Draw(D3DDevice *d3d); | ||
46 | static void EndCache(D3DDevice *d3d); | ||
47 | |||
48 | inline void SetColor(DWORD color); | ||
49 | |||
50 | Glyph *GetGlyph(void *source); | ||
51 | Glyph *AddGlyph(D3DDevice *d3d, void *source, BYTE *data8, int width, int height, int pitch); | ||
52 | void PushForDraw(Glyph *glyph, int x, int y); | ||
53 | |||
54 | protected: | ||
55 | static void BeginCache(int image_id); | ||
56 | |||
57 | private: | ||
58 | struct Vertex | ||
59 | { | ||
60 | FLOAT x, y; | ||
61 | FLOAT u, v; | ||
62 | }; | ||
63 | |||
64 | struct Color | ||
65 | { | ||
66 | union | ||
67 | { | ||
68 | struct | ||
69 | { | ||
70 | BYTE b, g, r, a; | ||
71 | }; | ||
72 | DWORD color; | ||
73 | }; | ||
74 | |||
75 | FLOAT Alpha() { return FLOAT(a) / 255.f; } | ||
76 | }; | ||
77 | |||
78 | class Cache | ||
79 | { | ||
80 | public: | ||
81 | Cache() | ||
82 | : enabled(false), image_id(-1), width(0), height(0) {}; | ||
83 | public: | ||
84 | TArray<DWORD> data; | ||
85 | TArray<POINT> dirty; // Start, End | ||
86 | bool enabled; | ||
87 | int image_id; | ||
88 | int width; | ||
89 | int height; | ||
90 | RECT valid_rect; | ||
91 | }; | ||
92 | |||
93 | private: | ||
94 | DWORD _color; | ||
95 | void *_source; | ||
96 | int _image_id; | ||
97 | |||
98 | TArray<Ref<Glyph> > _glyphs; | ||
99 | |||
100 | static Cache _cache; | ||
101 | }; | ||
102 | |||
103 | bool D3DObjectFont::Compare(void *source) | ||
104 | { | ||
105 | return (_source == source); | ||
106 | } | ||
107 | |||
108 | void D3DObjectFont::SetColor(DWORD color) | ||
109 | { | ||
110 | _color = color; | ||
111 | } | ||
112 | |||
113 | #endif // __EVAS_DIRECT3D_OBJECT_FONT_H__ | ||