summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7b5dfdd)
raw | patch | inline | side by side (parent: 7b5dfdd)
author | knutux <knutux@users.sourceforge.net> | |
Tue, 16 May 2006 05:17:46 +0000 (05:17 +0000) | ||
committer | knutux <knutux@users.sourceforge.net> | |
Tue, 16 May 2006 05:17:46 +0000 (05:17 +0000) |
src/livarot/PathConversion.cpp | patch | blob | history |
index a45e7548adf213af1f5234d38fc6849c3918bab5..7c741ac4ce466838da20f4a2a6bc895e08c0075d 100644 (file)
int lastMoveTo = 0;
short last_point_relation = 0;
short curent_point_relation = 0;
+ bool last_start_elimination = false;
bool start_elimination = false;
bool replace = false;
- // le moveto
+ // first point
{
int const firstTyp = descr_cmd[0]->getType();
if ( firstTyp == descr_moveto ) {
}
descr_cmd[0]->associated = lastMoveTo;
- // et le reste, 1 par 1
+ // process nodes one by one
while ( curP < int(descr_cmd.size()) ) {
int const nType = descr_cmd[curP]->getType();
nextX = nData->p;
curent_point_relation = POINT_RELATION_TO_AREA(nextX, area);
replace = false;
+ last_start_elimination = start_elimination;
if (curent_point_relation > 0 && curent_point_relation == last_point_relation) {
if (!start_elimination) {
start_elimination = true;
}
if ( descr_cmd[curP]->associated < 0 ) {
+ // point is not added as position is equal to the last added
+ start_elimination = last_start_elimination;
if ( curP == 0 ) {
descr_cmd[curP]->associated = 0;
} else {
curent_point_relation = POINT_RELATION_TO_AREA(nextX, area);
replace = false;
+ last_start_elimination = start_elimination;
if (curent_point_relation > 0 && curent_point_relation == last_point_relation &&
curent_point_relation == POINT_RELATION_TO_AREA(curX + (nData->start), area) &&
curent_point_relation == POINT_RELATION_TO_AREA(nextX + (nData->end), area))
}
if ( descr_cmd[curP]->associated < 0 ) {
+ // point is not added as position is equal to the last added
+ start_elimination = last_start_elimination;
if ( curP == 0 ) {
descr_cmd[curP]->associated = 0;
} else {