diff --git a/src/livarot/Shape.h b/src/livarot/Shape.h
index 73199a313969feb4295125c46ce994d8fdba9308..ca8ae1c6eb3fa8513b06a15a3e03caad24dd1012 100644 (file)
--- a/src/livarot/Shape.h
+++ b/src/livarot/Shape.h
// -reset the graph, and ensure there's room for n points and m edges
void Reset(int n = 0, int m = 0);
// -points:
- int AddPoint(const NR::Point x); // as the function name says
+ int AddPoint(const Geom::Point x); // as the function name says
// returns the index at which the point has been added in the array
void SubPoint(int p); // removes the point at index p
// nota: this function relocates the last point to the index p
// create a graph that is an offseted version of the graph "of"
// the offset is dec, with joins between edges of type "join" (see LivarotDefs.h)
// the result is NOT a polygon; you need a subsequent call to ConvertToShape to get a real polygon
- int MakeOffset(Shape *of, double dec, JoinType join, double miter, bool do_profile=false, double cx = 0, double cy = 0, double radius = 0, NR::Matrix *i2doc = NULL);
+ int MakeOffset(Shape *of, double dec, JoinType join, double miter, bool do_profile=false, double cx = 0, double cy = 0, double radius = 0, Geom::Matrix *i2doc = NULL);
int MakeTweak (int mode, Shape *a, double dec, JoinType join, double miter, bool do_profile, Geom::Point c, Geom::Point vector, double radius, Geom::Matrix *i2doc);
- int PtWinding(const NR::Point px) const; // plus rapide
- int Winding(const NR::Point px) const;
+ int PtWinding(const Geom::Point px) const; // plus rapide
+ int Winding(const Geom::Point px) const;
// rasterization
void BeginRaster(float &pos, int &curPt);
void QuickScan(float &pos, int &curP, float to, FillRule directed, BitLigne* line, float step);
void QuickScan(float &pos, int &curP, float to, AlphaLigne* line, float step);
- void Transform(NR::Matrix const &tr)
+ void Transform(Geom::Matrix const &tr)
{for(std::vector<dg_point>::iterator it=_pts.begin();it!=_pts.end();it++) it->x*=tr;}
std::vector<back_data> ebData;
// topological information: who links who?
struct dg_point
{
- NR::Point x; // position
+ Geom::Point x; // position
int dI, dO; // indegree and outdegree
int incidentEdge[2]; // first and last incident edge
int oldDegree;
struct dg_arete
{
- NR::Point dx; // edge vector
+ Geom::Point dx; // edge vector
int st, en; // start and end points of the edge
int nextS, prevS; // next and previous edge in the double-linked list at the start point
int nextE, prevE; // next and previous edge in the double-linked list at the end point
struct edge_data
{
int weight; // weight of the edge (to handle multiple edges)
- NR::Point rdx; // rounded edge vector
+ Geom::Point rdx; // rounded edge vector
double length, sqlength, ilength, isqlength; // length^2, length, 1/length^2, 1/length
double siEd, coEd; // siEd=abs(rdy/length) and coEd=rdx/length
edge_data() : weight(0), length(0.0), sqlength(0.0), ilength(0.0), isqlength(0.0), siEd(0.0), coEd(0.0) {}
int nextLinkedPoint; // not used
Shape *askForWindingS;
int askForWindingB;
- NR::Point rx; // rounded coordinates of the point
+ Geom::Point rx; // rounded coordinates of the point
};
{ // temporary array of edges for easier sorting
int no;
bool starting;
- NR::Point x;
+ Geom::Point x;
};
void initialisePointData();
void SortEdgesList(edge_list *edges, int s, int e);
void TesteIntersection(SweepTree *t, Side s, bool onlyDiff); // test if there is an intersection
- bool TesteIntersection(SweepTree *iL, SweepTree *iR, NR::Point &atx, double &atL, double &atR, bool onlyDiff);
+ bool TesteIntersection(SweepTree *iL, SweepTree *iR, Geom::Point &atx, double &atL, double &atR, bool onlyDiff);
bool TesteIntersection(Shape *iL, Shape *iR, int ilb, int irb,
- NR::Point &atx, double &atL, double &atR,
+ Geom::Point &atx, double &atL, double &atR,
bool onlyDiff);
- bool TesteAdjacency(Shape *iL, int ilb, const NR::Point atx, int nPt,
+ bool TesteAdjacency(Shape *iL, int ilb, const Geom::Point atx, int nPt,
bool push);
int PushIncidence(Shape *a, int cb, int pt, double theta);
int CreateIncidence(Shape *a, int cb, int pt);
int ReFormeArcTo(int bord, int curBord, Path *dest, Path *orig);
int ReFormeCubicTo(int bord, int curBord, Path *dest, Path *orig);
int ReFormeBezierTo(int bord, int curBord, Path *dest, Path *orig);
- void ReFormeBezierChunk(const NR::Point px, const NR::Point nx,
+ void ReFormeBezierChunk(const Geom::Point px, const Geom::Point nx,
Path *dest, int inBezier, int nbInterm,
Path *from, int p, double ts, double te);
};
// edge direction comparison function
- static int CmpToVert(const NR::Point ax, const NR::Point bx, bool as, bool bs);
+ static int CmpToVert(const Geom::Point ax, const Geom::Point bx, bool as, bool bs);
};
bool directedEulerian(Shape const *s);
-double distance(Shape const *s, NR::Point const &p);
-bool distanceLessThanOrEqual(Shape const *s, NR::Point const &p, double const max_l2);
+double distance(Shape const *s, Geom::Point const &p);
+bool distanceLessThanOrEqual(Shape const *s, Geom::Point const &p, double const max_l2);
#endif