aboutsummaryrefslogtreecommitdiff
path: root/third_party/agg23/agg_path_storage.h
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/agg23/agg_path_storage.h')
-rw-r--r--third_party/agg23/agg_path_storage.h35
1 files changed, 13 insertions, 22 deletions
diff --git a/third_party/agg23/agg_path_storage.h b/third_party/agg23/agg_path_storage.h
index 17e82d73e..82148061a 100644
--- a/third_party/agg23/agg_path_storage.h
+++ b/third_party/agg23/agg_path_storage.h
@@ -16,6 +16,8 @@
#ifndef AGG_PATH_STORAGE_INCLUDED
#define AGG_PATH_STORAGE_INCLUDED
#include "agg_basics.h"
+namespace pdfium
+{
namespace agg
{
class path_storage
@@ -48,6 +50,10 @@ public:
};
~path_storage();
path_storage();
+ path_storage(path_storage&& other);
+ path_storage& operator=(path_storage&&) = delete;
+ path_storage(const path_storage&) = delete;
+ path_storage& operator=(const path_storage&) = delete;
unsigned last_vertex(float* x, float* y) const;
unsigned prev_vertex(float* x, float* y) const;
void move_to(float x, float y);
@@ -70,22 +76,6 @@ public:
add_vertex(x, y, cmd);
}
}
- template<class VertexSource>
- void add_path_curve(VertexSource& vs,
- unsigned path_id = 0,
- bool solid_path = true)
- {
- float x, y;
- unsigned cmd;
- int flag;
- vs.rewind(path_id);
- while(!is_stop(cmd = vs.vertex_curve_flag(&x, &y, flag))) {
- if(is_move_to(cmd) && solid_path && m_total_vertices) {
- cmd = path_cmd_line_to | flag;
- }
- add_vertex(x, y, cmd | flag);
- }
- }
unsigned total_vertices() const
{
return m_total_vertices;
@@ -114,12 +104,12 @@ private:
void allocate_block(unsigned nb);
unsigned char* storage_ptrs(float** xy_ptr);
private:
- unsigned m_total_vertices;
- unsigned m_total_blocks;
- unsigned m_max_blocks;
- float** m_coord_blocks;
- unsigned char** m_cmd_blocks;
- unsigned m_iterator;
+ unsigned m_total_vertices = 0;
+ unsigned m_total_blocks = 0;
+ unsigned m_max_blocks = 0;
+ float** m_coord_blocks = nullptr;
+ unsigned char** m_cmd_blocks = nullptr;
+ unsigned m_iterator = 0;
};
inline unsigned path_storage::vertex(float* x, float* y)
{
@@ -169,4 +159,5 @@ inline void path_storage::line_to(float x, float y)
add_vertex(x, y, path_cmd_line_to);
}
}
+} // namespace pdfium
#endif