OLD | NEW |
1 | 1 |
2 //---------------------------------------------------------------------------- | 2 //---------------------------------------------------------------------------- |
3 // Anti-Grain Geometry - Version 2.3 | 3 // Anti-Grain Geometry - Version 2.3 |
4 // Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com) | 4 // Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com) |
5 // | 5 // |
6 // Permission to copy, use, modify, sell and distribute this software | 6 // Permission to copy, use, modify, sell and distribute this software |
7 // is granted provided this copyright notice appears in all copies. | 7 // is granted provided this copyright notice appears in all copies. |
8 // This software is provided "as is" without express or implied | 8 // This software is provided "as is" without express or implied |
9 // warranty, and with no claim as to its suitability for any purpose. | 9 // warranty, and with no claim as to its suitability for any purpose. |
10 // | 10 // |
11 //---------------------------------------------------------------------------- | 11 //---------------------------------------------------------------------------- |
12 // Contact: mcseem@antigrain.com | 12 // Contact: mcseem@antigrain.com |
13 // mcseemagg@yahoo.com | 13 // mcseemagg@yahoo.com |
14 // http://www.antigrain.com | 14 // http://www.antigrain.com |
15 //---------------------------------------------------------------------------- | 15 //---------------------------------------------------------------------------- |
16 #ifndef AGG_PATH_STORAGE_INCLUDED | 16 #ifndef AGG_PATH_STORAGE_INCLUDED |
17 #define AGG_PATH_STORAGE_INCLUDED | 17 #define AGG_PATH_STORAGE_INCLUDED |
18 #include "agg_basics.h" | 18 #include "agg_basics.h" |
19 namespace agg | 19 namespace agg |
20 { | 20 { |
21 class path_storage : public CFX_Object | 21 class path_storage |
22 { | 22 { |
23 enum block_scale_e { | 23 enum block_scale_e { |
24 block_shift = 8, | 24 block_shift = 8, |
25 block_size = 1 << block_shift, | 25 block_size = 1 << block_shift, |
26 block_mask = block_size - 1, | 26 block_mask = block_size - 1, |
27 block_pool = 256 | 27 block_pool = 256 |
28 }; | 28 }; |
29 public: | 29 public: |
30 class vertex_source : public CFX_Object | 30 class vertex_source |
31 { | 31 { |
32 public: | 32 public: |
33 vertex_source() {} | 33 vertex_source() {} |
34 vertex_source(const path_storage& p) : m_path(&p), m_vertex_idx(0) {} | 34 vertex_source(const path_storage& p) : m_path(&p), m_vertex_idx(0) {} |
35 void rewind(unsigned path_id) | 35 void rewind(unsigned path_id) |
36 { | 36 { |
37 m_vertex_idx = path_id; | 37 m_vertex_idx = path_id; |
38 } | 38 } |
39 unsigned vertex(FX_FLOAT* x, FX_FLOAT* y) | 39 unsigned vertex(FX_FLOAT* x, FX_FLOAT* y) |
40 { | 40 { |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 inline void path_storage::move_to(FX_FLOAT x, FX_FLOAT y) | 163 inline void path_storage::move_to(FX_FLOAT x, FX_FLOAT y) |
164 { | 164 { |
165 add_vertex(x, y, path_cmd_move_to); | 165 add_vertex(x, y, path_cmd_move_to); |
166 } | 166 } |
167 inline void path_storage::line_to(FX_FLOAT x, FX_FLOAT y) | 167 inline void path_storage::line_to(FX_FLOAT x, FX_FLOAT y) |
168 { | 168 { |
169 add_vertex(x, y, path_cmd_line_to); | 169 add_vertex(x, y, path_cmd_line_to); |
170 } | 170 } |
171 } | 171 } |
172 #endif | 172 #endif |
OLD | NEW |