12 Document(const std::string & filename = "") : m_objects(), m_count(0) {Load(filename);}
13 virtual ~Document() {}
15 void LoadSVG(const std::string & filename, const Rect & bounds = {0,0,1,1});
17 void Load(const std::string & filename = "");
18 void Save(const std::string & filename);
19 void DebugDumpObjects();
21 unsigned ObjectCount() const {return m_count;}
22 inline const Objects & GetObjects() const {return m_objects;}
24 bool operator==(const Document & equ) const;
25 bool operator!=(const Document & equ) const {return !(this->operator==(equ));}
27 void Add(ObjectType type, const Rect & bounds, unsigned data_index = 0);
28 unsigned AddBezierData(const Bezier & bezier);
30 void AddPathFromString(const std::string & d, const Rect & bounds);
32 #ifndef QUADTREE_DISABLED
33 inline const QuadTree& GetQuadTree() { if (m_quadtree.root_id == QUADTREE_EMPTY) { GenBaseQuadtree(); } return m_quadtree; }
34 QuadTreeIndex GenQuadChild(QuadTreeIndex parent, QuadTreeNodeChildren type);
35 QuadTreeIndex GenQuadParent(QuadTreeIndex child, QuadTreeNodeChildren mytype);
41 #ifndef QUADTREE_DISABLED
43 void GenBaseQuadtree();