28 #include <QPainterPath>
34 #include "scribusapi.h"
46 FPointArray(
int size) : QVector<FPoint>(size), svgState(NULL) {};
48 int size()
const {
return QVector<FPoint>::count(); }
49 bool resize(
int newCount);
51 void setPoint(
int i,
double x,
double y) {
FPoint& p = QVector<FPoint>::operator[](i); p.xp = x; p.yp = y; };
52 void setPoint(
int i,
FPoint p) { setPoint(i, p.xp, p.yp); }
53 bool setPoints(
int nPoints,
double firstx,
double firsty, ... );
54 bool putPoints(
int index,
int nPoints,
double firstx,
double firsty, ... );
55 bool putPoints(
int index,
int nPoints,
const FPointArray & from,
int fromIndex = 0 );
56 void point(
int i,
double *x,
double *y)
const;
57 const FPoint& point(
int i)
const{
return QVector<FPoint>::at(i); }
58 QPoint pointQ(
int i)
const;
59 QPointF pointQF(
int i)
const;
60 void translate(
double dx,
double dy );
61 void scale(
double sx,
double sy );
62 QRectF boundingRect();
63 FPoint WidthHeight()
const;
64 void map(QTransform m);
68 bool isMarker(
int pos)
const;
69 bool isMarkerI(ConstIterator p)
const;
70 bool isMarkerD(
double x,
double y)
const;
71 void addPoint(
double x,
double y);
73 bool hasLastQuadPoint(
double x1,
double y1,
double x2,
double y2,
double x3,
double y3,
double x4,
double y4)
const;
74 void addQuadPoint(
double x1,
double y1,
double x2,
double y2,
double x3,
double y3,
double x4,
double y4);
76 double lenPathSeg(
int seg)
const;
77 double lenPathDist(
int seg,
double t1,
double t2)
const;
78 void pointTangentNormalAt(
int seg,
double t,
FPoint* p,
FPoint* tn,
FPoint* n )
const;
82 void svgMoveTo(
double x,
double y);
83 void svgLineTo(
double x,
double y);
85 void svgCurveToCubic(
double x1,
double y1,
double x2,
double y2,
double x3,
double y3);
86 void svgArcTo(
double r1,
double r2,
double angle,
bool largeArcFlag,
bool sweepFlag,
double x1,
double y1);
88 void calculateArc(
bool relative,
double &curx,
double &cury,
double angle,
double x,
double y,
double r1,
double r2,
bool largeArcFlag,
bool sweepFlag);
89 bool parseSVG(
const QString& svgPath);
90 QString svgPath(
bool closed =
false)
const;
91 QPainterPath toQPainterPath(
bool closed);
92 void fromQPainterPath(QPainterPath &path,
bool close =
false);
A point with floating point precision.
Definition: fpoint.h:43
Definition: fpointarray.cpp:470
Definition: fpointarray.h:42