Changeset View
Changeset View
Standalone View
Standalone View
libs/flake/KoPathShape.h
Show First 20 Lines • Show All 249 Lines • ▼ Show 20 Line(s) | 77 | public: | |||
---|---|---|---|---|---|
250 | * | 250 | * | ||
251 | * @return KoPathPoint on success, 0 otherwise e.g. out of bounds | 251 | * @return KoPathPoint on success, 0 otherwise e.g. out of bounds | ||
252 | */ | 252 | */ | ||
253 | KoPathPoint *pointByIndex(const KoPathPointIndex &pointIndex) const; | 253 | KoPathPoint *pointByIndex(const KoPathPointIndex &pointIndex) const; | ||
254 | 254 | | |||
255 | /** | 255 | /** | ||
256 | * @brief Returns the segment specified by a path point index | 256 | * @brief Returns the segment specified by a path point index | ||
257 | * | 257 | * | ||
258 | * A semgent is defined by the point index of the first point in the segment. | 258 | * A segment is defined by the point index of the first point in the segment. | ||
259 | * A segment contains the defined point and its following point. If the subpath is | 259 | * A segment contains the defined point and its following point. If the subpath is | ||
260 | * closed and the and the pointIndex point to the last point in the subpath, the | 260 | * closed and the and the pointIndex point to the last point in the subpath, the | ||
261 | * following point is the first point in the subpath. | 261 | * following point is the first point in the subpath. | ||
262 | * | 262 | * | ||
263 | * @param pointIndex index of the first point of the segment | 263 | * @param pointIndex index of the first point of the segment | ||
264 | * | 264 | * | ||
265 | * @return Segment containing both points of the segment or KoPathSegment( 0, 0 ) on error e.g. out of bounds | 265 | * @return Segment containing both points of the segment or KoPathSegment( 0, 0 ) on error e.g. out of bounds | ||
266 | */ | 266 | */ | ||
▲ Show 20 Lines • Show All 168 Lines • ▼ Show 20 Line(s) | |||||
435 | * factory from KoShapeRegistry. The default KoPathShapeId is returned | 435 | * factory from KoShapeRegistry. The default KoPathShapeId is returned | ||
436 | * from KoShape::shapeId() so that the generic path editing tool gets | 436 | * from KoShape::shapeId() so that the generic path editing tool gets | ||
437 | * activated when the shape is selected. | 437 | * activated when the shape is selected. | ||
438 | * | 438 | * | ||
439 | * @return the specific shape id | 439 | * @return the specific shape id | ||
440 | */ | 440 | */ | ||
441 | virtual QString pathShapeId() const; | 441 | virtual QString pathShapeId() const; | ||
442 | 442 | | |||
443 | /// Returns a odf/svg string represenatation of the path data with the given matrix applied. | 443 | /// Returns a odf/svg string representation of the path data with the given matrix applied. | ||
444 | QString toString(const QTransform &matrix = QTransform()) const; | 444 | QString toString(const QTransform &matrix = QTransform()) const; | ||
445 | 445 | | |||
446 | /// Returns the fill rule for the path object | 446 | /// Returns the fill rule for the path object | ||
447 | Qt::FillRule fillRule() const; | 447 | Qt::FillRule fillRule() const; | ||
448 | 448 | | |||
449 | /// Sets the fill rule to be used for painting the background | 449 | /// Sets the fill rule to be used for painting the background | ||
450 | void setFillRule(Qt::FillRule fillRule); | 450 | void setFillRule(Qt::FillRule fillRule); | ||
451 | 451 | | |||
▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | 482 | protected: | |||
494 | * | 494 | * | ||
495 | * Adds an arc starting at the current point. The arc will be converted to bezier curves. | 495 | * Adds an arc starting at the current point. The arc will be converted to bezier curves. | ||
496 | * @param rx x radius of the ellipse | 496 | * @param rx x radius of the ellipse | ||
497 | * @param ry y radius of the ellipse | 497 | * @param ry y radius of the ellipse | ||
498 | * @param startAngle the angle where the arc will be started | 498 | * @param startAngle the angle where the arc will be started | ||
499 | * @param sweepAngle the length of the angle | 499 | * @param sweepAngle the length of the angle | ||
500 | * TODO add param to have angle of the ellipse | 500 | * TODO add param to have angle of the ellipse | ||
501 | * @param offset to the first point in the arc | 501 | * @param offset to the first point in the arc | ||
502 | * @param curvePoints a array which take the cuve points, pass a 'QPointF curvePoins[12]'; | 502 | * @param curvePoints a array which take the curve points, pass a 'QPointF curvePoins[12]'; | ||
503 | * | 503 | * | ||
504 | * @return number of points created by the curve | 504 | * @return number of points created by the curve | ||
505 | */ | 505 | */ | ||
506 | int arcToCurve(qreal rx, qreal ry, qreal startAngle, qreal sweepAngle, const QPointF &offset, QPointF *curvePoints) const; | 506 | int arcToCurve(qreal rx, qreal ry, qreal startAngle, qreal sweepAngle, const QPointF &offset, QPointF *curvePoints) const; | ||
507 | 507 | | |||
508 | /** | 508 | /** | ||
509 | * Get the resize matrix | 509 | * Get the resize matrix | ||
510 | * | 510 | * | ||
Show All 12 Lines |