Merge branch terrible and branch awful
authorSam Moore <[email protected]>
Thu, 23 Oct 2014 11:49:35 +0000 (19:49 +0800)
committerSam Moore <[email protected]>
Thu, 23 Oct 2014 11:49:35 +0000 (19:49 +0800)
scr.Present was in wrong place
Merging sucks
Everything sucks
GPUs suck
fglrx sucks
professionalism sucks
I hope no one looking to hire me ever reads these.

Conflicts:
src/main.h

24 files changed:
src/Makefile
src/bezier.cpp
src/bezier.h
src/controlpanel.cpp
src/debugscript.cpp
src/debugscript.h
src/document.cpp
src/document.h
src/graphicsbuffer.cpp
src/log.cpp
src/log.h
src/main.cpp
src/main.h
src/objectrenderer.cpp
src/profiler.cpp [new file with mode: 0644]
src/profiler.h [new file with mode: 0644]
src/quadtree.cpp
src/quadtree.h
src/rect.h
src/screen.cpp
src/svg-tests/fox-vector-box.svg [new file with mode: 0644]
src/turtles_all_the_way_down.script
src/view.cpp
src/view.h

index 42e793e..161d491 100644 (file)
@@ -10,7 +10,7 @@ else
 endif
 
 MAIN = main.o
-OBJ = log.o real.o bezier.o objectrenderer.o view.o screen.o graphicsbuffer.o framebuffer.o shaderprogram.o stb_truetype.o gl_core44.o  path.o document.o debugscript.o paranoidnumber.o
+OBJ = log.o profiler.o real.o bezier.o objectrenderer.o view.o screen.o graphicsbuffer.o framebuffer.o shaderprogram.o stb_truetype.o gl_core44.o  path.o document.o debugscript.o paranoidnumber.o
 
 QT_INCLUDE := -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -Itests -I.
 QT_DEF := -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB
index 3ace267..88d9c1c 100644 (file)
@@ -96,12 +96,16 @@ vector<BReal> SolveCubic(const BReal & a, const BReal & b, const BReal & c, cons
        //Debug("%u turning points", turns.size());
        for (unsigned i = 1; i < turns.size(); ++i)
        {
-               tu = turns[i];
+               if (tl > max) break;
+               tu = std::min(turns[i],tu);
                CubicSolveSegment(roots, a, b, c, d, tl, tu,delta);
                tl = turns[i];
        }
-       tu = max;
-       CubicSolveSegment(roots, a, b, c, d, tl, tu,delta);
+       if (tu < max)
+       {
+               tu = max;
+               CubicSolveSegment(roots, a, b, c, d, tl, tu,delta);
+       }
        return roots;
 }
 
index 7b46d14..298bcf3 100644 (file)
@@ -20,7 +20,7 @@ namespace IPDF
        
        extern std::vector<BReal> SolveQuadratic(const BReal & a, const BReal & b, const BReal & c, const BReal & min = 0, const BReal & max = 1);
 
-       extern std::vector<BReal> SolveCubic(const BReal & a, const BReal & b, const BReal & c, const BReal & d, const BReal & min = 0, const BReal & max = 1, const BReal & delta = 1e-9);
+       extern std::vector<BReal> SolveCubic(const BReal & a, const BReal & b, const BReal & c, const BReal & d, const BReal & min = 0, const BReal & max = 1, const BReal & delta = 1e-5);
 
        /** A _cubic_ bezier. **/
        struct Bezier
index daa4b21..462105f 100644 (file)
@@ -309,7 +309,17 @@ void ControlPanel::InsertTextIntoDocument()
        string msg = m_text_edit->toPlainText().toStdString();
        Real scale = bounds.h / Real(2);
        Debug("Insert \"%s\" at %f, %f, scale %f", msg.c_str(), Float(xx), Float(yy), Float(scale));
+#ifndef QUADTREE_DISABLED
+       m_doc.SetQuadtreeInsertNode(m_view.GetCurrentQuadtreeNode());
+#endif
        m_doc.AddText(msg, scale, xx, yy);
+#ifndef QUADTREE_DISABLED
+       m_doc.PropagateQuadChanges(m_view.GetCurrentQuadtreeNode());
+       // We may have split the object across up-to four nodes, so try the neighbouring nodes.
+       m_doc.PropagateQuadChanges(m_doc.GetQuadTree().GetNeighbour(m_view.GetCurrentQuadtreeNode(), 0, 1, 0));
+       m_doc.PropagateQuadChanges(m_doc.GetQuadTree().GetNeighbour(m_view.GetCurrentQuadtreeNode(), 1, 0, 0));
+       m_doc.PropagateQuadChanges(m_doc.GetQuadTree().GetNeighbour(m_view.GetCurrentQuadtreeNode(), 1, 1, 0));
+#endif
        m_view.ForceRenderDirty();
        m_view.ForceBufferDirty();
        m_view.ForceBoundsDirty();
@@ -323,7 +333,17 @@ void ControlPanel::InsertSVGIntoDocument()
        bounds.w /= Real(m_screen.ViewportWidth());
        bounds.h /= Real(m_screen.ViewportHeight());
        
+#ifndef QUADTREE_DISABLED
+       m_doc.SetQuadtreeInsertNode(m_view.GetCurrentQuadtreeNode());
+#endif
        m_doc.ParseSVG(m_text_edit->toPlainText().toStdString(), bounds);
+#ifndef QUADTREE_DISABLED
+       m_doc.PropagateQuadChanges(m_view.GetCurrentQuadtreeNode());
+       // We may have split the object across up-to four nodes, so try the neighbouring nodes.
+       m_doc.PropagateQuadChanges(m_doc.GetQuadTree().GetNeighbour(m_view.GetCurrentQuadtreeNode(), 0, 1, 0));
+       m_doc.PropagateQuadChanges(m_doc.GetQuadTree().GetNeighbour(m_view.GetCurrentQuadtreeNode(), 1, 0, 0));
+       m_doc.PropagateQuadChanges(m_doc.GetQuadTree().GetNeighbour(m_view.GetCurrentQuadtreeNode(), 1, 1, 0));
+#endif
        m_view.ForceRenderDirty();
        m_view.ForceBufferDirty();
        m_view.ForceBoundsDirty();
@@ -347,7 +367,17 @@ void ControlPanel::LoadSVGIntoDocument()
        bounds.w /= Real(m_screen.ViewportWidth());
        bounds.h /= Real(m_screen.ViewportHeight());
        
+#ifndef QUADTREE_DISABLED
+       m_doc.SetQuadtreeInsertNode(m_view.GetCurrentQuadtreeNode());
+#endif
        m_doc.LoadSVG(filename.toStdString(), bounds);
+#ifndef QUADTREE_DISABLED
+       m_doc.PropagateQuadChanges(m_view.GetCurrentQuadtreeNode());
+       // We may have split the object across up-to four nodes, so try the neighbouring nodes.
+       m_doc.PropagateQuadChanges(m_doc.GetQuadTree().GetNeighbour(m_view.GetCurrentQuadtreeNode(), 0, 1, 0));
+       m_doc.PropagateQuadChanges(m_doc.GetQuadTree().GetNeighbour(m_view.GetCurrentQuadtreeNode(), 1, 0, 0));
+       m_doc.PropagateQuadChanges(m_doc.GetQuadTree().GetNeighbour(m_view.GetCurrentQuadtreeNode(), 1, 1, 0));
+#endif
        m_view.ForceRenderDirty();
        m_view.ForceBufferDirty();
        m_view.ForceBoundsDirty();
index 2784406..6d4ba7f 100644 (file)
@@ -1,4 +1,5 @@
 #include "debugscript.h"
+#include "profiler.h"
 
 #include <string>
 
@@ -185,6 +186,16 @@ void DebugScript::ParseAction(View * view, Screen * scr)
        {
                currentAction.type = AT_PrintBounds;
        }
+       else if (actionType == "profileon")
+       {
+               currentAction.type = AT_ProfileDisplay;
+               currentAction.iz = 1;
+       }
+       else if (actionType == "profileoff")
+       {
+               currentAction.type = AT_ProfileDisplay;
+               currentAction.iz = 0;
+       }
        else
                Fatal("Unknown action %s", actionType.c_str());
 
@@ -240,12 +251,21 @@ bool DebugScript::Execute(View *view, Screen *scr)
                break;
        case AT_LoadSVG:
        {
+#ifndef QUADTREE_DISABLED
+               view->Doc().SetQuadtreeInsertNode(view->GetCurrentQuadtreeNode());
+#endif
                #ifdef TRANSFORM_OBJECTS_NOT_VIEW
                        view->Doc().LoadSVG(currentAction.textargs, Rect(Real(1)/Real(2),Real(1)/Real(2),Real(1)/Real(800),Real(1)/Real(600))); 
                #else
                        const Rect & bounds = view->GetBounds();
                        view->Doc().LoadSVG(currentAction.textargs, Rect(bounds.x+bounds.w/Real(2),bounds.y+bounds.h/Real(2),bounds.w/Real(800),bounds.h/Real(600)));
                #endif
+#ifndef QUADTREE_DISABLED
+               view->Doc().PropagateQuadChanges(view->GetCurrentQuadtreeNode());
+               view->Doc().PropagateQuadChanges(view->Doc().GetQuadTree().GetNeighbour(view->GetCurrentQuadtreeNode(), 0, 1, 0));
+               view->Doc().PropagateQuadChanges(view->Doc().GetQuadTree().GetNeighbour(view->GetCurrentQuadtreeNode(), 1, 0, 0));
+               view->Doc().PropagateQuadChanges(view->Doc().GetQuadTree().GetNeighbour(view->GetCurrentQuadtreeNode(), 1, 1, 0));
+#endif
                currentAction.type = AT_WaitFrame;
                view->ForceRenderDirty();
                view->ForceBufferDirty();
@@ -401,6 +421,11 @@ bool DebugScript::Execute(View *view, Screen *scr)
                printf("%s\t%s\t%s\t%s\t%s\t%s\n", Str(view->GetBounds().x).c_str(), Str(view->GetBounds().y).c_str(), Str(view->GetBounds().w).c_str(), Str(view->GetBounds().h).c_str(), Str(Log10(view->GetBounds().w)).c_str(), Str(Log10(view->GetBounds().h)).c_str());
                break;
        }
+       case AT_ProfileDisplay:
+       {
+               g_profiler.Enable(currentAction.iz);
+               break;
+       }
        default:
                Fatal("Unknown script command in queue.");
        }
index 916425c..8d34bc7 100644 (file)
@@ -45,6 +45,7 @@ private:
                AT_ScreenShot, // take screenshot
                AT_PrintSPF, // Print FPS statistics about the frames
                AT_PrintBounds, // Print bounds
+               AT_ProfileDisplay,
                AT_Quit
        };
 
index b10ebf5..4a5214a 100644 (file)
@@ -1,5 +1,6 @@
 #include "document.h"
 #include "bezier.h"
+#include "profiler.h"
 #include <cstdio>
 #include <fstream>
 
@@ -101,6 +102,7 @@ void Document::GenBaseQuadtree()
 
 int Document::ClipObjectToQuadChild(int object_id, QuadTreeNodeChildren type)
 {
+       PROFILE_SCOPE("Document::ClipObjectToQuadChild");
        switch (m_objects.types[object_id])
        {
        case RECT_FILLED:
@@ -168,9 +170,10 @@ int Document::ClipObjectToQuadChild(int object_id, QuadTreeNodeChildren type)
 }
 QuadTreeIndex Document::GenQuadChild(QuadTreeIndex parent, QuadTreeNodeChildren type)
 {
+       PROFILE_SCOPE("Document::GenQuadChild()");
        QuadTreeIndex new_index = m_quadtree.nodes.size();
        Debug("-------------- Generating Quadtree Node %d (parent %d, type %d) ----------------------", new_index, parent, type);
-       m_quadtree.nodes.push_back(QuadTreeNode{QUADTREE_EMPTY, QUADTREE_EMPTY, QUADTREE_EMPTY, QUADTREE_EMPTY, parent, type, 0, 0, -1});
+       m_quadtree.nodes.push_back(QuadTreeNode{QUADTREE_EMPTY, QUADTREE_EMPTY, QUADTREE_EMPTY, QUADTREE_EMPTY, parent, type, 0, 0, -1, true});
 
        m_quadtree.nodes[new_index].object_begin = m_objects.bounds.size();
        for (QuadTreeIndex overlay = parent; overlay != -1; overlay = m_quadtree.nodes[overlay].next_overlay)
@@ -203,14 +206,16 @@ QuadTreeIndex Document::GenQuadChild(QuadTreeIndex parent, QuadTreeNodeChildren
                default:
                        Fatal("Tried to add a QuadTree child of invalid type!");
        }
+       m_document_dirty = true;
        return new_index;
 }
 
 void Document::OverlayQuadChildren(QuadTreeIndex orig_parent, QuadTreeIndex parent, QuadTreeNodeChildren type)
 {
+       PROFILE_SCOPE("Document::OverlayQuadChildren()");
        QuadTreeIndex new_index = m_quadtree.nodes.size();
        Debug("-------------- Generating Quadtree Node %d (orig %d parent %d, type %d) ----------------------", new_index, orig_parent, parent, type);
-       m_quadtree.nodes.push_back(QuadTreeNode{QUADTREE_EMPTY, QUADTREE_EMPTY, QUADTREE_EMPTY, QUADTREE_EMPTY, orig_parent, type, 0, 0, -1});
+       m_quadtree.nodes.push_back(QuadTreeNode{QUADTREE_EMPTY, QUADTREE_EMPTY, QUADTREE_EMPTY, QUADTREE_EMPTY, orig_parent, type, 0, 0, -1, true});
 
        m_quadtree.nodes[new_index].object_begin = m_objects.bounds.size();
        for (unsigned i = m_quadtree.nodes[parent].object_dirty; i < m_quadtree.nodes[parent].object_end; ++i)
@@ -260,6 +265,48 @@ void Document::OverlayQuadChildren(QuadTreeIndex orig_parent, QuadTreeIndex pare
 
        m_quadtree.nodes[new_index].object_dirty = m_quadtree.nodes[new_index].object_end;
        m_quadtree.nodes[new_index].next_overlay = -1;
+       m_document_dirty = true;
+}
+
+void Document::OverlayQuadParent(QuadTreeIndex orig_child, QuadTreeIndex child, QuadTreeNodeChildren type)
+{
+       PROFILE_SCOPE("Document::OverlayQuadParent()");
+       QuadTreeIndex new_index = m_quadtree.nodes.size();
+       m_quadtree.nodes.push_back(QuadTreeNode{QUADTREE_EMPTY, QUADTREE_EMPTY, QUADTREE_EMPTY, QUADTREE_EMPTY, -1, QTC_UNKNOWN, 0, 0, -1, true});
+
+       m_quadtree.nodes[new_index].object_begin = m_objects.bounds.size();
+       m_quadtree.nodes[new_index].object_dirty = m_objects.bounds.size();
+       for (QuadTreeIndex overlay = child; overlay != -1; overlay = m_quadtree.nodes[overlay].next_overlay)
+       {
+               for (unsigned i = m_quadtree.nodes[overlay].object_begin; i < m_quadtree.nodes[overlay].object_end; ++i)
+               {
+                       Rect new_bounds = TransformFromQuadChild(m_objects.bounds[i], type);
+                       // If the object is too small to be seen, discard it.
+                       if (!new_bounds.w || !new_bounds.h) continue;
+                       m_objects.bounds.push_back(new_bounds);
+                       m_objects.types.push_back(m_objects.types[i]);
+                       m_objects.data_indices.push_back(m_objects.data_indices[i]);
+                       m_count++;
+               }
+       }
+       m_quadtree.nodes[new_index].object_end = m_objects.bounds.size();
+       QuadTreeIndex orig_node = m_quadtree.nodes[orig_child].parent;
+       if (orig_node == -1)
+               Fatal("Tried to overlay a QuadTree child that didn't exist!");
+
+       // Add us to the node's overlay linked list.
+       QuadTreeIndex prev_overlay = orig_node;
+       while (m_quadtree.nodes[prev_overlay].next_overlay != -1) prev_overlay = m_quadtree.nodes[prev_overlay].next_overlay;
+       m_quadtree.nodes[prev_overlay].next_overlay = new_index;
+       Debug("OverlayQuadParent(%d, %d, %d) = %d", orig_child, child, type, new_index);
+
+       // Recurse into any extant parent.
+       if (m_quadtree.nodes[orig_node].parent != -1)
+               OverlayQuadParent(orig_node, new_index, m_quadtree.nodes[orig_node].child_type);
+
+       m_quadtree.nodes[new_index].object_dirty = m_quadtree.nodes[new_index].object_end;
+       m_quadtree.nodes[new_index].next_overlay = -1;
+       m_document_dirty = true;
 }
 
 void Document::PropagateQuadChanges(QuadTreeIndex node)
@@ -268,6 +315,9 @@ void Document::PropagateQuadChanges(QuadTreeIndex node)
        {
                // We don't care about clean overlays.
                if (m_quadtree.nodes[overlay].object_dirty == m_quadtree.nodes[overlay].object_end) continue;
+               // Recurse into our parent, should we have any.
+               if (m_quadtree.nodes[node].parent != -1)
+                       OverlayQuadParent(node, overlay, m_quadtree.nodes[node].child_type);
                // Recurse into any extant children.
                if (m_quadtree.nodes[node].top_left != -1)
                        OverlayQuadChildren(node, overlay, QTC_TOP_LEFT);
@@ -286,14 +336,17 @@ void Document::PropagateQuadChanges(QuadTreeIndex node)
 QuadTreeIndex Document::GenQuadParent(QuadTreeIndex child, QuadTreeNodeChildren type)
 {
        QuadTreeIndex new_index = m_quadtree.nodes.size();
-       m_quadtree.nodes.push_back(QuadTreeNode{QUADTREE_EMPTY, QUADTREE_EMPTY, QUADTREE_EMPTY, QUADTREE_EMPTY, -1, QTC_UNKNOWN, 0, 0, -1});
+       m_quadtree.nodes.push_back(QuadTreeNode{QUADTREE_EMPTY, QUADTREE_EMPTY, QUADTREE_EMPTY, QUADTREE_EMPTY, -1, QTC_UNKNOWN, 0, 0, -1, true});
 
        m_quadtree.nodes[new_index].object_begin = m_objects.bounds.size();
        for (QuadTreeIndex overlay = child; overlay != -1; overlay = m_quadtree.nodes[overlay].next_overlay)
        {
                for (unsigned i = m_quadtree.nodes[overlay].object_begin; i < m_quadtree.nodes[overlay].object_end; ++i)
                {
-                       m_objects.bounds.push_back(TransformFromQuadChild(m_objects.bounds[i], type));
+                       Rect new_bounds = TransformFromQuadChild(m_objects.bounds[i], type);
+                       // If the object is too small to be seen, discard it.
+                       if (!new_bounds.w || !new_bounds.h) continue;
+                       m_objects.bounds.push_back(new_bounds);
                        m_objects.types.push_back(m_objects.types[i]);
                        m_objects.data_indices.push_back(m_objects.data_indices[i]);
                        m_count++;
@@ -319,6 +372,7 @@ QuadTreeIndex Document::GenQuadParent(QuadTreeIndex child, QuadTreeNodeChildren
                        Fatal("Tried to add a QuadTree child of invalid type!");
        }
        return new_index;
+       m_document_dirty = true;
 }
 
 #endif
@@ -410,12 +464,78 @@ unsigned Document::AddBezier(const Bezier & bezier)
        unsigned index = AddBezierData(data);
        return Add(BEZIER, bounds, index);
 }
+// Adds an object to the Document, clipping it to m_clip_rect.
+// Helper function called by Document::Add()
+int Document::AddClip(ObjectType type, const Rect& bounds, unsigned data_index, const Rect& clip_rect)
+{
+       PROFILE_SCOPE("Document::AddAndClip");
+       switch (type)
+       {
+       case RECT_FILLED:
+       case RECT_OUTLINE:
+       case PATH:
+               {
+               Rect obj_bounds = clip_rect.Clip(bounds);
+               m_objects.bounds.push_back(obj_bounds);
+               m_objects.types.push_back(type);
+               m_objects.data_indices.push_back(data_index);
+               return 1;
+               }
+       case BEZIER:
+               {
+               // If we're entirely within the clipping rect, no clipping need occur.
+               if (clip_rect.Contains(bounds))
+               {
+                       m_objects.bounds.push_back(bounds);
+                       m_objects.types.push_back(type);
+                       m_objects.data_indices.push_back(data_index);
+                       return 1;
+               }
+               Rect clip_bezier_bounds = TransformRectCoordinates(bounds, clip_rect); 
+               std::vector<Bezier> new_curves = m_objects.beziers[data_index].ClipToRectangle(clip_bezier_bounds);
+               for (size_t i = 0; i < new_curves.size(); ++i)
+               {
+                       Bezier new_curve_data = new_curves[i].ToAbsolute(bounds);
+                       Rect new_bounds = new_curve_data.SolveBounds();
+                       new_curve_data = new_curve_data.ToRelative(new_bounds);
+                       unsigned index = AddBezierData(new_curve_data);
+                       m_objects.bounds.push_back(new_bounds);
+                       m_objects.types.push_back(BEZIER);
+                       m_objects.data_indices.push_back(index);
+               }
+               return new_curves.size();
+               }
+       default:
+               m_objects.bounds.push_back(bounds);
+               m_objects.types.push_back(type);
+               m_objects.data_indices.push_back(data_index);
+               return 1;
+       }
+       return 0;
+}
 
 unsigned Document::Add(ObjectType type, const Rect & bounds, unsigned data_index, QuadTreeIndex qti)
 {
-       m_objects.types.push_back(type);
-       m_objects.bounds.push_back(bounds);
-       m_objects.data_indices.push_back(data_index);
+       PROFILE_SCOPE("Document::Add");
+       Rect new_bounds = bounds;
+#ifndef QUADTREE_DISABLED
+       int num_added = 1;
+       if (qti == -1) qti = m_current_insert_node;
+       if (qti != -1)
+       {
+               // Move the object to the quadtree node it should be in.
+               m_quadtree.GetCanonicalCoords(qti, new_bounds.x, new_bounds.y, this);
+               Rect cliprect = Rect(0,0,1,1);
+               num_added = AddClip(type, new_bounds, data_index, cliprect);
+       }
+       else
+#endif
+       {
+               m_objects.types.push_back(type);
+               m_objects.bounds.push_back(new_bounds);
+               m_objects.data_indices.push_back(data_index);
+       }
+       m_document_dirty = true;
 #ifndef QUADTREE_DISABLED
        if (qti != -1)
        {
@@ -424,28 +544,30 @@ unsigned Document::Add(ObjectType type, const Rect & bounds, unsigned data_index
                {
                        if (m_count == m_quadtree.nodes[new_qti].object_end+1)
                        {
-                               m_quadtree.nodes[new_qti].object_end++;
-                               goto done;
+                               m_quadtree.nodes[new_qti].object_end += num_added;
+                               m_quadtree.nodes[new_qti].render_dirty = true;
+                               new_qti = -1;
+                               break;
                        }
                        new_qti = m_quadtree.nodes[new_qti].next_overlay;
                }
+               if (new_qti != -1)
                {
                        QuadTreeIndex overlay = m_quadtree.nodes.size();
                        Debug("Adding new overlay, nqti = %d, overlay = %d", new_qti, overlay);
-                       m_quadtree.nodes.push_back(m_quadtree.nodes[qti]);
+                       m_quadtree.nodes.push_back(QuadTreeNode{QUADTREE_EMPTY, QUADTREE_EMPTY, QUADTREE_EMPTY, QUADTREE_EMPTY, -1, QTC_UNKNOWN, 0, 0, -1});
                        m_quadtree.nodes[overlay].object_begin = m_count;
                        // All objects are dirty.
                        m_quadtree.nodes[overlay].object_dirty = m_count;
-                       m_quadtree.nodes[overlay].object_end = m_count+1;
+                       m_quadtree.nodes[overlay].object_end = m_count+num_added;
                        m_quadtree.nodes[overlay].next_overlay = -1;
+                       m_quadtree.nodes[overlay].render_dirty = true;
                        m_quadtree.nodes[new_qti].next_overlay = overlay;
                        new_qti = overlay;
                }
-done: // matches is not amused, but sulix is nice and moved it inside the #ifdef for him.
-               m_count++;
-               PropagateQuadChanges(qti);
        }
-       return m_count-1;
+       m_count += num_added;
+       return m_count-num_added;
 #else // words fail me (still not amused)
        return (m_count++);
 #endif
index d6f41f3..f98833a 100644 (file)
@@ -34,6 +34,9 @@ namespace IPDF
                                Load(filename);
                                if (font_filename != "")
                                        SetFont(font_filename);
+#ifndef QUADTREE_DISABLED
+                               m_current_insert_node = -1;
+#endif
                        }
                        virtual ~Document() 
                        {
@@ -54,7 +57,8 @@ namespace IPDF
 
                        unsigned AddPath(unsigned start_index, unsigned end_index, const Colour & shading=Colour(0.6,0.6,0.6,1), const Colour & stroke=Colour(0,0,0,0));
                        unsigned AddBezier(const Bezier & bezier);
-                       unsigned Add(ObjectType type, const Rect & bounds, unsigned data_index = 0, QuadTreeIndex qtnode = 0);
+                       int AddClip(ObjectType type, const Rect & bounds, unsigned data_index, const Rect & clip_rect);
+                       unsigned Add(ObjectType type, const Rect & bounds, unsigned data_index = 0, QuadTreeIndex qtnode = -1);
                        unsigned AddBezierData(const Bezier & bezier);
                        unsigned AddPathData(const Path & path);
 
@@ -91,9 +95,12 @@ namespace IPDF
                        QuadTreeIndex GenQuadChild(QuadTreeIndex parent, QuadTreeNodeChildren type);
                        QuadTreeIndex GenQuadParent(QuadTreeIndex child, QuadTreeNodeChildren mytype);
                        void OverlayQuadChildren(QuadTreeIndex orig_parent, QuadTreeIndex parent, QuadTreeNodeChildren type);
+                       void OverlayQuadParent(QuadTreeIndex orig_child, QuadTreeIndex child, QuadTreeNodeChildren type);
                        void PropagateQuadChanges(QuadTreeIndex node);
                        // Returns the number of objects the current object formed when clipped, the objects in question are added to the end of the document.
                        int ClipObjectToQuadChild(int object_id, QuadTreeNodeChildren type);
+
+                       void SetQuadtreeInsertNode(QuadTreeIndex node) { m_current_insert_node = node; }
 #endif
 
                        void ClearObjects()
@@ -109,7 +116,10 @@ namespace IPDF
 #ifndef QUADTREE_DISABLED
                        QuadTree m_quadtree;
                        void GenBaseQuadtree();
+
+                       QuadTreeIndex m_current_insert_node;
 #endif
+                       bool m_document_dirty;
                        unsigned m_count;
                        unsigned char * m_font_data;
                        stbtt_fontinfo m_font;
index c3d9620..02a8f7c 100644 (file)
@@ -190,6 +190,9 @@ void* GraphicsBuffer::MapRange(int offset, int length, bool read, bool write, bo
        // This sometimes makes Intel corrupt memory?
        if (!length) return (m_map_pointer = 0);
 
+       if ((size_t)(length + offset) > m_buffer_size)
+               Fatal("Tried to map outside of range!");
+
 
        RecreateBuffer();
 
@@ -255,19 +258,18 @@ void GraphicsBuffer::Resize(size_t length)
 {
        if (!m_buffer_size)
        {
+               m_invalidated = true;
                m_buffer_size = length;
                return;
        }
-       if (m_invalidated && m_buffer_size >= length)
+       if (m_invalidated)
        {
                m_buffer_size = length;
-       }
-       else if (length <= m_buffer_size)
-       {
-               // Don't need to do anything.
+               m_buffer_shape_dirty = true;
        }
        else
        {
+               size_t oldsize = m_buffer_size;
                glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0, -1, "Resizing buffer.");
                glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DEBUG_SEVERITY_HIGH, 0, NULL, GL_TRUE);
                // Create a new buffer and copy the old data into it.
@@ -277,7 +279,7 @@ void GraphicsBuffer::Resize(size_t length)
                Upload(length, NULL);
                glBindBuffer(GL_COPY_READ_BUFFER, old_buffer);
                glBindBuffer(GL_COPY_WRITE_BUFFER, m_buffer_handle);
-               glCopyBufferSubData(GL_COPY_READ_BUFFER, GL_COPY_WRITE_BUFFER, 0, 0, m_buffer_size);
+               glCopyBufferSubData(GL_COPY_READ_BUFFER, GL_COPY_WRITE_BUFFER, 0, 0, oldsize);
                glDeleteBuffers(1, &old_buffer);
                m_buffer_size = length;
                glPopDebugGroup();
index a695b0e..88c47b7 100644 (file)
@@ -120,7 +120,6 @@ void FatalEx(const char * funct, const char * file, int line, ...)
                // Fatal error in the Fatal function.
                // (This really shouldn't happen unless someone does something insanely stupid)
                Fatal("Format string is NULL");
-               return; // Should never get here
        }
 
        vsnprintf(buffer, BUFSIZ, fmt,va);
index d49c149..8a5882c 100644 (file)
--- a/src/log.h
+++ b/src/log.h
@@ -41,7 +41,7 @@ extern void Backtrace(int size=10);
 
 
 extern void LogEx(int level, const char * funct, const char * file, int line,  ...); // General function for printing log messages to stderr
-extern void FatalEx(const char * funct, const char * file, int line, ...); // Function that deals with a fatal error (prints a message, then exits the program).
+extern void FatalEx(const char * funct, const char * file, int line, ...) __attribute__((__noreturn__)); // Function that deals with a fatal error (prints a message, then exits the program).
 
 #endif //_LOG_H
 
index 46ea73b..c9d2362 100644 (file)
@@ -36,9 +36,9 @@ int main(int argc, char ** argv)
        #endif
 
        // We want to crash if we ever get a NaN.
-       // AH, so *this* is where that got enabled, I was looking for compiler flags
+       // Not any more
        #ifndef __MINGW32__
-       feenableexcept(FE_DIVBYZERO | FE_INVALID); // | FE_OVERFLOW);
+       //feenableexcept(FE_DIVBYZERO | FE_INVALID); // | FE_OVERFLOW);
        #endif
        #if REALTYPE == REAL_MPFRCPP
        
index d5ad7a9..a96e933 100644 (file)
@@ -4,6 +4,7 @@
 #include "view.h"
 #include "screen.h"
 #include "debugscript.h"
+#include "profiler.h"
 #include <unistd.h>
 
 
@@ -124,7 +125,9 @@ void MainLoop(Document & doc, Screen & scr, View & view, int max_frames = -1)
                real_clock_prev = real_clock_now;
                #endif
                ++frames;
+               g_profiler.BeginZone("scr.Clear()");
                scr.Clear();
+               g_profiler.EndZone();
                //view.ForceBoundsDirty();
                //view.ForceBufferDirty();
                //view.ForceRenderDirty();
@@ -135,7 +138,9 @@ void MainLoop(Document & doc, Screen & scr, View & view, int max_frames = -1)
                                return;
                }
 
+               g_profiler.BeginZone("view.Render");
                view.Render(scr.ViewportWidth(), scr.ViewportHeight());
+               g_profiler.EndZone();
 
                double cpu_frame = scr.GetLastFrameTimeCPU();
                double gpu_frame = scr.GetLastFrameTimeGPU();
@@ -210,14 +215,20 @@ void MainLoop(Document & doc, Screen & scr, View & view, int max_frames = -1)
                }
                #endif // 0
 
-               scr.Present();
-
                if (make_movie)
                {
                        std::stringstream s;
                        s << "frame" << frames << ".bmp";
                        scr.ScreenShot(s.str().c_str());
-               }               
+               }       
+
+       
 
+               g_profiler.BeginZone("scr.Present()");
+               scr.Present();
+               g_profiler.EndZone();
+               g_profiler.EndFrame();
+               
+               
        }
 }
index 3f1bc41..9b84ec2 100644 (file)
@@ -382,7 +382,14 @@ void BezierRenderer::RenderUsingGPU(unsigned first_obj_id, unsigned last_obj_id)
        if (m_indexes.empty()) return;
 
        unsigned first_index = 0;
-       while (m_indexes.size() > first_index && m_indexes[first_index] < first_obj_id) first_index ++;
+       while (m_indexes.size() > first_index && m_indexes[first_index] < first_obj_id)
+       {
+               unsigned new_index = (first_index + first_obj_id) / 2;
+               if (new_index < m_indexes.size() && m_indexes[new_index] < first_obj_id)
+                       first_index = new_index;
+               else
+                       first_index ++;
+       }
        unsigned last_index = first_index;
        while (m_indexes.size() > last_index && m_indexes[last_index] < last_obj_id) last_index ++;
 
diff --git a/src/profiler.cpp b/src/profiler.cpp
new file mode 100644 (file)
index 0000000..f718637
--- /dev/null
@@ -0,0 +1,41 @@
+#include "profiler.h"
+#include "log.h"
+
+#include "SDL.h" 
+
+using namespace IPDF;
+
+Profiler IPDF::g_profiler;
+
+void Profiler::BeginZone(std::string name)
+{
+       if (!m_zones.count(name))
+               m_zones[name] = ProfileZone{0,0,0,0,0,0};
+       m_zones[name].tics_begin = SDL_GetPerformanceCounter();
+       m_zone_stack.push(name);
+}
+
+void Profiler::EndZone()
+{
+       std::string name = m_zone_stack.top();
+       m_zone_stack.pop();
+       m_zones[name].tics_end = SDL_GetPerformanceCounter();
+       m_zones[name].tics_frame += m_zones[name].tics_end - m_zones[name].tics_begin;
+       m_zones[name].tics_total += m_zones[name].tics_end - m_zones[name].tics_begin;
+       m_zones[name].calls_frame++;
+       m_zones[name].calls_total++;
+}
+
+void Profiler::EndFrame()
+{
+       // Zero all of the frame counts
+       for (auto& it : m_zones)
+       {
+               if (m_enabled)
+               {
+                       printf("perf_zone\t\"%s\"\t%lu %lu\t%lu %lu\n", it.first.c_str(), it.second.tics_frame * 1000 / SDL_GetPerformanceFrequency(), it.second.calls_frame, it.second.tics_total * 1000 / SDL_GetPerformanceFrequency(), it.second.calls_total);
+               }
+               it.second.tics_frame = 0;
+               it.second.calls_frame = 0;
+       }
+}
diff --git a/src/profiler.h b/src/profiler.h
new file mode 100644 (file)
index 0000000..e406536
--- /dev/null
@@ -0,0 +1,49 @@
+#ifndef _PROFILER_H
+#define _PROFILER_H
+
+#include <stdint.h>
+#include <map>
+#include <string>
+#include <stack>
+
+#define PROFILE_SCOPE(name) IPDF::ProfilerScope _localProfZone(name)
+
+namespace IPDF
+{
+       class Profiler
+       {
+       public:
+               Profiler() : m_enabled(false) {}
+               
+               void BeginZone(std::string name);
+               void EndZone();
+
+               void EndFrame();
+
+               void Enable(bool enabled) { m_enabled = enabled; }
+       private:
+               struct ProfileZone
+               {
+                       uint64_t tics_begin;
+                       uint64_t tics_end;
+                       uint64_t tics_frame;
+                       uint64_t tics_total;
+                       uint64_t calls_frame;
+                       uint64_t calls_total;
+               };
+
+               std::map<std::string, ProfileZone> m_zones;
+               std::stack<std::string> m_zone_stack;
+               bool m_enabled;
+       };
+
+       extern Profiler g_profiler;
+       struct ProfilerScope
+       {
+               ProfilerScope(std::string name) { g_profiler.BeginZone(name); }
+               ~ProfilerScope() { g_profiler.EndZone(); }
+       };
+
+}
+
+#endif
index b84bb78..623bd38 100644 (file)
@@ -297,6 +297,15 @@ QuadTreeIndex QuadTree::GetNeighbour(QuadTreeIndex start, int xdir, int ydir, Do
        return -1;
 }
 
+void QuadTree::GetCanonicalCoords(QuadTreeIndex& start, Real& x, Real& y, Document *doc)
+{
+       int _x = (int)x;
+       int _y = (int)y;
+       start = GetNeighbour(start, _x, _y, doc);
+       x -= _x;
+       y -= _y;
+}
+
 }
 
 #endif
index 15fd8a9..9a7b8f9 100644 (file)
@@ -44,6 +44,7 @@ namespace IPDF
                QuadTreeIndex next_overlay;
                // First object which has not yet been propagated to extant children/parent.
                unsigned object_dirty;
+               bool render_dirty;
        };
 
        struct QuadTree
@@ -53,6 +54,7 @@ namespace IPDF
                std::vector<QuadTreeNode> nodes;
 
                QuadTreeIndex GetNeighbour(QuadTreeIndex start, int xdir, int ydir, Document *doc) const;
+               void GetCanonicalCoords(QuadTreeIndex& start, Real& x, Real& y, Document *doc);
 
        };
 
index 0188446..78c5a70 100644 (file)
@@ -38,6 +38,11 @@ namespace IPDF
                        if (y > other.y + other.h) return false;
                        return true;
                }
+
+               inline bool Contains(const TRect& other) const
+               {
+                       return PointIn(other.x, other.y) && PointIn(other.x + other.w, other.y + other.h);
+               }
                
                template <class B> TRect<B> Convert() const {return TRect<B>(B(x), B(y), B(w), B(h));}
                
@@ -49,6 +54,31 @@ namespace IPDF
                        h = T(equ.h);
                        return *this;
                }
+
+               // Clips "other" to "this"
+               inline TRect Clip(const TRect& other) const
+               {
+                       TRect clipped = other;
+                       if (clipped.x < x)
+                       {
+                               clipped.w += clipped.x - x;
+                               clipped.x = x;
+                       }
+                       if (clipped.y < y)
+                       {
+                               clipped.h += clipped.y - y;
+                               clipped.y = 0;
+                       }
+                       if (clipped.x + clipped.w > x + w)
+                       {
+                               clipped.w += ((x + w) - (clipped.x + clipped.w));
+                       }
+                       if (clipped.y + clipped.h > y + h)
+                       {
+                               clipped.h += ((y + h) - (clipped.y + clipped.h));
+                       }
+                       return clipped;
+               }
        };
 
 
index 628a11a..0dbc4bc 100644 (file)
@@ -48,8 +48,9 @@ Screen::Screen(bool visible)
        SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3);
        SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG);
        SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
-
+       //SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
        m_gl_context = SDL_GL_CreateContext(m_window);
+       //SDL_GL_SetSwapInterval(1);
 
        ogl_LoadFunctions();
 
diff --git a/src/svg-tests/fox-vector-box.svg b/src/svg-tests/fox-vector-box.svg
new file mode 100644 (file)
index 0000000..cd3641c
--- /dev/null
@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="348.02771"
+   height="211.20766"
+   id="svg3022"
+   version="1.1"
+   inkscape:version="0.48.3.1 r9886"
+   sodipodi:docname="fox-vector.svg"
+   inkscape:export-filename="/home/sam/Documents/University/2014/ipdf/sam/figures/fox2.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs3024" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1"
+     inkscape:cx="39.698691"
+     inkscape:cy="155.6971"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:window-width="1280"
+     inkscape:window-height="996"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1"
+     fit-margin-top="0"
+     fit-margin-left="0"
+     fit-margin-right="0"
+     fit-margin-bottom="0"
+     showguides="true"
+     inkscape:guide-bbox="true"
+     inkscape:snap-global="false">
+    <sodipodi:guide
+       orientation="0,1"
+       position="-30.501799,-24.762576"
+       id="guide3352" />
+    <inkscape:grid
+       type="xygrid"
+       id="grid3582"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true"
+       originx="-4.9861548px"
+       originy="26.103824px" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata3027">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(724.10153,158.87885)">
+    <g
+       id="g3636"
+       transform="matrix(1.32835,0,0,1.32835,180.62125,44.059858)">
+      <rect
+         y="-152.77502"
+         x="-681.08765"
+         height="159"
+         width="262"
+         id="rect3436"
+         style="fill:#ffffff;fill-opacity:1;stroke:none" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path2991-6"
+         d="m -455.63678,-126.29158 c 0.0464,0.008 0.0977,0.0266 0.13749,0.0433 0.33708,0.14262 0.56903,0.74755 0.56903,1.45023 0,1.10791 0.36662,2.23263 2.23689,6.92643 0.36461,0.91412 0.97992,2.54052 1.37355,3.61473 0.40082,1.09315 1.08506,2.12555 1.55011,2.35931 0.45705,0.22941 1.5021,1.09438 2.3154,1.90477 0.81328,0.81039 1.63594,1.47187 1.84447,1.47187 0.4144,0 3.8655,4.46341 3.8655,5.00001 0,0.18253 0.58866,1.31614 1.31467,2.53248 0.72638,1.216344 1.26761,2.408664 1.19692,2.640704 -0.1085,0.35707 3.54097,3.11689 4.12061,3.11689 0.1067,0 0.73376,0.43593 1.39316,0.97403 0.66005,0.5381 2.22986,1.4331 3.47305,1.96971 1.24322,0.5366 2.51475,1.16505 2.82555,1.40693 0.31098,0.24188 1.15837,0.79668 1.88372,1.23377 1.48499,0.89517 3.63315,3.35029 4.19906,4.78356 0.4044,1.02334 0.35274,1.22613 -0.41201,1.75326 -0.52623,0.36255 -0.66789,0.84132 -0.54942,1.77489 0.17724,1.39637 -0.44702,2.41366 -2.25653,3.70132 -1.44444,1.02782 -4.62549,0.63569 -6.57333,-0.82252 -0.95682,-0.71587 -1.69891,-0.97577 -2.39389,-0.82251 -0.94394,0.20796 -6.56546,-1.14676 -9.24188,-2.22945 -0.89087,-0.36036 -2.04059,-0.37999 -4.37572,-0.0649 -2.93225,0.39598 -6.98014,0.12374 -8.65325,-0.58441 -0.60961,-0.25803 -0.6251,-0.22797 -5.2979,6.90478 -1.27874,1.95228 -2.93189,4.28968 -3.68891,5.19482 -5.88975,7.04119 -8.40157,10.75408 -11.53766,17.16456 -0.73961,1.51157 -1.5472,3.03378 -1.80523,3.37664 -0.57148,0.75937 -2.42552,6.92381 -2.43314,8.09526 -0.005,0.4633 -0.24469,1.59671 -0.52977,2.51084 -0.28502,0.91427 -0.63077,3.61757 -0.76526,6.01733 -0.13414,2.39991 -0.42558,5.65905 -0.6475,7.22947 -0.42217,2.99041 -0.39967,3.12362 1.21654,11.68834 0.43159,2.28406 0.81659,4.36939 0.86337,4.63206 0.0469,0.25933 0.26845,0.73021 0.49055,1.03896 0.22188,0.30919 0.56517,1.11332 0.76524,1.79654 0.30195,1.03526 0.61811,1.29833 1.84447,1.49351 0.81199,0.12969 2.13714,0.7286 2.94328,1.34201 0.80617,0.6134 1.57628,1.12553 1.70709,1.12553 0.13056,0 0.65051,0.83914 1.15771,1.86148 1.06864,2.15938 0.77377,2.88155 -1.23617,2.98702 -0.66266,0.0325 -2.3952,0.25437 -3.84592,0.49784 -8.67176,1.45522 -11.59039,-0.66753 -14.30434,-10.34636 -0.35233,-1.25822 -1.35898,-3.67408 -2.23689,-5.38962 -1.42874,-2.78825 -2.12051,-4.50945 -3.63005,-9.04765 -0.24624,-0.73793 -0.59833,-1.23107 -0.78488,-1.1039 -0.18648,0.12981 -0.23931,0.41072 -0.11774,0.6277 0.12158,0.21444 -0.42527,1.30717 -1.21654,2.42426 -0.79196,1.11759 -2.22932,3.431 -3.19836,5.15153 -0.96846,1.72053 -2.20537,3.4613 -2.74709,3.85283 -1.11712,0.80625 -4.96376,0.92291 -6.20052,0.19481 -0.40921,-0.24162 -1.29459,-0.43429 -1.9818,-0.4329 -1.83739,0 -10.53819,-3.29341 -11.47882,-4.35066 -1.17342,-1.32157 -1.388,-2.50643 -0.72599,-3.91777 0.93737,-1.9998 2.68876,-3.11296 5.08206,-3.22512 1.97439,-0.0948 2.1927,0.009 3.61043,1.51516 1.66082,1.76416 3.93347,2.63444 5.76883,2.22945 1.4507,-0.32002 2.30548,-1.99276 3.41421,-6.70998 1.33146,-5.66627 2.24433,-5.10392 -8.33929,-5.04331 -5.02483,0.0287 -10.32243,-0.0555 -11.77315,-0.17317 -5.9829,-0.48539 -8.23048,-0.72279 -8.53551,-0.93074 -0.17724,-0.12073 -1.50097,-0.29798 -2.94328,-0.38961 -1.61558,-0.10224 -3.19201,-0.484 -4.10098,-0.99567 -0.81197,-0.45656 -1.53714,-0.75026 -1.62861,-0.64935 -0.0918,0.10075 -1.56496,-0.48064 -3.27685,-1.27707 -1.71192,-0.79642 -3.36663,-1.45021 -3.6693,-1.45021 -0.30321,0 -1.21015,-0.35539 -2.00145,-0.80087 l -1.43241,-0.80087 -1.35389,1.36364 c -2.189,2.21179 -5.20433,4.60829 -7.37784,5.88747 -1.11456,0.65578 -2.26192,1.62321 -2.57049,2.14286 -0.33419,0.56279 -0.95327,0.95239 -1.51084,0.95239 -0.51464,0 -1.88508,0.6483 -3.06102,1.45021 -2.67537,1.82276 -6.05457,2.65998 -11.7928,2.92209 -3.8482,0.17455 -4.70423,0.33971 -6.7892,1.40693 -2.22968,1.13705 -5.19974,3.75922 -5.19974,4.56712 0,0.1945 -0.25188,0.57182 -0.54939,0.84415 -0.67235,0.61342 -1.11881,2.71676 -0.72599,3.41993 0.16083,0.28426 0.30965,0.82199 0.3335,1.16883 0.0808,1.16698 1.41225,4.56712 1.78563,4.56712 0.20315,0 0.28482,0.52381 0.17647,1.1472 -0.24444,1.41133 0.50551,3.08959 1.66793,3.72295 0.48416,0.26252 1.98903,0.56701 3.33567,0.64935 1.34666,0.0798 2.94959,0.4228 3.57121,0.75758 1.04153,0.55855 1.12469,0.75221 1.05956,2.59741 -0.039,1.09714 -0.31969,2.42508 -0.6279,2.94373 -0.54175,0.91117 -0.75636,0.93293 -6.41638,0.95239 -3.9772,0.0138 -5.96654,-0.13012 -6.20052,-0.45455 -0.18929,-0.26431 -0.96669,-1.77579 -1.74636,-3.37664 -0.77965,-1.60083 -1.70668,-3.28748 -2.06029,-3.7446 -0.98975,-1.27967 -3.1946,-5.49636 -4.55226,-8.72297 -0.67298,-1.59585 -1.28539,-2.98288 -1.35395,-3.0736 -0.0685,-0.0897 -1.17294,0.4107 -2.4723,1.1039 -1.2988,0.6932 -2.96357,1.56999 -3.68892,1.94806 -0.72537,0.37403 -2.32802,1.70366 -3.57119,2.96538 -1.9809,2.00839 -2.40417,2.26025 -3.39464,2.03464 -0.6219,-0.14161 -1.8447,-0.35521 -2.70776,-0.4762 -1.95433,-0.27428 -3.39315,-1.74844 -2.82558,-2.90044 0.20751,-0.4239 1.32958,-1.77687 2.49195,-3.00867 1.38432,-1.46619 2.05029,-2.45789 1.92299,-2.90044 -0.19443,-0.67824 2.32599,-3.07738 4.63072,-4.39396 0.57092,-0.32914 1.97285,-1.8506 3.10026,-3.37663 1.12815,-1.52753 2.49929,-3.35115 3.04142,-4.06928 0.5418,-0.71813 1.58449,-2.38055 2.33505,-3.67967 0.75051,-1.29912 1.55391,-2.47451 1.76593,-2.61905 0.21212,-0.14461 0.95994,-1.26836 1.6679,-2.48919 0.70788,-1.22132 2.04829,-3.1023 2.98253,-4.1775 1.87414,-2.15799 3.43701,-5.41936 4.1009,-8.5931 0.23854,-1.13854 0.62916,-2.15194 0.8634,-2.25109 0.30577,-0.12966 0.25008,-0.96359 -0.19622,-2.96538 -0.94907,-4.25763 -0.52539,-11.32038 0.68677,-11.32038 0.57863,0 0.77452,1.648 0.35319,2.98702 -0.5993,1.89697 -0.0841,7.98048 0.98111,11.58012 1.22421,4.13789 1.85088,8.06455 1.53052,9.67536 -0.23932,1.20063 -2.3615,6.43616 -2.80596,6.92643 -0.10337,0.11422 -0.99723,2.03538 -1.98185,4.26408 -0.98454,2.22871 -2.35346,4.74931 -3.04131,5.60608 -0.68788,0.85777 -1.88575,2.49435 -2.66858,3.63638 -1.40578,2.05316 -1.41866,2.11783 -1.25583,5.19482 0.15851,2.98723 1.52482,7.41534 2.49197,8.07363 0.19699,0.13466 0.71937,1.04052 1.17732,2.01298 0.45834,0.97248 1.33856,2.57903 1.94256,3.57144 0.60446,0.99244 1.43595,2.51558 1.84445,3.39828 0.4086,0.88271 0.97969,1.7644 1.27546,1.94807 0.58327,0.36355 10.18553,0.0658 10.53693,-0.32469 0.11773,-0.13466 0.31111,-0.78195 0.43166,-1.4502 0.18596,-1.03233 0.0493,-1.32968 -0.90254,-1.94807 -1.38742,-0.89971 -2.75144,-0.93438 -4.23833,-0.0866 -1.03828,0.59013 -1.2376,0.60841 -2.07996,0 -0.50887,-0.36407 -0.82952,-0.83261 -0.72599,-1.01732 0.2429,-0.43388 -1.05069,-3.23528 -2.0211,-4.37232 -0.47203,-0.55356 -0.67967,-1.20467 -0.54934,-1.75326 0.12004,-0.50867 -0.21212,-1.86534 -0.8045,-3.24675 -1.28154,-2.98973 -1.12723,-5.48241 0.47087,-7.27276 0.57084,-0.63834 1.45791,-1.77275 1.96218,-2.51083 0.50425,-0.73808 1.77566,-1.96755 2.82555,-2.70563 2.14829,-1.51123 4.46718,-1.97192 9.59513,-1.92642 5.25245,0.0464 9.43766,-1.50409 12.97007,-4.78357 0.80099,-0.74406 1.99988,-1.46912 2.64895,-1.62338 0.64906,-0.1541 1.92306,-0.7625 2.82557,-1.34199 2.26139,-1.45227 7.56829,-6.11978 8.75136,-7.70566 1.72225,-2.30979 3.32987,-6.56869 4.00287,-10.5628 0.51846,-3.078 0.77713,-3.83118 1.29503,-3.83118 0.86119,0 1.24109,0.72221 0.72599,1.40693 -0.46416,0.61725 -1.33761,3.76591 -1.72672,6.25543 -0.27086,1.73214 -2.17517,6.22327 -2.82554,6.66669 -1.44121,0.98244 1.47824,2.37986 5.2783,2.53248 1.55417,0.0623 3.32236,0.33467 3.94398,0.60606 1.48951,0.65021 5.80728,1.14981 5.94545,0.69264 0.06,-0.19716 0.55522,-0.14963 1.11843,0.0866 1.19349,0.50052 11.92469,0.11048 12.57763,-0.45455 0.23008,-0.19929 1.40943,-0.3317 2.62936,-0.30303 1.2199,0.029 3.32336,-0.24902 4.66997,-0.60606 1.34689,-0.35707 4.90346,-1.21925 7.90765,-1.92641 3.00487,-0.70716 5.76222,-1.46846 6.12201,-1.68832 0.35945,-0.21986 0.91318,-0.38961 1.23624,-0.38961 0.46987,0 0.54403,-0.31169 0.35317,-1.55845 -0.13133,-0.85727 -0.47091,-2.12815 -0.74564,-2.81386 -0.27471,-0.68572 -0.53957,-1.98931 -0.60828,-2.90044 -0.0975,-1.28865 -4.1e-4,-1.69225 0.49055,-1.79655 0.49268,-0.10473 0.6948,0.30104 0.90259,1.86148 0.14671,1.09914 0.43366,2.48045 0.6279,3.05196 0.52213,1.53535 1.08509,4.62504 1.05962,5.75759 -0.0128,0.54459 0.29797,1.58174 0.68672,2.29438 0.43643,0.80042 0.80594,2.52553 0.96148,4.52383 0.13825,1.77987 0.6701,4.58507 1.17732,6.23379 0.50748,1.64821 0.92098,3.40983 0.92224,3.89611 0.001,0.48874 0.25803,1.10078 0.56904,1.38529 0.31082,0.28426 0.56903,1.06165 0.56903,1.70996 0,1.4617 0.51126,2.79243 2.33498,6.03898 0.78483,1.39139 1.43241,2.70402 1.43241,2.92209 0,0.45383 1.33971,3.78107 1.90333,4.71864 0.20572,0.3441 0.48001,0.95779 0.60826,1.38528 0.66395,2.21275 2.30427,5.0933 3.13953,5.5195 0.51782,0.26431 1.40209,0.71222 1.96218,0.99567 1.34217,0.67869 7.41808,0.30009 7.98609,-0.49784 0.21982,-0.30629 0.64833,-0.54111 0.94186,-0.54111 0.29328,0 0.60041,-0.23378 0.68677,-0.51949 0.16596,-0.55037 -0.72783,-0.73391 -1.17729,-0.23811 -0.36462,0.4026 -3.23762,0.46133 -3.23762,0.065 0,-0.47377 1.34279,-1.19048 2.23689,-1.19048 0.9219,0 1.01442,-0.92032 0.17647,-1.68833 -0.49519,-0.45172 -0.80622,-0.42357 -1.84444,0.19484 -0.68593,0.40635 -1.54473,0.68641 -1.92294,0.60606 -0.75679,-0.15959 -1.35107,-2.19138 -1.29505,-4.4156 0.0179,-0.74307 -0.15519,-1.71552 -0.37282,-2.1645 -0.54373,-1.12109 -2.6677,-12.71229 -2.70782,-14.76196 -0.0503,-2.58003 1.33527,-15.07382 1.94253,-17.46759 0.17365,-0.68572 0.58135,-2.27092 0.90264,-3.52815 0.32132,-1.25723 0.77042,-3.02529 1.0007,-3.93941 0.23008,-0.91412 0.56478,-2.03203 0.74561,-2.48919 0.5211,-1.31816 1.60898,-9.34854 1.58941,-11.75328 -0.0128,-1.62029 0.11466,-2.18616 0.51015,-2.18616 0.31521,0 0.52982,0.41888 0.52982,1.01732 0,1.24494 0.53513,1.67321 1.21657,0.97403 0.60443,-0.62024 1.14475,-0.82176 3.00212,-1.06061 1.1488,-0.14761 1.75649,-0.64999 3.57119,-2.92209 1.20505,-1.50907 2.68642,-3.2049 3.27685,-3.78789 1.11777,-1.10348 4.6029,-6.08225 6.29863,-8.98271 1.02688,-1.75693 1.6008,-3.93941 1.03997,-3.93941 -0.2948,0 -1.58554,-1.19549 -3.43384,-3.18183 -0.39169,-0.4209 -0.5133,-0.86235 -0.31398,-1.08225 0.051,-0.0564 0.097,-0.0899 0.15724,-0.12987 -0.30105,-1.89075 0.0998,-6.46817 1.21656,-7.22945 2.26108,-1.5415 5.14926,-0.83835 11.10598,2.68399 3.98651,2.35722 8.30469,4.2458 12.38141,5.41127 1.21608,0.34759 2.70122,0.91294 3.2965,1.25541 1.20377,0.6923 2.41349,0.82029 2.41349,0.25975 0,-0.20047 -0.56255,-0.59063 -1.23617,-0.86581 -0.67364,-0.27528 -1.47478,-0.6772 -1.7856,-0.88745 -0.31095,-0.20994 -0.99285,-0.56995 -1.51087,-0.80086 -0.51785,-0.2309 -1.59742,-0.80117 -2.39387,-1.25542 -0.7965,-0.45419 -1.67098,-0.82252 -1.9622,-0.82252 -0.29123,0 -0.52977,-0.18267 -0.52977,-0.41125 0,-0.59255 1.3767,-0.52074 2.76665,0.15151 0.65297,0.31568 1.8594,0.90623 2.68822,1.29871 0.82877,0.39247 2.46659,1.26313 3.64965,1.92641 1.18243,0.66327 2.35852,1.19048 2.60974,1.19048 0.25085,0 0.77875,0.31436 1.15767,0.69264 0.37118,0.37049 0.81982,0.89903 1.1577,1.38529 0.17134,-0.38244 0.52238,-0.74508 1.02035,-0.95239 0.62144,-0.25895 1.13808,-0.59546 1.13808,-0.73593 0,-0.34311 -3.54552,-2.9885 -5.65113,-4.22079 -0.93288,-0.54558 -2.46235,-1.54004 -3.39459,-2.2078 -0.93288,-0.66776 -1.9771,-1.41179 -2.31537,-1.64503 -3.0288,-2.08856 -4.4678,-3.42227 -4.4934,-4.15586 -0.0441,-1.25563 -3.47351,-7.489204 -4.12065,-7.489204 -0.37231,0 -0.62068,0.56703 -0.74559,1.66667 -0.227,2.0003 -0.86224,2.2576 -2.88441,1.12555 -1.62817,-0.91145 -2.41726,-1.04136 -6.86769,-1.01732 -4.36474,0.0233 -5.95061,0.62369 -8.84947,3.3117 -2.96134,2.745414 -3.32285,3.728894 -3.37494,9.199164 -0.0536,5.58253 0.69311,8.00867 3.35532,10.90913 2.18125,2.37682 2.46696,3.0884 1.33427,3.48486 -0.83349,0.29204 -6.4765,-3.22004 -7.92725,-4.93508 -1.12164,-1.32554 -1.74821,-1.37184 -2.31535,-0.15153 -0.70468,1.51656 -3.08972,4.04763 -3.80668,4.04763 -0.46613,0 -0.78137,-0.50998 -1.05954,-1.75325 -0.67623,-3.02189 -1.68647,-6.54305 -1.88372,-6.53682 -0.22956,0.008 -4.14258,4.14346 -4.84659,5.12989 -0.27799,0.38925 -0.77483,0.65886 -1.11848,0.58442 -0.54201,-0.11741 -0.62786,-0.82539 -0.62786,-5.32469 0,-3.10239 -0.14748,-5.23271 -0.37284,-5.30305 -0.20751,-0.0643 -1.47891,0.73859 -2.82555,1.7749 -4.56342,3.51017 -6.22763,4.57423 -7.92725,5.17317 -0.93222,0.32865 -2.01869,0.8455 -2.43309,1.12555 -0.98954,0.66926 -4.72904,1.38528 -7.14239,1.38528 -1.06606,0 -2.27465,0.27137 -2.70782,0.60607 -0.42863,0.33127 -1.09689,0.59917 -1.49128,0.58441 -0.39433,-0.0149 -3.52753,0.25879 -6.94612,0.60607 -3.41898,0.34713 -6.45876,0.64516 -6.76956,0.67099 -1.05205,0.0873 -14.88649,0.5429 -15.83486,0.51949 -2.51521,-0.0618 -9.19014,-0.89806 -12.02824,-1.49351 -1.97823,-0.41514 -3.31209,-0.52392 -3.53194,-0.28139 -0.21982,0.24254 -0.71924,0.2468 -1.33427,-0.0216 -1.54073,-0.67275 -4.80663,-1.59321 -8.59441,-2.40261 -2.97724,-0.636 -4.27773,-0.69545 -9.20266,-0.36796 -3.19649,0.21245 -6.16709,0.63271 -6.71066,0.93074 -0.53662,0.29423 -1.77673,0.77097 -2.74709,1.06061 -2.00342,0.59784 -5.12786,3.71634 -6.35751,6.34201 -0.47001,1.00489 -1.01032,1.55845 -1.49123,1.55845 -0.41042,0 -0.74566,0.22283 -0.74566,0.47619 0,0.57999 -1.63132,0.16103 -2.53119,-0.64935 -0.35946,-0.32366 -1.39525,-1.26405 -2.29578,-2.07793 -0.89995,-0.81389 -1.79543,-1.47187 -1.9818,-1.47187 -0.18622,0 -2.87639,-2.81438 -5.98468,-6.25543 -5.43823,-6.02054 -7.35252,-7.88325 -10.43885,-10.12991 -0.78678,-0.57251 -2.13503,-1.58731 -2.98252,-2.25109 -4.25663,-3.33298 -10.68388,-5.701674 -17.22803,-6.342014 -2.52583,-0.24711 -5.25401,-0.41586 -6.08281,-0.38961 -1.90026,0.0603 -7.85256,1.57166 -9.18301,2.33767 -0.55275,0.31765 -1.33197,0.583034 -1.74634,0.584424 -0.78549,0.003 -4.62213,1.49624 -5.27835,2.05628 -0.20751,0.17675 -0.83816,0.43837 -1.39312,0.58442 -1.42207,0.37423 -6.91363,4.15575 -8.04496,5.54114 -1.41584,1.74172 -1.8032,2.70597 -3.86557,9.48055 -2.60532,8.54558 -2.70297,9.43483 -1.17729,11.96974 l 1.21654,2.01299 1.09886,-1.92641 c 1.45462,-2.58478 2.20611,-2.40859 2.92368,0.71429 0.65294,2.84261 1.04733,2.95647 3.35535,0.93074 0.91154,-0.79793 1.77704,-1.45022 1.92291,-1.45022 0.65468,0 1.47873,1.54533 1.27545,2.4026 -0.27601,1.16511 0.18802,1.16896 2.0014,0 1.80436,-1.16297 2.18356,-1.49889 3.43383,-2.98702 2.19562,-2.6133 11.81188,-8.54981 13.83344,-8.54981 0.3433,0 2.05467,-0.31297 3.80665,-0.69265 2.94603,-0.63881 3.38815,-0.64302 5.90619,-0.0216 4.54115,1.12059 8.71275,1.94806 9.7717,1.94806 0.55147,0 1.48055,0.23216 2.06029,0.49784 0.58314,0.26363 1.356,0.52678 1.72679,0.60606 0.37102,0.0793 1.35372,0.53179 2.17805,0.99568 0.82422,0.46379 3.14409,1.46742 5.16052,2.22944 2.0164,0.76152 4.51661,1.77695 5.55296,2.25109 1.03571,0.47427 2.89703,1.28089 4.1402,1.79655 2.18772,0.90664 5.42489,3.15154 5.45488,3.78789 0.0292,0.6149 -1.00311,0.29528 -2.21727,-0.69265 -0.68005,-0.55306 -2.95677,-1.70732 -5.06244,-2.55412 -2.10561,-0.84729 -3.99184,-1.67065 -4.19909,-1.83983 -0.20699,-0.16906 -1.82975,-0.81537 -3.59081,-1.45022 -1.761,-0.63485 -4.23089,-1.70651 -5.49409,-2.35932 -1.31232,-0.67823 -2.93625,-1.16883 -3.78701,-1.16883 -0.81909,0 -1.64766,-0.18112 -1.84449,-0.38961 -0.19699,-0.20846 -1.71733,-0.61027 -3.37494,-0.88745 -1.65759,-0.27678 -3.94229,-0.76686 -5.08214,-1.1039 -1.13969,-0.33729 -2.50367,-0.62286 -3.02174,-0.62771 -2.01594,-0.0201 -7.67148,0.90841 -8.04499,1.32035 -0.21648,0.23899 -0.82551,0.43272 -1.35387,0.4329 -0.94912,5e-4 -4.00941,1.552 -7.02467,3.5498 -0.85331,0.56553 -2.87328,2.32191 -4.49334,3.91776 -1.62017,1.59585 -3.52448,3.12381 -4.21874,3.37663 -1.01068,0.36805 -1.20769,0.60411 -1.02035,1.25542 0.19007,0.66128 -0.0652,0.95192 -1.31465,1.49351 -0.84626,0.36655 -1.53049,0.84573 -1.53049,1.06061 0,0.21494 -0.35543,0.88609 -0.78491,1.49351 -0.43312,0.60742 -1.32242,2.01297 -1.98183,3.13854 -0.65937,1.12607 -1.35825,2.34564 -1.56971,2.70564 -0.2134,0.35956 -0.86347,1.50415 -1.45203,2.53247 -0.5883,1.02883 -1.8623,3.18174 -2.82552,4.78357 -0.95684,1.60183 -1.93032,3.28925 -2.15845,3.7446 -0.22623,0.45532 -0.84239,0.88194 -1.37352,0.95238 -1.2426,0.16508 -1.63407,-1.05415 -0.98113,-3.05195 0.37244,-1.13605 0.37813,-1.85369 0.0398,-3.22512 -0.64471,-2.6163 -0.33786,-20.53043 0.41206,-23.78796 1.32527,-5.77044 2.52781,-10.26942 3.06099,-11.40696 0.31341,-0.66876 0.58871,-1.41369 0.58871,-1.64503 0,-1.02444 1.64525,-5.14502 2.5116,-6.27708 0.85334,-1.11809 4.59271,-4.13421 5.1213,-4.13421 0.11594,0 2.03233,-0.98508 4.27755,-2.16451 3.68797,-1.936964 5.42285,-2.596284 9.55589,-3.658024 7.46269,-1.91751 9.21395,-2.04944 14.69673,-1.1039 4.51248,0.77847 8.98854,1.84013 9.968,2.33767 5.9058,3.000694 7.65114,3.971764 8.22153,4.632054 0.37239,0.43138 2.16061,1.99154 3.96363,3.46321 1.80346,1.47163 5.30349,4.94703 7.7899,7.7273 4.83698,5.40799 10.01691,10.15823 11.51804,10.56281 0.74733,0.20148 1.02886,0.006 1.55012,-1.01732 0.35299,-0.6927 0.90343,-1.25542 1.21654,-1.25542 0.31356,0 0.77749,-0.41657 1.02037,-0.93073 0.49848,-1.05476 2.98417,-3.48553 3.41423,-3.33335 0.15365,0.0549 1.08884,-0.39424 2.07992,-0.99568 4.09203,-2.48304 15.7686,-3.24784 21.78029,-1.42857 0.82879,0.25068 2.59734,0.56764 3.944,0.69264 1.34661,0.12489 2.96919,0.38132 3.59078,0.58442 4.66664,1.52448 7.04173,1.83732 15.24623,1.99135 8.37754,0.15708 23.10264,-0.48113 26.882,-1.16884 1.07251,-0.1955 3.89604,-0.66594 6.27897,-1.03896 2.38297,-0.37303 4.62419,-0.85085 4.98398,-1.06061 0.35945,-0.20976 0.99277,-0.38961 1.41276,-0.38961 0.42022,0 1.07264,-0.15376 1.43241,-0.34632 4.60112,-2.4621 6.78038,-3.79545 7.92725,-4.87015 0.75639,-0.70916 1.94859,-1.62651 2.62936,-2.01299 0.68071,-0.386 2.93828,-2.4999 5.02319,-4.71863 2.08489,-2.21824 3.93349,-4.101314 4.12063,-4.177514 0.18698,-0.0758 0.35314,-0.37378 0.35314,-0.671 0,-0.75005 2.82776,-3.52191 4.29721,-4.19914 2.1774,-1.00344 2.19828,-1.30107 0.35319,-5.47621 -1.26584,-2.8648 -1.80587,-4.69626 -2.15842,-7.35933 -0.47191,-3.56523 -0.31478,-4.39396 0.78488,-4.39396 0.26701,0 0.68305,0.38701 0.94186,0.84416 0.25888,0.45731 0.62244,0.82251 0.8045,0.82251 0.9691,0 5.27271,3.43515 7.47597,5.97405 2.39392,2.75883 2.5611,2.88524 3.21794,2.22945 0.69349,-0.69217 2.31002,-1.23027 4.14025,-1.53681 0.0264,-0.88944 0.21033,-2.18845 0.31393,-3.03031 0.44028,-3.5745 1.0018,-5.65949 1.70712,-6.36366 0.3979,-0.39747 0.72599,-0.94012 0.72599,-1.21212 0,-0.69688 1.08981,-1.71389 1.78561,-1.7749 0.0498,-0.004 0.091,-0.008 0.13748,0 z m -0.62788,2.46754 c -0.36617,-0.0425 -0.71347,0.52731 -1.25578,1.45022 -0.61457,1.04628 -0.91862,2.26825 -1.00073,3.9394 -0.0811,1.64763 -0.35858,3.33045 -0.74563,4.39396 2.45534,-0.28589 5.04412,-0.1746 6.22013,0.51948 1.04946,0.61989 0.99429,0.0331 -0.39244,-3.96105 -1.56894,-4.51825 -2.21526,-6.27125 -2.82555,-6.34201 z m -19.81808,4.06927 c -0.25799,0 -0.29621,0.88587 -0.11773,2.59742 0.28314,2.71883 3.18805,9.96693 4.70921,11.75328 0.78144,0.91712 0.98892,2.47214 0.39247,2.8788 -0.44156,0.30122 -1.5305,-0.8852 -1.5305,-1.66667 0,-0.75136 -0.45644,-0.74436 -2.11918,0.0215 -1.97726,0.91123 -2.79856,1.74435 -6.69107,6.774924 l -3.53194,4.58875 -0.27473,4.63205 c -0.15108,2.54838 -0.17878,4.73776 -0.059,4.87015 0.11953,0.13215 0.7991,-0.32761 1.5109,-1.01732 0.71176,-0.68971 1.44452,-1.32335 1.62863,-1.40693 0.18417,-0.0833 0.81997,-0.86436 1.41276,-1.73161 1.44811,-2.11749 2.20196,-1.88864 2.35462,0.69265 0.0654,1.10712 0.28713,2.35128 0.49053,2.77057 0.2034,0.41941 0.37282,1.13324 0.37282,1.58009 0,0.44684 0.3121,1.22143 0.68677,1.73161 l 0.68677,0.93074 1.05959,-1.38529 c 0.58243,-0.76451 1.30901,-1.98771 1.6286,-2.72728 0.32001,-0.73958 0.79758,-1.44754 1.05957,-1.55845 0.26186,-0.11071 1.27366,0.81252 2.23691,2.05629 0.96328,1.24376 1.95461,2.27273 2.21727,2.27273 0.26311,0 0.78267,0.36537 1.1577,0.82252 0.37497,0.4573 1.0352,0.84415 1.452,0.84415 0.64717,0 0.56125,-0.22501 -0.60825,-1.51515 -1.74619,-1.92629 -2.51668,-4.73361 -2.80593,-10.368 -0.1757,-3.42734 -0.0813,-4.66297 0.41206,-6.08227 0.59346,-1.70806 2.12675,-4.069284 2.64895,-4.069284 0.13774,0 1.05954,-0.70737 2.06032,-1.58009 2.63823,-2.30042 6.18971,-3.16215 10.85089,-2.61906 1.90454,0.22192 3.82347,0.6093 4.25793,0.8658 0.43445,0.25653 1.12394,0.35881 1.53052,0.21646 0.53795,-0.1885 0.74564,-0.64413 0.74564,-1.64502 0,-1.09765 -0.33025,-1.6878 -1.60901,-2.92209 -2.03272,-1.9629 -4.05458,-2.97999 -6.84802,-3.46322 -2.37096,-0.41023 -5.65866,-0.21681 -6.69107,0.38961 -0.34909,0.20505 -0.96042,0.36797 -1.35392,0.36797 -0.39369,0 -0.70642,0.28485 -0.70642,0.62771 0,0.34298 0.26061,0.62424 0.58869,0.62771 1.0689,0.0113 1.78027,0.72 1.27541,1.27706 -0.81748,0.90145 -4.3503,-1.42569 -6.98537,-4.61041 -1.67572,-2.02523 -2.98604,-3.18956 -4.51305,-3.96105 -1.1863,-0.59894 -2.25443,-1.25805 -2.37426,-1.47187 -0.11979,-0.21381 -0.39291,-0.38961 -0.60826,-0.38961 z m 2.2761,4.6537 c 0.10158,-0.009 0.22367,-4.1e-4 0.35323,0.0215 0.14774,0.0251 0.30684,0.0828 0.49052,0.15151 0.48678,0.18227 1.00924,0.30248 1.15768,0.25975 0.14902,-0.0424 0.75751,0.56621 1.3343,1.36364 0.57668,0.79742 1.23957,1.45021 1.49127,1.45022 0.25162,0 0.62565,0.32689 0.82413,0.73593 0.37043,0.76451 1.34312,1.4394 3.15912,2.16451 1.32586,0.52962 1.44844,1.87811 0.13748,1.51516 -0.90769,-0.25134 -1.07434,-0.002 -1.88371,2.77057 -0.34848,1.19264 -1.33533,1.31839 -2.31538,0.30303 -0.49455,-0.51267 -1.52067,-2.36761 -2.29578,-4.11257 -0.77513,-1.74496 -1.84185,-3.79193 -2.35459,-4.54547 -0.81972,-1.20434 -0.80938,-2.0134 -0.098,-2.07792 z m 1.88369,2.42425 c -0.19904,0.0437 -0.18596,0.36796 0.17647,0.93074 0.33101,0.51416 0.91875,1.68329 1.31468,2.59741 0.39626,0.91412 0.98708,2.03205 1.31465,2.48919 0.58143,0.81139 0.59662,0.81257 0.60829,-0.30303 0.005,-0.62887 0.18519,-1.14719 0.39244,-1.14719 0.6969,0 0.38308,-0.76165 -0.80451,-1.94806 -0.64904,-0.64832 -1.49633,-1.50477 -1.88371,-1.90477 -0.51292,-0.52971 -0.91921,-0.75797 -1.11846,-0.71429 z m 17.65972,9.41562 c 0.23033,0.0395 0.51856,0.1609 0.84374,0.34632 0.59995,0.34222 1.55869,0.62632 2.13881,0.6277 0.91282,0.002 3.0091,0.47494 4.55226,1.03897 0.25901,0.0948 0.47093,0.45084 0.47093,0.80087 0,0.701304 -1.69234,0.916534 -2.06029,0.25974 -0.11953,-0.21346 -1.18666,-0.61742 -2.37427,-0.88745 -2.5258,-0.5745 -4.35732,-1.51539 -4.04209,-2.07793 0.0662,-0.11822 0.2406,-0.14779 0.47091,-0.10821 z m 0.29433,2.92209 c 0.50853,-0.009 1.26673,0.13502 2.59011,0.389614 2.02671,0.38998 3.2748,0.85995 3.86549,1.47186 0.84226,0.87273 1.18178,2.58265 0.58866,2.98703 -0.15903,0.10849 -1.62204,0.0267 -3.23761,-0.17319 -4.48399,-0.55456 -6.68478,-2.47853 -4.86622,-4.24244 0.2919,-0.283034 0.55104,-0.424054 1.05957,-0.432904 z m 0.68677,1.450224 c -0.0485,-0.0174 -0.10132,-0.0205 -0.15723,0 -0.22264,0.0818 -0.41204,0.32398 -0.41204,0.54112 0,0.217 0.18929,0.45922 0.41204,0.54113 0.22264,0.0823 0.39244,-0.16016 0.39244,-0.54113 0,-0.28561 -0.0903,-0.48901 -0.23547,-0.54112 z m 2.492,0.36796 c -0.1103,-0.007 -0.26089,0.0167 -0.43169,0.0433 -1.07026,0.16706 -1.19179,1.38529 -0.13748,1.38529 0.42579,0 0.80738,-0.34619 0.88297,-0.77923 0.0772,-0.44265 0.0154,-0.62736 -0.31393,-0.64935 z m 10.71353,2.46754 c 0.29005,-0.0103 0.5416,0.0779 0.72602,0.28139 0.41245,0.45432 0.11465,0.97637 -0.9811,1.70996 -0.79066,0.52907 -1.12198,0.55885 -1.47166,0.17316 -0.34963,-0.38549 -0.29989,-0.68919 0.23547,-1.34199 0.42991,-0.5238 1.00785,-0.80528 1.49127,-0.82252 z m -17.52233,1.38529 c -0.18596,0.005 -0.34635,0.0264 -0.47093,0.0649 -2.52609,0.78147 -2.88441,1.09671 -2.88441,2.53248 0,0.84238 -0.18725,2.49351 -0.41212,3.5065 0.70311,0.0274 1.58828,0.61259 2.17807,1.58009 0.87792,1.44076 3.80901,3.74587 5.18017,4.06928 2.16263,0.50996 4.76654,0.47197 6.8088,-0.0866 2.12888,-0.58207 2.42865,-0.55185 4.67005,0.2381 1.31621,0.46346 2.62981,0.82251 2.92363,0.82251 0.29418,0 1.24165,0.38702 2.09953,0.84416 1.72159,0.91752 2.1584,1.00511 2.1584,0.45455 0,-0.20248 -0.5893,-0.68098 -1.31465,-1.06061 -1.36161,-0.71265 -1.74703,-1.47187 -0.74561,-1.47187 0.31352,0 0.85673,0.1606 1.21652,0.36797 2.30857,1.33004 6.38121,2.9857 7.45635,3.03031 1.88315,0.0783 3.75571,-2.61192 2.25651,-3.24676 -0.12492,-0.0528 -0.22957,-0.11435 -0.31396,-0.19481 -0.98828,-0.0785 -7.13352,-2.13331 -11.53766,-3.46321 -1.95756,-0.59104 -3.76702,-1.06061 -4.02252,-1.06061 -0.57406,0 -5.52915,-2.50254 -5.78845,-2.92209 -0.30643,-0.49571 -3.14106,-2.07793 -3.72813,-2.07793 -0.29739,0 -0.81084,-0.25108 -1.13808,-0.56277 -0.71048,-0.67462 -3.28986,-1.39968 -4.59151,-1.36364 z m 33.14135,9.87016 c -0.5891,0.0226 -1.07919,0.41037 -1.07919,0.97403 0,0.6642 0.65223,0.81946 1.66785,0.38961 0.75231,-0.31867 0.75662,-0.94338 0.0205,-1.25541 -0.19981,-0.0846 -0.41188,-0.11578 -0.60828,-0.10825 z m 0.23547,2.85715 c -0.31083,0 -0.56902,0.2541 -0.56902,0.56278 0,0.30869 -0.49683,0.98952 -1.11845,1.51515 -0.62147,0.52564 -1.13811,1.10998 -1.13811,1.29871 0,0.56603 1.96503,-0.4186 2.70787,-1.36364 0.83698,-1.06424 0.88766,-2.013 0.11773,-2.013 z m -251.10136,12.05632 c -0.36159,0 -0.89025,15.6254 -0.54939,16.23382 0.30343,0.54159 0.63411,4.0045 0.60828,6.3853 -0.0179,1.79833 -0.0416,1.79055 2.02105,-1.42857 0.80812,-1.25723 1.55706,-2.3749 1.66789,-2.48919 0.10979,-0.11471 0.45467,-0.7645 0.76524,-1.45022 0.31672,-0.68572 0.87799,-1.62078 1.25578,-2.07793 0.38139,-0.45731 1.48951,-2.22536 2.45273,-3.93941 0.96325,-1.71454 2.30373,-3.9245 2.98253,-4.91343 1.23878,-1.80979 1.61262,-3.92947 0.80448,-4.48054 -0.23265,-0.15609 -1.39427,0.50618 -2.60966,1.45023 -2.4567,1.91452 -2.62707,1.83414 -3.1396,-1.29871 -0.13851,-0.84929 -0.43946,-1.66301 -0.66707,-1.81819 -0.49779,-0.33912 -1.81311,1.39992 -1.82485,2.42425 -0.0128,1.3061 -1.36665,0.79328 -2.45271,-0.93074 -0.57537,-0.91412 -1.16419,-1.66667 -1.3147,-1.66667 z m 202.51756,6.36366 c -0.39668,-0.0558 -1.08068,0.51618 -2.55084,2.07793 -0.38467,0.40835 -0.85996,0.63395 -1.05959,0.49784 -0.21059,-0.14313 -0.3632,0.498 -0.3728,1.53679 -0.0103,0.98494 -0.27047,2.52745 -0.56904,3.44158 -0.6537,2.00158 -0.63334,1.88312 -0.15723,1.88312 0.21366,0 0.49186,-0.33593 0.62791,-0.73593 0.13594,-0.39996 0.77688,-1.5691 1.41278,-2.59741 0.63614,-1.02883 1.44737,-2.56266 1.80523,-3.41993 0.35815,-0.85727 0.80976,-1.55845 1.02032,-1.55845 0.50364,0 0.50948,-0.71328 0,-1.06061 -0.0467,-0.032 -0.10029,-0.057 -0.15697,-0.0649 z m -123.36285,13.59312 c -0.18775,0 -0.25888,0.34925 -0.15723,0.77922 0.168,0.70831 -0.18314,1.71886 -2.59009,7.42427 -0.40939,0.97147 -0.86375,1.77351 -1.00067,1.77489 -0.13722,10e-4 -0.6593,0.70417 -1.17735,1.55845 -1.01172,1.66946 -1.33601,2.0932 -3.88516,5.28141 -0.91347,1.14302 -1.87253,2.50966 -2.11911,3.03031 -0.24649,0.52066 -0.61005,0.84684 -0.80447,0.71428 -0.19443,-0.13253 -0.24111,0.0351 -0.11774,0.38961 0.44244,1.27185 -6.53616,10.06747 -9.22228,11.62342 -1.14377,0.66178 -6.9274,8.15445 -6.73036,8.72297 0.1739,0.50369 2.14019,1.07048 3.70854,1.08225 0.534,0.005 3.34149,-2.20932 5.33717,-4.19914 0.373,-0.37403 1.81033,-1.18314 3.19834,-1.79654 4.07241,-1.80032 4.40352,-2.04161 4.53267,-3.26841 0.0677,-0.64004 0.34029,-1.12555 0.64753,-1.12555 0.2971,0 0.54946,-0.36007 0.54946,-0.80086 0,-0.44385 0.22111,-1.03994 0.49048,-1.342 0.2696,-0.29922 1.22729,-1.68053 2.13885,-3.05196 0.91149,-1.37144 1.89336,-2.7548 2.17802,-3.0736 0.28446,-0.31918 1.30096,-2.37183 2.25649,-4.56712 0.95553,-2.19544 2.03905,-4.4693 2.39389,-5.0433 0.35489,-0.57351 0.99667,-2.23712 1.43238,-3.70131 0.43561,-1.4642 0.75559,-2.76677 0.72599,-2.90045 -0.21853,-0.98529 -1.38742,-6.9596 -1.41279,-7.20781 -0.0154,-0.17143 -0.18519,-0.30303 -0.37279,-0.30303 z m 94.89147,9.54548 c -0.69275,-0.039 -2.10362,0.15565 -2.53122,0.41126 -0.3601,0.21494 -2.01168,0.66165 -3.66927,1.01732 -1.65762,0.35557 -4.45913,1.04317 -6.22014,1.51516 -4.88892,1.31009 -6.75132,1.57951 -14.50059,2.07793 -6.54653,0.42088 -8.82638,0.38707 -14.89305,-0.25975 -2.96345,-0.31617 -1.91093,0.42228 1.51092,1.06061 1.5535,0.28975 2.99117,0.65168 3.19837,0.82252 0.36838,0.30371 3.77915,0.74024 8.30007,1.06061 1.24319,0.088 3.48949,0.32311 5.00357,0.51948 6.74609,0.87522 18.11866,-0.32063 23.35005,-2.46754 2.17479,-0.89218 2.27042,-1.18796 1.39314,-3.87447 -0.29858,-0.91463 -0.54626,-1.71776 -0.54941,-1.7749 -0.005,-0.0708 -0.1616,-0.0952 -0.39244,-0.10823 z m -44.40433,4.19915 c -0.0749,-0.009 -0.1557,-0.004 -0.25496,0 -0.43889,0.02 -0.53598,0.12707 -0.23547,0.25974 0.27199,0.1201 0.60085,0.0948 0.72602,-0.0433 0.0939,-0.10357 -0.0103,-0.18996 -0.23546,-0.21645 z m 45.52281,2.46754 c -0.37354,0 -0.76947,0.16532 -0.88302,0.36797 -0.11337,0.20279 -0.80322,0.4988 -1.53049,0.64935 -0.72748,0.15062 -1.3343,0.52084 -1.3343,0.82252 0,0.30171 -0.29454,0.99171 -0.66715,1.5368 -0.373,0.54508 -0.91003,2.01117 -1.1773,3.2684 -0.66525,3.12732 -2.24515,8.81569 -2.64895,9.52385 -0.25598,0.44917 -0.8785,0.51827 -2.72744,0.30303 -4.90166,-0.57351 -4.92944,-0.58564 -6.41638,-2.38096 -1.38734,-1.67599 -1.47053,-1.70516 -3.21796,-1.42858 -0.98654,0.15459 -1.9975,0.58141 -2.25654,0.95238 -0.93221,1.33153 -0.31536,4.24244 0.90259,4.24244 0.32973,0 1.63563,0.56721 2.90406,1.25542 2.54489,1.37641 10.52434,3.17087 12.12632,2.72728 1.31817,-0.36405 3.84859,-2.99014 4.74851,-4.93508 0.41894,-0.90764 1.11289,-2.05033 1.5305,-2.53248 0.41762,-0.47876 1.14736,-1.55311 1.62862,-2.38096 1.16199,-1.99796 1.40484,-3.9526 0.72605,-5.9524 -0.30547,-0.90066 -0.67523,-2.61784 -0.80453,-3.83118 -0.18699,-1.75311 -0.36279,-2.2078 -0.90259,-2.2078 z"
+         style="fill:#000000" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3056"
+         d="m -673.53525,-48.436906 c 0.73079,-1.10993 1.83324,-2.88032 2.44996,-3.93421 0.61665,-1.05389 2.62469,-4.37766 4.46221,-7.38615 2.93392,-4.80354 3.3537,-5.61626 3.44553,-6.67066 0.0662,-0.75882 0.0103,-1.26579 -0.15518,-1.3776 -0.14416,-0.0982 -1.19521,0.44754 -2.36252,1.22665 -1.15668,0.77196 -2.28432,1.36505 -2.50588,1.31798 -0.2921,-0.0621 -0.53698,-0.6184 -0.89107,-2.02414 -0.2685,-1.06621 -0.58097,-2.0409 -0.69437,-2.16598 -0.29402,-0.32439 -1.16524,0.77613 -1.5201,1.92019 -0.4668,1.50521 -1.05003,1.41478 -2.59319,-0.40209 -0.71034,-0.83639 -1.34964,-1.41711 -1.42058,-1.2905 -0.0711,0.12662 -0.24906,3.41729 -0.39611,7.3126 -0.21418,5.67924 -0.21084,7.33957 0.0154,8.38055 0.15646,0.71398 0.33906,2.60614 0.40557,4.20478 0.0664,1.59864 0.19032,2.90662 0.27507,2.90662 0.0849,0 0.75218,-0.90811 1.48291,-2.01804 z"
+         style="fill:#ffffff;fill-opacity:1" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3058"
+         d="m -475.53407,-57.612466 c 0.96246,-1.80273 1.94356,-3.63947 2.18018,-4.08165 0.23649,-0.44218 0.52287,-0.80396 0.63616,-0.80396 0.11337,0 0.20597,-0.16697 0.20597,-0.37106 0,-0.67997 -0.7057,-0.38354 -2.06114,0.86581 -0.73802,0.68027 -1.47714,1.23686 -1.64248,1.23686 -0.19904,0 -0.35099,0.47996 -0.44982,1.42239 -0.1403,1.33807 -0.62724,3.78729 -0.92049,4.63028 -0.0726,0.20846 -0.0344,0.37901 0.0849,0.37901 0.11927,0 1.00421,-1.47495 1.9667,-3.27768 z"
+         style="fill:#ffffff;fill-opacity:1" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3060"
+         d="m -513.21317,-32.346356 c 6.43298,-0.6637 12.87679,-2.45259 13.2277,-3.67219 0.0677,-0.23657 -0.12979,-1.25411 -0.43959,-2.26122 -0.30984,-1.00711 -0.56406,-1.85892 -0.56491,-1.89294 -0.005,-0.21364 -1.88104,-2.1e-4 -2.70868,0.30822 -1.51357,0.56405 -12.56876,3.23995 -15.23292,3.6871 -5.71868,0.95982 -16.38269,1.40022 -21.7531,0.89834 -3.56688,-0.33333 -4.49883,-0.24039 -2.31548,0.2309 0.71894,0.15521 2.3163,0.55978 3.54969,0.89906 3.22895,0.88822 15.07984,2.07976 20.29466,2.0405 2.1584,-0.0162 4.83259,-0.12325 5.94263,-0.23777 z"
+         style="fill:#ffffff;fill-opacity:1" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3062"
+         d="m -453.18418,-98.023856 c 0.0677,-0.10693 0.12338,-0.25557 0.12338,-0.33037 0,-0.16698 -0.21931,-0.52476 -0.32162,-0.52476 -0.14646,0 -0.39193,0.35321 -0.39193,0.56352 0,0.12166 0.0759,0.27232 0.17621,0.34984 0.23034,0.17796 0.26725,0.17275 0.41391,-0.0582 z"
+         style="fill:#ffffff;fill-opacity:1" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3070"
+         d="m -586.69418,1.194744 c -0.44877,-0.80095 -1.82893,-1.1016 -3.0671,-0.66809 -2.91029,1.01893 -4.93123,-1.77368 -7.13855,-9.86412 l -1.77909,-6.52109 4.1055,-4.51297 c 3.33315,-3.66397 5.49338,-4.6914 11.48307,-5.46143 14.18036,-1.82303 28.47295,-12.80116 31.33215,-24.06626 1.13375,-4.4668 2.01838,-5.93419 2.9548,-4.9012 0.93645,1.03298 0.54934,3.52998 -1.293,8.34022 l -2.62959,6.86582 5.69817,0.94259 c 9.91875,1.64077 25.24008,1.02442 35.18107,-1.41528 l 9.60759,-2.35789 -0.80771,-4.74935 c -0.48014,-2.82333 -0.29402,-4.74934 0.45887,-4.74934 0.69663,0 2.52735,6.13965 4.06818,13.64367 3.63516,17.70316 11.98992,37.88034 16.16359,39.03587 3.35724,0.92951 5.54244,-0.49221 3.20542,-2.0855 -0.83074,-0.56636 -2.415,-5.72721 -3.52058,-11.46855 -2.15199,-11.1754 -1.75716,-21.80884 1.27092,-34.22776 0.93832,-3.84821 2.08142,-9.60269 2.54022,-12.78772 0.70226,-4.87501 1.2287,-5.67717 3.32831,-5.0715 1.77122,0.51094 3.97137,-0.99357 7.59083,-5.19072 l 5.09673,-5.91019 -4.64178,-2.74435 c -4.20137,-2.48399 -4.84726,-2.53921 -6.80772,-0.58206 -2.56136,2.55698 -5.17586,0.57649 -5.17586,-3.92068 0,-2.67017 -0.0985,-2.66079 -2.93602,0.27986 -3.98564,4.1304 -4.67528,3.85675 -4.67528,-1.85509 0,-2.69375 -0.29677,-4.89773 -0.65951,-4.89773 -0.36271,0 -3.03187,1.65204 -5.93144,3.6712 -9.12931,6.3573 -41.05597,9.46834 -61.27652,5.97098 -21.97674,-3.80111 -30.49556,-2.86703 -34.44169,3.77653 -3.33524,5.61502 -6.86449,4.22788 -17.98644,-7.06948 -16.55308,-16.814104 -26.83477,-20.965314 -41.86398,-16.902454 -16.22471,4.386034 -22.29197,10.689084 -24.01541,24.948684 -0.66184,5.47551 -0.55559,5.75212 1.49225,3.88607 1.91594,-1.74582 2.35221,-1.74582 3.33016,0 1.93479,3.45426 7.89491,2.47565 15.37032,-2.52372 3.94621,-2.63912 9.34769,-5.33897 12.0033,-5.99968 8.26784,-2.05697 28.42355,3.59491 41.39505,11.60766 4.41117,2.72485 4.75762,3.4031 4.76416,9.32775 0.005,3.51409 0.60151,8.75046 1.32812,11.63639 1.50648,5.98413 -0.68044,12.92006 -7.54336,23.92338 -4.39749,7.05064 -4.14576,10.17202 1.6351,20.27379 3.01792,5.27359 3.82624,5.83001 8.46949,5.83001 3.23284,0 4.8311,-0.53912 4.31726,-1.45627 z"
+         style="fill:#ff7f2a;fill-opacity:1" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3072"
+         d="m -617.22642,-10.138076 c 1.61796,-1.31753 4.40224,-3.13808 6.18728,-4.04567 1.94387,-0.98839 3.41295,-2.07497 3.66312,-2.70942 0.60761,-1.54062 1.26224,-2.62285 3.92969,-6.49627 3.03603,-4.40865 8.60695,-16.55844 8.58022,-18.71288 -0.0103,-0.86727 -0.27479,-2.91266 -0.58669,-4.54533 -0.51961,-2.72025 -0.59076,-2.84093 -0.85118,-1.4433 -0.59015,3.16735 -3.18526,8.06462 -7.18798,13.56456 -2.27744,3.12926 -4.43764,6.35747 -4.80058,7.1738 -0.36294,0.81633 -3.60822,4.71244 -7.21176,8.65803 -6.04474,6.6185 -8.43219,9.63861 -7.99497,10.11359 0.0952,0.10332 0.88348,0.33419 1.75198,0.5131 1.40243,0.28889 1.90816,0.0573 4.52087,-2.07021 l 0,0 z"
+         style="fill:#ff7f2a;fill-opacity:1" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3074"
+         d="m -505.07084,-13.818336 c 2.50608,-2.52881 6.65182,-9.60847 6.65182,-11.35929 0,-1.18142 -1.24314,-7.752 -1.55714,-8.23026 -0.0428,-0.0651 -0.90033,0.23808 -1.9058,0.67376 -2.13709,0.92603 -2.59085,1.86199 -4.64719,9.5856 -0.76052,2.85647 -1.59893,5.48092 -1.86317,5.83214 -0.46234,0.61449 -1.53755,0.58232 -6.03723,-0.18065 -0.78886,-0.13374 -2.24038,-0.9861 -3.22561,-1.8941 -1.3788,-1.27075 -2.0813,-1.59319 -3.0507,-1.40025 -1.78915,0.35607 -2.38068,1.01942 -2.38068,2.66975 0,1.23506 0.28625,1.57658 2.00086,2.38733 3.63882,1.72061 8.00338,3.00225 11.20831,3.29128 3.11098,0.28056 3.18719,0.25876 4.80653,-1.3753 l 0,0 z"
+         style="fill:#ff7f2a;fill-opacity:1" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3076"
+         d="m -460.38816,-79.265786 c 2.17541,-3.71578 2.17415,-3.92666 -0.0372,-6.17515 -1.94933,-1.98211 -1.96364,-2.02102 -1.78394,-4.85543 0.4747,-7.48748 2.76804,-7.90604 13.60859,-2.48373 6.29252,3.14745 13.72025,6.13943 14.12713,5.6906 0.11081,-0.12227 -1.26427,-0.95834 -3.0558,-1.85792 -3.85259,-1.93449 -3.76413,-1.86617 -3.20938,-2.47811 0.27328,-0.30143 0.93345,-0.3134 1.76409,-0.032 1.77329,0.60082 9.75641,4.64013 11.12372,5.62838 0.89875,0.64961 1.22291,0.67549 1.87482,0.14965 0.70457,-0.56832 0.37485,-0.91977 -3.10847,-3.31287 -2.14313,-1.47241 -5.18753,-3.59349 -6.76532,-4.71352 -2.13908,-1.51851 -2.92884,-1.86344 -3.10528,-1.35627 -0.38052,1.09385 -2.42762,1.94357 -3.04406,1.26356 -0.61136,-0.67439 0.70575,-2.57095 1.78548,-2.57095 0.50658,0 0.54064,-0.15615 0.14774,-0.67824 -0.28066,-0.37304 -1.11292,-2.00852 -1.84942,-3.634404 -0.73651,-1.62589 -1.71928,-3.33564 -2.18387,-3.79946 -0.80646,-0.80507 -0.86635,-0.7749 -1.32168,0.66593 -0.55068,1.74256 -1.37652,1.89248 -3.93334,0.71404 -2.30378,-1.06184 -9.60403,-0.77462 -11.7211,0.46113 -2.07119,1.209 -4.53616,3.703434 -5.32722,5.390944 -0.81471,1.73795 -0.93665,8.63577 -0.20546,11.63064 0.27846,1.14077 1.34626,3.06715 2.45227,4.42417 1.07747,1.32197 2.04475,2.84551 2.1495,3.38564 0.15518,0.79944 0.45595,0.52859 1.61824,-1.45666 l 0,0 z m 7.30987,-16.93483 c -1.69637,-0.60436 -2.37106,-1.11841 -2.56049,-1.95086 -0.38223,-1.68007 0.12209,-2.176304 2.20839,-2.173244 3.91323,0.006 7.03742,1.761624 7.03742,3.955204 0,0.85446 -0.299,0.98949 -2.191,0.98949 -1.20505,0 -3.22751,-0.36926 -4.49432,-0.82059 l 0,0 z m 2.20031,-4.606394 c -5.47555,-1.93929 -5.56915,-2.97414 -0.15903,-1.75932 4.71088,1.05782 5.09255,1.20648 5.09255,1.98359 0,0.728494 -0.85722,1.266524 -1.56974,0.985264 -0.24675,-0.0973 -1.76039,-0.641654 -3.36378,-1.209534 z"
+         style="fill:#ff7f2a;fill-opacity:1" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3078"
+         d="m -466.22765,-80.908736 c -1.8377,-2.31203 -2.30817,-4.26638 -2.47133,-10.26595 -0.14902,-5.47781 -0.0818,-6.08663 0.86888,-7.87257 1.18112,-2.218844 5.06575,-5.352264 7.73391,-6.238274 2.16761,-0.7198 7.84723,-0.71638 10.77135,0.007 3.22671,0.79769 3.83356,-0.22213 1.75419,-2.94809 -2.52358,-3.30836 -8.13892,-5.03286 -12.83795,-3.94261 -2.67086,0.61967 -3.22928,1.14959 -1.68188,1.59597 1.03633,0.29896 1.18958,1.24808 0.2647,1.63958 -0.96201,0.40723 -3.19287,-1.06596 -6.13985,-4.05457 -2.35121,-2.38439 -7.11103,-6.13903 -7.78259,-6.13903 -1.14413,0 1.4706,8.54461 3.78495,12.36863 1.44349,2.3851 1.77037,4.4527 0.70399,4.4527 -0.35607,0 -0.96418,-0.49899 -1.35144,-1.10887 l -0.70408,-1.10887 -1.90021,1.11627 c -1.62117,0.95233 -8.31234,8.603494 -9.43087,10.783934 -0.19494,0.38021 -0.29597,2.53161 -0.22418,4.78089 l 0.13056,4.08959 2.56602,-2.65578 c 1.425,-1.47485 2.83543,-2.54176 3.17182,-2.39935 0.34412,0.14566 0.84963,1.76163 1.17038,3.74161 0.477,2.94425 1.48124,5.19191 1.99996,4.47618 0.0772,-0.10682 0.7886,-1.25171 1.58043,-2.54423 0.79186,-1.29252 1.65533,-2.35004 1.91888,-2.35004 0.2635,0 1.67811,1.2245 3.1435,2.7211 2.48834,2.5413 4.51636,3.81196 2.96111,1.85529 z m -2.98722,-23.319744 c -0.78755,-0.86877 -4.55988,-8.13562 -5.23034,-10.07554 -0.2465,-0.71309 -0.0459,-0.86581 1.13743,-0.86581 1.08843,0 2.10567,0.63528 4.19661,2.62085 1.51798,1.44146 3.31494,2.88382 3.9933,3.20523 1.40979,0.66798 1.66231,2.08984 0.37118,2.08984 -0.58463,0 -1.02594,0.54721 -1.37075,1.69966 -0.46056,1.53944 -0.95065,2.10719 -1.91567,2.21925 -0.18494,0.0216 -0.71678,-0.38059 -1.18176,-0.89348 z"
+         style="fill:#ff0000;fill-opacity:1" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3085"
+         d="m -452.40127,-113.53343 c 0.0895,-0.25699 -0.62711,-2.61595 -1.71917,-5.66004 -1.30886,-3.64835 -1.73218,-4.53002 -2.17507,-4.53002 -0.24675,0 -1.00786,1.0101 -1.39248,1.84797 -0.42532,0.92658 -0.62005,1.82967 -0.78849,3.65694 -0.15724,1.70536 -0.38901,3.17281 -0.59621,3.77444 l -0.10542,0.30633 2.31307,0.005 c 2.37283,0.005 2.87585,0.0812 3.96942,0.6031 0.3926,0.18737 0.42812,0.18714 0.49443,-0.003 l 0,0 z"
+         style="fill:#ff0000;fill-opacity:1" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3087"
+         d="m -673.88786,-48.101796 c 1.72703,-2.53749 9.62702,-15.51742 10.22396,-16.79827 0.56725,-1.21721 0.69926,-2.90353 0.22726,-2.90353 -0.1616,0 -1.15303,0.56421 -2.20247,1.25381 -1.04938,0.68959 -2.15955,1.20036 -2.46707,1.13503 -0.35265,-0.0749 -0.71036,-0.69942 -0.96873,-1.6911 -0.68331,-2.62305 -0.66354,-2.59084 -1.25579,-2.04903 -0.28664,0.26218 -0.71496,0.98833 -0.95189,1.61367 -0.237,0.62533 -0.62662,1.13697 -0.8658,1.13697 -0.23932,0 -1.01145,-0.65517 -1.71602,-1.45594 l -1.28108,-1.45594 -0.21417,1.25966 c -0.33512,1.97075 -0.32268,14.76281 0.0179,18.38039 l 0.30688,3.25944 1.1469,-1.68516 z"
+         style="fill:#ffccaa;fill-opacity:1" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3089"
+         d="m -512.74306,-32.499646 c 6.8948,-0.80461 12.34147,-2.36578 12.55678,-3.59918 0.17442,-0.99873 -0.62065,-3.75635 -1.14724,-3.97924 -0.25698,-0.10879 -2.33979,0.29404 -4.62849,0.89518 -12.96581,3.40552 -17.50225,4.03499 -29.29936,4.06552 -4.23254,0.011 -7.58629,0.0554 -7.45273,0.0988 6.33346,2.05648 22.37836,3.40499 29.97104,2.51895 l 0,0 z"
+         style="fill:#ffccaa;fill-opacity:1" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3091"
+         d="m -475.13522,-58.455676 c 1.08309,-2.04411 2.10957,-3.81221 2.28106,-3.92911 0.46482,-0.3169 0.37687,-0.97334 -0.10311,-0.77013 -0.22828,0.0966 -1.1557,0.78251 -2.06103,1.52424 -1.34405,1.10111 -1.64654,1.54118 -1.64823,2.3981 -10e-4,0.57723 -0.15313,1.64925 -0.3376,2.38226 -0.64527,2.56331 -0.0849,2.08181 1.86899,-1.60536 l 0,0 z"
+         style="fill:#ffccaa;fill-opacity:1" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3093"
+         d="m -427.11245,-80.739666 c 1.31131,-1.14029 1.14469,-2.00274 -0.4757,-2.46192 -0.74133,-0.21007 -3.0604,-0.91357 -5.1535,-1.56333 -2.09312,-0.64976 -5.3011,-1.59782 -7.12888,-2.10679 -3.32862,-0.92691 -7.13696,-2.64688 -8.86344,-4.00301 -1.20628,-0.94751 -5.191,-2.80082 -7.00982,-3.26028 -0.79019,-0.1996 -1.95735,-0.25519 -2.5937,-0.1235 -1.77568,0.36746 -2.3865,1.1585 -2.59893,3.36563 l -0.18519,1.92411 2.36095,2.27394 c 3.09103,2.9771 4.77957,3.83789 7.53987,3.84371 1.17414,0.002 3.106,-0.17921 4.29307,-0.40377 1.94936,-0.36874 2.41813,-0.33107 4.84223,0.38909 1.47617,0.43855 3.44305,1.10992 4.37082,1.49195 1.97734,0.8142 2.40079,0.69727 0.83772,-0.2313 -1.20228,-0.71423 -1.46116,-1.5913 -0.46972,-1.5913 0.34524,0 2.08699,0.64901 3.87057,1.44225 4.13425,1.83868 5.21728,2.01136 6.36365,1.01453 z"
+         style="fill:#ffccaa;fill-opacity:1" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3095"
+         d="m -425.69987,-78.979776 c 1.22146,-0.70196 2.21277,-2.25051 1.76021,-2.74971 -0.26337,-0.29054 -0.63442,-0.0335 -0.87732,0.60775 -0.1221,0.32281 -0.62401,0.9655 -1.115,1.42821 -1.27189,1.19864 -1.16791,1.51832 0.23213,0.71375 l 0,0 z"
+         style="fill:#ffccaa;fill-opacity:1" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3097"
+         d="m -468.52823,-107.13422 c 0,-0.58964 0.0798,-0.8389 0.3308,-1.03282 0.45047,-0.34804 0.30611,-0.60181 -1.32521,-2.32942 -1.39745,-1.47995 -2.12547,-2.0978 -2.27611,-1.93165 -0.0492,0.0541 0.42761,1.1471 1.05931,2.42882 1.40548,2.85173 1.85142,3.64229 2.05462,3.64229 0.0859,0 0.15672,-0.34975 0.15672,-0.77722 z"
+         style="fill:#550000;fill-opacity:1" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3101"
+         d="m -450.80024,-97.471126 c 0.217,-0.23936 0.2593,-1.01453 0.0551,-1.01453 -0.67451,0 -1.42761,0.6663 -1.20408,1.0653 0.12928,0.23054 0.9256,0.19535 1.1487,-0.0508 z"
+         style="fill:#808000;fill-opacity:1" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3103"
+         d="m -424.1375,-83.460776 c 0.7172,-0.31598 0.84147,-0.51769 0.54293,-0.88154 -0.53438,-0.65138 -1.80294,-0.26889 -1.80294,0.54362 0,0.50737 0.54413,0.6533 1.26001,0.33792 z"
+         style="fill:#1a1a1a;fill-opacity:1" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3105"
+         d="m -466.61689,-80.834466 c 0,-0.1018 -0.3484,-0.87397 -0.77424,-1.71595 -1.00895,-1.99492 -1.44197,-5.09336 -1.43636,-10.27681 0.005,-3.31944 0.12646,-4.49417 0.5872,-5.61293 0.76521,-1.858384 3.69811,-4.707224 6.33349,-6.152034 2.06744,-1.13344 2.19151,-1.15611 6.38976,-1.16746 2.35472,-0.006 5.31601,0.12684 6.58061,0.29601 2.24043,0.29972 2.29922,0.28794 2.29922,-0.46011 0,-1.25594 -3.05496,-4.33488 -5.2426,-5.28373 -1.57112,-0.68145 -2.48615,-0.82297 -5.38152,-0.83229 -2.24186,-0.007 -3.8285,0.15551 -4.43992,0.45543 l -0.95142,0.46666 0.7284,0.37259 c 0.95191,0.48692 0.82872,1.78018 -0.18468,1.93875 -0.98472,0.15408 -2.91676,-1.15445 -6.11218,-4.13962 -3.48277,-3.2536 -7.3756,-6.13819 -7.54171,-5.58843 -0.0695,0.23064 0.13158,1.465 0.44769,2.74304 0.47088,1.90492 0.6088,2.16641 0.76526,1.45095 0.20443,-0.93386 0.88094,-1.23577 2.04649,-0.91307 0.39783,0.11014 2.1208,1.38349 3.82886,2.82968 1.70802,1.44619 3.19963,2.62944 3.31462,2.62944 0.40993,0 1.59721,1.43547 1.59721,1.93107 0,0.27745 -0.34456,0.59987 -0.76575,0.71648 -0.44608,0.12351 -0.9278,0.64347 -1.15383,1.24542 -0.57281,1.52544 -1.53942,2.75394 -2.16684,2.75394 -0.88812,0 -2.11684,-1.69246 -4.31787,-5.9476 -2.59519,-5.0171 -2.68525,-4.24236 -0.14313,1.22949 1.0551,2.27083 1.87571,4.45655 1.82357,4.85717 -0.14697,1.12806 -1.04595,1.05999 -2.07722,-0.15729 l -0.93655,-1.10541 -1.39475,0.95868 c -1.57628,1.08347 -6.45335,6.386524 -8.46529,9.204684 l -1.33358,1.86806 0,4.01966 0,4.01966 1.9619,-1.92782 c 2.25576,-2.21656 3.1987,-2.84847 3.84336,-2.5756 0.25649,0.10855 0.70241,1.31775 1.01716,2.75773 0.67161,3.07295 1.41402,5.25528 1.74016,5.11527 0.13081,-0.0561 0.93344,-1.11512 1.78383,-2.35336 0.85042,-1.23824 1.71317,-2.30978 1.91724,-2.3812 0.3098,-0.10844 1.89436,1.21502 5.25817,4.39178 0.30526,0.28827 0.55498,0.44085 0.55498,0.33906 z"
+         style="fill:#aa0000;fill-opacity:1" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3107"
+         d="m -452.79371,-114.52003 c -0.39729,-1.74607 -2.73939,-8.02648 -3.17377,-8.51056 -0.76531,-0.85282 -1.75739,1.30853 -2.3696,5.16244 l -0.54965,3.4595 2.557,0.14833 c 1.4063,0.0816 2.82804,0.27984 3.15938,0.44057 0.5361,0.26005 0.57761,0.18296 0.37664,-0.70027 z"
+         style="fill:#aa0000;fill-opacity:1" />
+      <text
+         sodipodi:linespacing="125%"
+         id="text3323"
+         y="-134.77502"
+         x="-540.08771"
+         style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
+         xml:space="preserve"><tspan
+           y="-134.77502"
+           x="-540.08771"
+           id="tspan3325"
+           sodipodi:role="line">VECTOR GRAPHICS</tspan></text>
+    </g>
+    <path
+       style="fill:none;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m 243.42578,54.019531 c 1.96094,-1.121094 2.39063,-0.402344 2.39063,-0.402344"
+       id="path3011"
+       inkscape:connector-curvature="0"
+       transform="translate(-681.08768,-132.77502)" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:0.001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       d="m -430.71268,-77.013301 1.57031,-0.859375 0.21094,1.078125"
+       id="path3781"
+       inkscape:connector-curvature="0" />
+  </g>
+</svg>
index ad2647d..236d3f6 100644 (file)
@@ -1,10 +1,10 @@
 # Script for the turtles video
 gpu
 lazy
-#debugfont off
+
 
 # Wait to start video
-loop 1000 wait
+loop 1000 wait
 
 #Load first turtle...
 loadsvg svg-tests/turtle.svg
index af5f53e..c660a7e 100644 (file)
@@ -1,6 +1,7 @@
 #include "view.h"
 #include "bufferbuilder.h"
 #include "screen.h"
+#include "profiler.h"
 #include "gl_core44.h"
 
 #ifndef CONTROLPANEL_DISABLED
@@ -87,6 +88,7 @@ View::~View()
  */
 void View::Translate(Real x, Real y)
 {
+       PROFILE_SCOPE("View::Translate");       
        if (!m_use_gpu_transform)
                m_buffer_dirty = true;
        m_bounds_dirty = true;
@@ -134,7 +136,7 @@ void View::SetBounds(const Rect & bounds)
  */
 void View::ScaleAroundPoint(Real x, Real y, Real scale_amount)
 {
-       
+       PROFILE_SCOPE("View::ScaleAroundPoint");        
        // (x0, y0, w, h) -> (x*w - (x*w - x0)*s, y*h - (y*h - y0)*s, w*s, h*s)
        // x and y are coordinates in the window
        // Convert to local coords.
@@ -197,6 +199,7 @@ Rect View::TransformToViewCoords(const Rect& inp) const
  */
 void View::Render(int width, int height)
 {
+       PROFILE_SCOPE("View::Render()");
        if (!m_screen.Valid()) return;
        glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION,42,-1, "Beginning View::Render()");
        // View dimensions have changed (ie: Window was resized)
@@ -232,8 +235,9 @@ void View::Render(int width, int height)
        // quadtree node).
        if (m_bounds_dirty || !m_lazy_rendering)
        {
+               g_profiler.BeginZone("View::Render -- Quadtree view bounds management");
                // If we're too far zoomed out, become the parent of the current node.
-               if ( m_bounds.w > 1.0 || m_bounds.h > 1.0)
+               while ( m_bounds.w > 1.0 || m_bounds.h > 1.0)
                {
                        // If a parent node exists, we'll become it.
                        //TODO: Generate a new parent node if none exists, and work out when to change child_type
@@ -243,6 +247,7 @@ void View::Render(int width, int height)
                                m_bounds = TransformFromQuadChild(m_bounds, m_document.GetQuadTree().nodes[m_current_quadtree_node].child_type);
                                m_current_quadtree_node = m_document.GetQuadTree().nodes[m_current_quadtree_node].parent;
                        }
+                       else break;
                }
 
                // If we have a parent... (This prevents some crashes, but should disappear.)
@@ -320,7 +325,7 @@ void View::Render(int width, int height)
 
                // Otherwise, we'll arbitrarily select the bottom-right.
                // TODO: Perhaps select based on greatest area?
-               if (m_bounds.w < 0.5 || m_bounds.h < 0.5)
+               while (m_bounds.w < 0.5 || m_bounds.h < 0.5)
                {
                        if (m_document.GetQuadTree().nodes[m_current_quadtree_node].bottom_right == QUADTREE_EMPTY)
                        {
@@ -331,6 +336,7 @@ void View::Render(int width, int height)
                        m_bounds = TransformToQuadChild(m_bounds, QTC_BOTTOM_RIGHT);
                        m_current_quadtree_node = m_document.GetQuadTree().nodes[m_current_quadtree_node].bottom_right;
                }
+               g_profiler.EndZone();
        }
 
        m_screen.DebugFontPrintF("Current View QuadTree");
@@ -376,6 +382,12 @@ void View::Render(int width, int height)
 #ifdef QUADTREE_DISABLED
        RenderRange(width, height, 0, m_document.ObjectCount());
 #else
+       // Make sure we update the gpu buffers properly.
+       if (m_document.m_document_dirty)
+       {
+               m_render_dirty = m_buffer_dirty = true;
+               m_document.m_document_dirty = false;
+       }
        RenderQuadtreeNode(width, height, m_current_quadtree_node, m_quadtree_max_depth);
 #endif
        if (!m_use_gpu_rendering)
@@ -403,13 +415,15 @@ void View::RenderQuadtreeNode(int width, int height, QuadTreeIndex node, int rem
        Rect old_bounds = m_bounds;
        if (node == QUADTREE_EMPTY) return;
        if (!remaining_depth) return;
-       //Debug("Rendering QT node %d, (objs: %d -- %d)\n", node, m_document.GetQuadTree().nodes[node].object_begin, m_document.GetQuadTree().nodes[node].object_end);
        m_bounds_dirty = true;
-       m_render_dirty = m_buffer_dirty = true;
        QuadTreeIndex overlay = node;
        while(overlay != -1)
        {
+               //Debug("Rendering QT node %d, (overlay %d, objs: %d -- %d)\n", node, overlay, m_document.GetQuadTree().nodes[overlay].object_begin, m_document.GetQuadTree().nodes[overlay].object_end);
+               if (m_document.GetQuadTree().nodes[overlay].render_dirty)
+                       m_buffer_dirty = m_render_dirty = true;
                RenderRange(width, height, m_document.GetQuadTree().nodes[overlay].object_begin, m_document.GetQuadTree().nodes[overlay].object_end);
+               const_cast<bool&>(m_document.GetQuadTree().nodes[overlay].render_dirty) = false;
                overlay = m_document.GetQuadTree().nodes[overlay].next_overlay;
        }
 
@@ -457,40 +471,46 @@ void View::RenderQuadtreeNode(int width, int height, QuadTreeIndex node, int rem
 
 void View::RenderRange(int width, int height, unsigned first_obj, unsigned last_obj)
 {
+       // We don't want to render an empty range,
+       // so don't waste time setting up everything.
+       if (first_obj == last_obj) return;
+       PROFILE_SCOPE("View::RenderRange");
        glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 43, -1, "View::RenderRange()");
        if (m_render_dirty) // document has changed
                PrepareRender();
 
+
        if (m_buffer_dirty || m_bounds_dirty || !m_lazy_rendering) // object bounds have changed
        {
                if (m_use_gpu_rendering)
                        UpdateObjBoundsVBO(first_obj, last_obj);
        }
 
-       if (m_use_gpu_transform)
-       {
-               #ifdef TRANSFORM_OBJECTS_NOT_VIEW
-                       //Debug("Transform objects, not view");
-                               GLfloat glbounds[] = {0.0f, 0.0f, 1.0f, 1.0f,
-                                       0.0f, 0.0f, float(width), float(height)};
-               #else
-               GLfloat glbounds[] = {static_cast<GLfloat>(Float(m_bounds.x)), static_cast<GLfloat>(Float(m_bounds.y)), static_cast<GLfloat>(Float(m_bounds.w)), static_cast<GLfloat>(Float(m_bounds.h)),
-                                       0.0, 0.0, static_cast<GLfloat>(width), static_cast<GLfloat>(height)};
-               #endif
-               m_bounds_ubo.Upload(sizeof(float)*8, glbounds);
-       }
-       else
-       {
-               GLfloat glbounds[] = {0.0f, 0.0f, 1.0f, 1.0f,
-                                       0.0f, 0.0f, float(width), float(height)};
-               m_bounds_ubo.Upload(sizeof(float)*8, glbounds);
-       }
-       m_bounds_dirty = false;
-
 
        // Render using GPU
        if (m_use_gpu_rendering) 
        {
+
+               if (m_use_gpu_transform)
+               {
+                       #ifdef TRANSFORM_OBJECTS_NOT_VIEW
+                               //Debug("Transform objects, not view");
+                                       GLfloat glbounds[] = {0.0f, 0.0f, 1.0f, 1.0f,
+                                               0.0f, 0.0f, float(width), float(height)};
+                       #else
+                       GLfloat glbounds[] = {static_cast<GLfloat>(Float(m_bounds.x)), static_cast<GLfloat>(Float(m_bounds.y)), static_cast<GLfloat>(Float(m_bounds.w)), static_cast<GLfloat>(Float(m_bounds.h)),
+                                               0.0, 0.0, static_cast<GLfloat>(width), static_cast<GLfloat>(height)};
+                       #endif
+                       m_bounds_ubo.Upload(sizeof(float)*8, glbounds);
+               }
+               else
+               {
+                       GLfloat glbounds[] = {0.0f, 0.0f, 1.0f, 1.0f,
+                                               0.0f, 0.0f, float(width), float(height)};
+                       m_bounds_ubo.Upload(sizeof(float)*8, glbounds);
+               }
+               m_bounds_dirty = false;
+
                if (m_colour.a < 1.0f)
                {
                        glEnable(GL_BLEND);
@@ -525,6 +545,7 @@ void View::RenderRange(int width, int height, unsigned first_obj, unsigned last_
 
 void View::UpdateObjBoundsVBO(unsigned first_obj, unsigned last_obj)
 {
+       PROFILE_SCOPE("View::UpdateObjBoundsVBO");
        if (m_query_gpu_bounds_on_next_frame != NULL)
        {
                fprintf(m_query_gpu_bounds_on_next_frame,"# View: %s\t%s\t%s\t%s\n", Str(m_bounds.x).c_str(), Str(m_bounds.y).c_str(), Str(m_bounds.w).c_str(), Str(m_bounds.h).c_str());
@@ -636,6 +657,7 @@ void View::UpdateObjBoundsVBO(unsigned first_obj, unsigned last_obj)
  */
 void View::PrepareRender()
 {
+       PROFILE_SCOPE("View::PrepareRender()");
        Debug("Recreate buffers with %u objects", m_document.ObjectCount());
        // Prepare bounds vbo
        if (UsingGPURendering())
index 05be33e..e1b3291 100644 (file)
@@ -78,6 +78,9 @@ namespace IPDF
                        void SaveGPUBMP(const char * filename);
 
                        Document & Doc() {return m_document;}
+#ifndef QUADTREE_DISABLED
+                       QuadTreeIndex GetCurrentQuadtreeNode() { return m_current_quadtree_node; }
+#endif
 
                private:
                        struct GPUObjBounds

UCC git Repository :: git.ucc.asn.au