summaryrefslogtreecommitdiffstats
path: root/src/extension/internal/emf-print.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2015-04-27 23:39:29 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2015-04-27 23:39:29 +0000
commitc883d7627a479c8c5b6a9f77b9841fa5631572ad (patch)
treefba1186e26a8cc85a1b0728425bef6f2e9aeccd9 /src/extension/internal/emf-print.cpp
parentextensions. ink2canvas.py - do not parse html comments. (Bug 1446204) (diff)
downloadinkscape-c883d7627a479c8c5b6a9f77b9841fa5631572ad.tar.gz
inkscape-c883d7627a479c8c5b6a9f77b9841fa5631572ad.zip
2Geom sync - initial commit
(bzr r14059.2.1)
Diffstat (limited to 'src/extension/internal/emf-print.cpp')
-rw-r--r--src/extension/internal/emf-print.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/extension/internal/emf-print.cpp b/src/extension/internal/emf-print.cpp
index 67a9242bc..7815c51c7 100644
--- a/src/extension/internal/emf-print.cpp
+++ b/src/extension/internal/emf-print.cpp
@@ -862,7 +862,7 @@ Geom::Path PrintEmf::pathv_to_rect(Geom::PathVector const &pathv, bool *is_rect,
/* Get the ends of the LAST line segment.
Find minimum rotation to align rectangle with X,Y axes. (Very degenerate if it is rotated 45 degrees.) */
*angle = 10.0; /* must be > than the actual angle in radians. */
- for(Geom::Path::const_iterator cit = pR.begin(); cit != pR.end_open(); ++cit){
+ for(Geom::Path::iterator cit = pR.begin(); cit != pR.end_open(); ++cit){
P1_trail = cit->initialPoint();
P1 = cit->finalPoint();
v1 = unit_vector(P1 - P1_trail);
@@ -876,7 +876,7 @@ Geom::Path PrintEmf::pathv_to_rect(Geom::PathVector const &pathv, bool *is_rect,
double convert = 36000.0/ (2.0 * M_PI);
*angle = round(*angle * convert)/convert;
- for(Geom::Path::const_iterator cit = pR.begin(); cit != pR.end_open();++cit) {
+ for(Geom::Path::iterator cit = pR.begin(); cit != pR.end_open();++cit) {
P1_lead = cit->finalPoint();
v1 = unit_vector(P1 - P1_trail);
v2 = unit_vector(P1_lead - P1 );
@@ -926,7 +926,7 @@ int PrintEmf::vector_rect_alignment(double angle, Geom::Point vtest){
*/
Geom::Point PrintEmf::get_pathrect_corner(Geom::Path pathRect, double angle, int corner){
Geom::Point center(0,0);
- for(Geom::Path::const_iterator cit = pathRect.begin(); cit != pathRect.end_open(); ++cit) {
+ for(Geom::Path::iterator cit = pathRect.begin(); cit != pathRect.end_open(); ++cit) {
center += cit->initialPoint()/4.0;
}
@@ -954,7 +954,7 @@ Geom::Point PrintEmf::get_pathrect_corner(Geom::Path pathRect, double angle, int
Geom::Point v1 = Geom::Point(1,0) * Geom::Rotate(-angle); // unit horizontal side (sign change because Y increases DOWN)
Geom::Point v2 = Geom::Point(0,1) * Geom::Rotate(-angle); // unit vertical side (sign change because Y increases DOWN)
Geom::Point P1;
- for(Geom::Path::const_iterator cit = pathRect.begin(); cit != pathRect.end_open(); ++cit) {
+ for(Geom::Path::iterator cit = pathRect.begin(); cit != pathRect.end_open(); ++cit) {
P1 = cit->initialPoint();
if ( ( LR == (dot(P1 - center,v1) > 0 ? 0 : 1) )
@@ -1496,11 +1496,11 @@ bool PrintEmf::print_simple_shape(Geom::PathVector const &pathv, const Geom::Aff
int curves = 0;
char *rec = NULL;
- for (Geom::PathVector::const_iterator pit = pv.begin(); pit != pv.end(); ++pit) {
+ for (Geom::PathVector::iterator pit = pv.begin(); pit != pv.end(); ++pit) {
moves++;
nodes++;
- for (Geom::Path::const_iterator cit = pit->begin(); cit != pit->end_open(); ++cit) {
+ for (Geom::Path::iterator cit = pit->begin(); cit != pit->end_open(); ++cit) {
nodes++;
if (is_straight_curve(*cit)) {
@@ -1521,7 +1521,7 @@ bool PrintEmf::print_simple_shape(Geom::PathVector const &pathv, const Geom::Aff
/**
* For all Subpaths in the <path>
*/
- for (Geom::PathVector::const_iterator pit = pv.begin(); pit != pv.end(); ++pit) {
+ for (Geom::PathVector::iterator pit = pv.begin(); pit != pv.end(); ++pit) {
using Geom::X;
using Geom::Y;
@@ -1540,7 +1540,7 @@ bool PrintEmf::print_simple_shape(Geom::PathVector const &pathv, const Geom::Aff
/**
* For all segments in the subpath
*/
- for (Geom::Path::const_iterator cit = pit->begin(); cit != pit->end_open(); ++cit) {
+ for (Geom::Path::iterator cit = pit->begin(); cit != pit->end_open(); ++cit) {
if (is_straight_curve(*cit)) {
//Geom::Point p0 = cit->initialPoint();
Geom::Point p1 = cit->finalPoint();
@@ -1559,7 +1559,7 @@ bool PrintEmf::print_simple_shape(Geom::PathVector const &pathv, const Geom::Aff
lpPoints[i].y = y1;
i = i + 1;
} else if (Geom::CubicBezier const *cubic = dynamic_cast<Geom::CubicBezier const *>(&*cit)) {
- std::vector<Geom::Point> points = cubic->points();
+ std::vector<Geom::Point> points = cubic->controlPoints();
//Geom::Point p0 = points[0];
Geom::Point p1 = points[1];
Geom::Point p2 = points[2];
@@ -1848,7 +1848,7 @@ unsigned int PrintEmf::draw_pathv_to_EMF(Geom::PathVector const &pathv, const Ge
g_error("Fatal programming error in PrintEmf::print_pathv at U_EMRLINETO_set");
}
} else if (Geom::CubicBezier const *cubic = dynamic_cast<Geom::CubicBezier const *>(&*cit)) {
- std::vector<Geom::Point> points = cubic->points();
+ std::vector<Geom::Point> points = cubic->controlPoints();
//Geom::Point p0 = points[0];
Geom::Point p1 = points[1];
Geom::Point p2 = points[2];