diff options
Diffstat (limited to 'basegfx/source/polygon/b2dtrapezoid.cxx')
-rw-r--r-- | basegfx/source/polygon/b2dtrapezoid.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/basegfx/source/polygon/b2dtrapezoid.cxx b/basegfx/source/polygon/b2dtrapezoid.cxx index 6c9895953a2e..35eab940a0db 100644 --- a/basegfx/source/polygon/b2dtrapezoid.cxx +++ b/basegfx/source/polygon/b2dtrapezoid.cxx @@ -22,13 +22,13 @@ #include <basegfx/polygon/b2dpolygontools.hxx> #include <list> -////////////////////////////////////////////////////////////////////////////// + namespace basegfx { namespace trapezoidhelper { - ////////////////////////////////////////////////////////////////////////////// + // helper class to hold a simple ege. This is only used for horizontal edges // currently, thus the YPositions will be equal. I did not create a special // class for this since holdingthe pointers is more effective and also can be @@ -56,12 +56,12 @@ namespace basegfx const B2DPoint& getEnd() const { return *mpEnd; } }; - ////////////////////////////////////////////////////////////////////////////// + // define vector of simple edges typedef ::std::vector< TrDeSimpleEdge > TrDeSimpleEdges; - ////////////////////////////////////////////////////////////////////////////// + // helper class for holding a traversing edge. It will always have some // distance in YPos. The slope (in a numerically useful form, see comments) is // hold and used in SortValue to allow sorting traversing edges by Y, X and slope @@ -179,7 +179,7 @@ namespace basegfx } }; - ////////////////////////////////////////////////////////////////////////////// + // define double linked list of edges (for fast random insert) typedef ::std::list< TrDeEdgeEntry > TrDeEdgeEntries; @@ -187,7 +187,7 @@ namespace basegfx } // end of anonymous namespace } // end of namespace basegfx -////////////////////////////////////////////////////////////////////////////// + namespace basegfx { @@ -600,22 +600,22 @@ namespace basegfx // This is the central subdivider. The strategy is to use the first two entries // from the traversing edges as a potential trapezoid and do the needed corrections // and adaptions on the way. - // + // There always must be two edges with the same YStart value: When adding the polygons // in the constructor, there is always a topmost point from which two edges start; when // the topmost is an edge, there is a start and end of this edge from which two edges // start. All cases have two edges with same StartY (QED). - // + // Based on this these edges get corrected when: // - one is longer than the other // - they intersect // - they intersect with other edges // - another edge starts inside the thought trapezoid - // + // All this cases again produce a valid state so that the first two edges have a common // Ystart again. Some cases lead to a restart of the process, some allow consuming the // edges and create the intended trapezoid. - // + // Be careful when doing chages here: It is essential to keep all possible paths // in valid states and to be numerically correct. This is especially needed e.g. // by using fTools::equal(..) in the more robust small-value incarnation. @@ -898,7 +898,7 @@ namespace basegfx } // end of anonymous namespace } // end of namespace basegfx -////////////////////////////////////////////////////////////////////////////// + namespace basegfx { @@ -951,7 +951,7 @@ namespace basegfx } } // end of namespace basegfx -////////////////////////////////////////////////////////////////////////////// + namespace basegfx { |