summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNicolas Dufour <nicoduf@yahoo.fr>2014-02-05 11:29:11 +0000
committerJazzyNico <nicoduf@yahoo.fr>2014-02-05 11:29:11 +0000
commitc7731033ef400fccb6a49d830ded86068fcd3432 (patch)
treef3858438132a3f17071321ef91ddfac5e3c6b0ba /src
parentWorkaround for Bug #1273510 (crash in in cc_generic_knot_handler() after tool... (diff)
downloadinkscape-c7731033ef400fccb6a49d830ded86068fcd3432.tar.gz
inkscape-c7731033ef400fccb6a49d830ded86068fcd3432.zip
Fix for Bug #1250685 (Unnecessary gender-specific terms in code).
Fixed bugs: - https://launchpad.net/bugs/1250685 (bzr r12997)
Diffstat (limited to 'src')
-rw-r--r--src/libnrtype/FontFactory.cpp4
-rw-r--r--src/libnrtype/FontInstance.cpp40
-rw-r--r--src/libnrtype/TextWrapper.cpp2
-rw-r--r--src/libnrtype/font-instance.h2
-rw-r--r--src/livarot/AVL.cpp652
-rw-r--r--src/livarot/AVL.h6
-rw-r--r--src/livarot/PathCutting.cpp12
-rw-r--r--src/livarot/ShapeMisc.cpp12
-rw-r--r--src/livarot/sweep-event.cpp32
-rw-r--r--src/livarot/sweep-tree.cpp16
-rw-r--r--src/splivarot.cpp10
-rw-r--r--src/ui/tools/spray-tool.cpp56
12 files changed, 422 insertions, 422 deletions
diff --git a/src/libnrtype/FontFactory.cpp b/src/libnrtype/FontFactory.cpp
index 9fc553efd..f05b75aaa 100644
--- a/src/libnrtype/FontFactory.cpp
+++ b/src/libnrtype/FontFactory.cpp
@@ -973,12 +973,12 @@ font_instance *font_factory::Face(PangoFontDescription *descr, bool canFail)
// point) whether loadedFaces[that_descr] is free or not (and overwriting
// an entry will bring deallocation problems)
res->descr = pango_font_description_copy(descr);
- res->daddy = this;
+ res->parent = this;
res->InstallFace(nFace);
if ( res->pFont == NULL ) {
// failed to install face -> bitmap font
// printf("face failed\n");
- res->daddy = NULL;
+ res->parent = NULL;
delete res;
res = NULL;
if ( canFail ) {
diff --git a/src/libnrtype/FontInstance.cpp b/src/libnrtype/FontInstance.cpp
index 434f3ee47..a5b782344 100644
--- a/src/libnrtype/FontInstance.cpp
+++ b/src/libnrtype/FontInstance.cpp
@@ -174,7 +174,7 @@ font_instance::font_instance(void) :
pFont(0),
descr(0),
refCount(0),
- daddy(0),
+ parent(0),
nbGlyph(0),
maxGlyph(0),
glyphs(0),
@@ -185,9 +185,9 @@ font_instance::font_instance(void) :
font_instance::~font_instance(void)
{
- if ( daddy ) {
- daddy->UnrefFace(this);
- daddy = 0;
+ if ( parent ) {
+ parent->UnrefFace(this);
+ parent = 0;
}
//printf("font instance death\n");
@@ -389,13 +389,13 @@ void font_instance::InitTheFace()
if ( !theFace ) {
LOGFONT *lf=pango_win32_font_logfont(pFont);
g_assert(lf != NULL);
- theFace=pango_win32_font_cache_load(daddy->pangoFontCache,lf);
+ theFace=pango_win32_font_cache_load(parent->pangoFontCache,lf);
g_free(lf);
}
XFORM identity = {1.0, 0.0, 0.0, 1.0, 0.0, 0.0};
- SetWorldTransform(daddy->hScreenDC, &identity);
- SetGraphicsMode(daddy->hScreenDC, GM_COMPATIBLE);
- SelectObject(daddy->hScreenDC,theFace);
+ SetWorldTransform(parent->hScreenDC, &identity);
+ SetGraphicsMode(parent->hScreenDC, GM_COMPATIBLE);
+ SelectObject(parent->hScreenDC,theFace);
#else
theFace=pango_fc_font_lock_face(PANGO_FC_FONT(pFont));
if ( theFace ) {
@@ -408,8 +408,8 @@ void font_instance::InitTheFace()
void font_instance::FreeTheFace()
{
#ifdef USE_PANGO_WIN32
- SelectObject(daddy->hScreenDC,GetStockObject(SYSTEM_FONT));
- pango_win32_font_cache_unload(daddy->pangoFontCache,theFace);
+ SelectObject(parent->hScreenDC,GetStockObject(SYSTEM_FONT));
+ pango_win32_font_cache_unload(parent->pangoFontCache,theFace);
#else
pango_fc_font_unlock_face(PANGO_FC_FONT(pFont));
#endif
@@ -443,7 +443,7 @@ bool font_instance::IsOutlineFont(void)
InitTheFace();
#ifdef USE_PANGO_WIN32
TEXTMETRIC tm;
- return GetTextMetrics(daddy->hScreenDC,&tm) && tm.tmPitchAndFamily&(TMPF_TRUETYPE|TMPF_DEVICE);
+ return GetTextMetrics(parent->hScreenDC,&tm) && tm.tmPitchAndFamily&(TMPF_TRUETYPE|TMPF_DEVICE);
#else
return FT_IS_SCALABLE(theFace);
#endif
@@ -513,10 +513,10 @@ void font_instance::LoadGlyph(int glyph_id)
MAT2 identity = {{0,1},{0,0},{0,0},{0,1}};
OUTLINETEXTMETRIC otm;
- GetOutlineTextMetrics(daddy->hScreenDC, sizeof(otm), &otm);
+ GetOutlineTextMetrics(parent->hScreenDC, sizeof(otm), &otm);
GLYPHMETRICS metrics;
- DWORD bufferSize=GetGlyphOutline (daddy->hScreenDC, glyph_id, GGO_GLYPH_INDEX | GGO_NATIVE | GGO_UNHINTED, &metrics, 0, NULL, &identity);
- double scale=1.0/daddy->fontSize;
+ DWORD bufferSize=GetGlyphOutline (parent->hScreenDC, glyph_id, GGO_GLYPH_INDEX | GGO_NATIVE | GGO_UNHINTED, &metrics, 0, NULL, &identity);
+ double scale=1.0/parent->fontSize;
n_g.h_advance=metrics.gmCellIncX*scale;
n_g.v_advance=otm.otmTextMetrics.tmHeight*scale;
n_g.h_width=metrics.gmBlackBoxX*scale;
@@ -528,7 +528,7 @@ void font_instance::LoadGlyph(int glyph_id)
doAdd=true;
} else {
char *buffer = new char[bufferSize];
- if ( GetGlyphOutline (daddy->hScreenDC, glyph_id, GGO_GLYPH_INDEX | GGO_NATIVE | GGO_UNHINTED, &metrics, bufferSize, buffer, &identity) <= 0 ) {
+ if ( GetGlyphOutline (parent->hScreenDC, glyph_id, GGO_GLYPH_INDEX | GGO_NATIVE | GGO_UNHINTED, &metrics, bufferSize, buffer, &identity) <= 0 ) {
// shit happened
} else {
// Platform SDK is rubbish, read KB87115 instead
@@ -655,10 +655,10 @@ bool font_instance::FontMetrics(double &ascent,double &descent,double &leading)
}
#ifdef USE_PANGO_WIN32
OUTLINETEXTMETRIC otm;
- if ( !GetOutlineTextMetrics(daddy->hScreenDC,sizeof(otm),&otm) ) {
+ if ( !GetOutlineTextMetrics(parent->hScreenDC,sizeof(otm),&otm) ) {
return false;
}
- double scale=1.0/daddy->fontSize;
+ double scale=1.0/parent->fontSize;
ascent=fabs(otm.otmAscent*scale);
descent=fabs(otm.otmDescent*scale);
leading=fabs(otm.otmLineGap*scale);
@@ -688,10 +688,10 @@ bool font_instance::FontDecoration(
}
#ifdef USE_PANGO_WIN32
OUTLINETEXTMETRIC otm;
- if ( !GetOutlineTextMetrics(daddy->hScreenDC,sizeof(otm),&otm) ) {
+ if ( !GetOutlineTextMetrics(parent->hScreenDC,sizeof(otm),&otm) ) {
return false;
}
- double scale=1.0/daddy->fontSize;
+ double scale=1.0/parent->fontSize;
underline_position = fabs(otm.otmUnderscorePosition *scale);
underline_thickness = fabs(otm.otmUnderscoreSize *scale);
linethrough_position = fabs(otm.otmStrikeoutPosition *scale);
@@ -725,7 +725,7 @@ bool font_instance::FontSlope(double &run, double &rise)
#ifdef USE_PANGO_WIN32
OUTLINETEXTMETRIC otm;
- if ( !GetOutlineTextMetrics(daddy->hScreenDC,sizeof(otm),&otm) ) return false;
+ if ( !GetOutlineTextMetrics(parent->hScreenDC,sizeof(otm),&otm) ) return false;
run=otm.otmsCharSlopeRun;
rise=otm.otmsCharSlopeRise;
#else
diff --git a/src/libnrtype/TextWrapper.cpp b/src/libnrtype/TextWrapper.cpp
index 32877e275..380e9ba3f 100644
--- a/src/libnrtype/TextWrapper.cpp
+++ b/src/libnrtype/TextWrapper.cpp
@@ -327,7 +327,7 @@ void text_wrapper::DoLayout(void)
for (int i = 0; i < glyph_length; i++) {
glyph_text[i].uni_st = uni32_codepoint[glyph_text[i].uni_st];
glyph_text[i].uni_en = uni32_codepoint[glyph_text[i].uni_en];
- glyph_text[i].x /= 512; // why is this not default_font->daddy->fontsize?
+ glyph_text[i].x /= 512; // why is this not default_font->parent->fontsize?
glyph_text[i].y /= 512;
}
if ( glyph_length > 0 ) {
diff --git a/src/libnrtype/font-instance.h b/src/libnrtype/font-instance.h
index ef10a04d0..75106617b 100644
--- a/src/libnrtype/font-instance.h
+++ b/src/libnrtype/font-instance.h
@@ -29,7 +29,7 @@ public:
// refcount
int refCount;
// font_factory owning this font_instance
- font_factory* daddy;
+ font_factory* parent;
// common glyph definitions for all the rasterfonts
std::map<int, int> id_to_no;
diff --git a/src/livarot/AVL.cpp b/src/livarot/AVL.cpp
index e8ece7f8c..17af5ee66 100644
--- a/src/livarot/AVL.cpp
+++ b/src/livarot/AVL.cpp
@@ -28,10 +28,10 @@ void AVLTree::MakeNew()
for (int i = 0; i < 2; i++)
{
elem[i] = NULL;
- son[i] = NULL;
+ child[i] = NULL;
}
- dad = NULL;
+ parent = NULL;
balance = 0;
}
@@ -47,32 +47,32 @@ void AVLTree::MakeDelete()
AVLTree *AVLTree::Leftmost()
{
- return leafFromDad(NULL, LEFT);
+ return leafFromParent(NULL, LEFT);
}
AVLTree *AVLTree::leaf(AVLTree *from, Side s)
{
- if (from == son[1 - s]) {
- if (son[s]) {
- return son[s]->leafFromDad(this, s);
+ if (from == child[1 - s]) {
+ if (child[s]) {
+ return child[s]->leafFromParent(this, s);
}
- else if (dad) {
- return dad->leaf(this, s);
+ else if (parent) {
+ return parent->leaf(this, s);
}
}
- else if (from == son[s]) {
- if (dad) {
- return dad->leaf(this, s);
+ else if (from == child[s]) {
+ if (parent) {
+ return parent->leaf(this, s);
}
}
return NULL;
}
-AVLTree *AVLTree::leafFromDad(AVLTree */*from*/, Side s)
+AVLTree *AVLTree::leafFromParent(AVLTree */*from*/, Side s)
{
- if (son[s]) {
- return son[s]->leafFromDad(this, s);
+ if (child[s]) {
+ return child[s]->leafFromParent(this, s);
}
return this;
@@ -83,60 +83,60 @@ AVLTree::RestoreBalances (AVLTree * from, AVLTree * &racine)
{
if (from == NULL)
{
- if (dad)
- return dad->RestoreBalances (this, racine);
+ if (parent)
+ return parent->RestoreBalances (this, racine);
}
else
{
if (balance == 0)
{
- if (from == son[LEFT])
+ if (from == child[LEFT])
balance = 1;
- if (from == son[RIGHT])
+ if (from == child[RIGHT])
balance = -1;
- if (dad)
- return dad->RestoreBalances (this, racine);
+ if (parent)
+ return parent->RestoreBalances (this, racine);
return avl_no_err;
}
else if (balance > 0)
{
- if (from == son[RIGHT])
+ if (from == child[RIGHT])
{
balance = 0;
return avl_no_err;
}
- if (son[LEFT] == NULL)
+ if (child[LEFT] == NULL)
{
// cout << "mierda\n";
return avl_bal_err;
}
AVLTree *a = this;
- AVLTree *b = son[LEFT];
- AVLTree *e = son[RIGHT];
- AVLTree *c = son[LEFT]->son[LEFT];
- AVLTree *d = son[LEFT]->son[RIGHT];
- if (son[LEFT]->balance > 0)
+ AVLTree *b = child[LEFT];
+ AVLTree *e = child[RIGHT];
+ AVLTree *c = child[LEFT]->child[LEFT];
+ AVLTree *d = child[LEFT]->child[RIGHT];
+ if (child[LEFT]->balance > 0)
{
- AVLTree *r = dad;
+ AVLTree *r = parent;
- a->dad = b;
- b->son[RIGHT] = a;
- a->son[RIGHT] = e;
+ a->parent = b;
+ b->child[RIGHT] = a;
+ a->child[RIGHT] = e;
if (e)
- e->dad = a;
- a->son[LEFT] = d;
+ e->parent = a;
+ a->child[LEFT] = d;
if (d)
- d->dad = a;
- b->son[LEFT] = c;
+ d->parent = a;
+ b->child[LEFT] = c;
if (c)
- c->dad = b;
- b->dad = r;
+ c->parent = b;
+ b->parent = r;
if (r)
{
- if (r->son[LEFT] == a)
- r->son[LEFT] = b;
- if (r->son[RIGHT] == a)
- r->son[RIGHT] = b;
+ if (r->child[LEFT] == a)
+ r->child[LEFT] = b;
+ if (r->child[RIGHT] == a)
+ r->child[RIGHT] = b;
}
if (racine == a)
racine = b;
@@ -147,39 +147,39 @@ AVLTree::RestoreBalances (AVLTree * from, AVLTree * &racine)
}
else
{
- if (son[LEFT]->son[RIGHT] == NULL)
+ if (child[LEFT]->child[RIGHT] == NULL)
{
// cout << "mierda\n";
return avl_bal_err;
}
- AVLTree *f = son[LEFT]->son[RIGHT]->son[LEFT];
- AVLTree *g = son[LEFT]->son[RIGHT]->son[RIGHT];
- AVLTree *r = dad;
-
- a->dad = d;
- d->son[RIGHT] = a;
- b->dad = d;
- d->son[LEFT] = b;
- a->son[LEFT] = g;
+ AVLTree *f = child[LEFT]->child[RIGHT]->child[LEFT];
+ AVLTree *g = child[LEFT]->child[RIGHT]->child[RIGHT];
+ AVLTree *r = parent;
+
+ a->parent = d;
+ d->child[RIGHT] = a;
+ b->parent = d;
+ d->child[LEFT] = b;
+ a->child[LEFT] = g;
if (g)
- g->dad = a;
- a->son[RIGHT] = e;
+ g->parent = a;
+ a->child[RIGHT] = e;
if (e)
- e->dad = a;
- b->son[LEFT] = c;
+ e->parent = a;
+ b->child[LEFT] = c;
if (c)
- c->dad = b;
- b->son[RIGHT] = f;
+ c->parent = b;
+ b->child[RIGHT] = f;
if (f)
- f->dad = b;
+ f->parent = b;
- d->dad = r;
+ d->parent = r;
if (r)
{
- if (r->son[LEFT] == a)
- r->son[LEFT] = d;
- if (r->son[RIGHT] == a)
- r->son[RIGHT] = d;
+ if (r->child[LEFT] == a)
+ r->child[LEFT] = d;
+ if (r->child[RIGHT] == a)
+ r->child[RIGHT] = d;
}
if (racine == a)
racine = d;
@@ -206,43 +206,43 @@ AVLTree::RestoreBalances (AVLTree * from, AVLTree * &racine)
}
else if (balance < 0)
{
- if (from == son[LEFT])
+ if (from == child[LEFT])
{
balance = 0;
return avl_no_err;
}
- if (son[RIGHT] == NULL)
+ if (child[RIGHT] == NULL)
{
// cout << "mierda\n";
return avl_bal_err;
}
AVLTree *a = this;
- AVLTree *b = son[RIGHT];
- AVLTree *e = son[LEFT];
- AVLTree *c = son[RIGHT]->son[RIGHT];
- AVLTree *d = son[RIGHT]->son[LEFT];
- AVLTree *r = dad;
- if (son[RIGHT]->balance < 0)
+ AVLTree *b = child[RIGHT];
+ AVLTree *e = child[LEFT];
+ AVLTree *c = child[RIGHT]->child[RIGHT];
+ AVLTree *d = child[RIGHT]->child[LEFT];
+ AVLTree *r = parent;
+ if (child[RIGHT]->balance < 0)
{
- a->dad = b;
- b->son[LEFT] = a;
- a->son[LEFT] = e;
+ a->parent = b;
+ b->child[LEFT] = a;
+ a->child[LEFT] = e;
if (e)
- e->dad = a;
- a->son[RIGHT] = d;
+ e->parent = a;
+ a->child[RIGHT] = d;
if (d)
- d->dad = a;
- b->son[RIGHT] = c;
+ d->parent = a;
+ b->child[RIGHT] = c;
if (c)
- c->dad = b;
- b->dad = r;
+ c->parent = b;
+ b->parent = r;
if (r)
{
- if (r->son[LEFT] == a)
- r->son[LEFT] = b;
- if (r->son[RIGHT] == a)
- r->son[RIGHT] = b;
+ if (r->child[LEFT] == a)
+ r->child[LEFT] = b;
+ if (r->child[RIGHT] == a)
+ r->child[RIGHT] = b;
}
if (racine == a)
racine = b;
@@ -252,38 +252,38 @@ AVLTree::RestoreBalances (AVLTree * from, AVLTree * &racine)
}
else
{
- if (son[RIGHT]->son[LEFT] == NULL)
+ if (child[RIGHT]->child[LEFT] == NULL)
{
// cout << "mierda\n";
return avl_bal_err;
}
- AVLTree *f = son[RIGHT]->son[LEFT]->son[RIGHT];
- AVLTree *g = son[RIGHT]->son[LEFT]->son[LEFT];
-
- a->dad = d;
- d->son[LEFT] = a;
- b->dad = d;
- d->son[RIGHT] = b;
- a->son[RIGHT] = g;
+ AVLTree *f = child[RIGHT]->child[LEFT]->child[RIGHT];
+ AVLTree *g = child[RIGHT]->child[LEFT]->child[LEFT];
+
+ a->parent = d;
+ d->child[LEFT] = a;
+ b->parent = d;
+ d->child[RIGHT] = b;
+ a->child[RIGHT] = g;
if (g)
- g->dad = a;
- a->son[LEFT] = e;
+ g->parent = a;
+ a->child[LEFT] = e;
if (e)
- e->dad = a;
- b->son[RIGHT] = c;
+ e->parent = a;
+ b->child[RIGHT] = c;
if (c)
- c->dad = b;
- b->son[LEFT] = f;
+ c->parent = b;
+ b->child[LEFT] = f;
if (f)
- f->dad = b;
+ f->parent = b;
- d->dad = r;
+ d->parent = r;
if (r)
{
- if (r->son[LEFT] == a)
- r->son[LEFT] = d;
- if (r->son[RIGHT] == a)
- r->son[RIGHT] = d;
+ if (r->child[LEFT] == a)
+ r->child[LEFT] = d;
+ if (r->child[RIGHT] == a)
+ r->child[RIGHT] = d;
}
if (racine == a)
racine = d;
@@ -319,12 +319,12 @@ AVLTree::RestoreBalances (int diff, AVLTree * &racine)
if (diff < 0)
{
balance = 0;
- if (dad)
+ if (parent)
{
- if (this == dad->son[RIGHT])
- return dad->RestoreBalances (1, racine);
- if (this == dad->son[LEFT])
- return dad->RestoreBalances (-1, racine);
+ if (this == parent->child[RIGHT])
+ return parent->RestoreBalances (1, racine);
+ if (this == parent->child[LEFT])
+ return parent->RestoreBalances (-1, racine);
}
return avl_no_err;
}
@@ -333,38 +333,38 @@ AVLTree::RestoreBalances (int diff, AVLTree * &racine)
}
else if (diff > 0)
{
- if (son[LEFT] == NULL)
+ if (child[LEFT] == NULL)
{
// cout << "un probleme\n";
return avl_bal_err;
}
- AVLTree *r = dad;
+ AVLTree *r = parent;
AVLTree *a = this;
- AVLTree *b = son[RIGHT];
- AVLTree *e = son[LEFT];
- AVLTree *f = e->son[RIGHT];
- AVLTree *g = e->son[LEFT];
+ AVLTree *b = child[RIGHT];
+ AVLTree *e = child[LEFT];
+ AVLTree *f = e->child[RIGHT];
+ AVLTree *g = e->child[LEFT];
if (e->balance > 0)
{
- e->son[RIGHT] = a;
- e->son[LEFT] = g;
- a->son[RIGHT] = b;
- a->son[LEFT] = f;
+ e->child[RIGHT] = a;
+ e->child[LEFT] = g;
+ a->child[RIGHT] = b;
+ a->child[LEFT] = f;
if (a)
- a->dad = e;
+ a->parent = e;
if (g)
- g->dad = e;
+ g->parent = e;
if (b)
- b->dad = a;
+ b->parent = a;
if (f)
- f->dad = a;
- e->dad = r;
+ f->parent = a;
+ e->parent = r;
if (r)
{
- if (r->son[LEFT] == a)
- r->son[LEFT] = e;
- if (r->son[RIGHT] == a)
- r->son[RIGHT] = e;
+ if (r->child[LEFT] == a)
+ r->child[LEFT] = e;
+ if (r->child[RIGHT] == a)
+ r->child[RIGHT] = e;
}
if (racine == this)
racine = e;
@@ -372,34 +372,34 @@ AVLTree::RestoreBalances (int diff, AVLTree * &racine)
a->balance = 0;
if (r)
{
- if (e == r->son[RIGHT])
+ if (e == r->child[RIGHT])
return r->RestoreBalances (1, racine);
- if (e == r->son[LEFT])
+ if (e == r->child[LEFT])
return r->RestoreBalances (-1, racine);
}
return avl_no_err;
}
else if (e->balance == 0)
{
- e->son[RIGHT] = a;
- e->son[LEFT] = g;
- a->son[RIGHT] = b;
- a->son[LEFT] = f;
+ e->child[RIGHT] = a;
+ e->child[LEFT] = g;
+ a->child[RIGHT] = b;
+ a->child[LEFT] = f;
if (a)
- a->dad = e;
+ a->parent = e;
if (g)
- g->dad = e;
+ g->parent = e;
if (b)
- b->dad = a;
+ b->parent = a;
if (f)
- f->dad = a;
- e->dad = r;
+ f->parent = a;
+ e->parent = r;
if (r)
{
- if (r->son[LEFT] == a)
- r->son[LEFT] = e;
- if (r->son[RIGHT] == a)
- r->son[RIGHT] = e;
+ if (r->child[LEFT] == a)
+ r->child[LEFT] = e;
+ if (r->child[RIGHT] == a)
+ r->child[RIGHT] = e;
}
if (racine == this)
racine = e;
@@ -409,39 +409,39 @@ AVLTree::RestoreBalances (int diff, AVLTree * &racine)
}
else if (e->balance < 0)
{
- if (son[LEFT]->son[RIGHT] == NULL)
+ if (child[LEFT]->child[RIGHT] == NULL)
{
// cout << "un probleme\n";
return avl_bal_err;
}
- AVLTree *i = son[LEFT]->son[RIGHT]->son[RIGHT];
- AVLTree *j = son[LEFT]->son[RIGHT]->son[LEFT];
-
- f->son[RIGHT] = a;
- f->son[LEFT] = e;
- a->son[RIGHT] = b;
- a->son[LEFT] = i;
- e->son[RIGHT] = j;
- e->son[LEFT] = g;
+ AVLTree *i = child[LEFT]->child[RIGHT]->child[RIGHT];
+ AVLTree *j = child[LEFT]->child[RIGHT]->child[LEFT];
+
+ f->child[RIGHT] = a;
+ f->child[LEFT] = e;
+ a->child[RIGHT] = b;
+ a->child[LEFT] = i;
+ e->child[RIGHT] = j;
+ e->child[LEFT] = g;
if (b)
- b->dad = a;
+ b->parent = a;
if (i)
- i->dad = a;
+ i->parent = a;
if (g)
- g->dad = e;
+ g->parent = e;
if (j)
- j->dad = e;
+ j->parent = e;
if (a)
- a->dad = f;
+ a->parent = f;
if (e)
- e->dad = f;
- f->dad = r;
+ e->parent = f;
+ f->parent = r;
if (r)
{
- if (r->son[LEFT] == a)
- r->son[LEFT] = f;
- if (r->son[RIGHT] == a)
- r->son[RIGHT] = f;
+ if (r->child[LEFT] == a)
+ r->child[LEFT] = f;
+ if (r->child[RIGHT] == a)
+ r->child[RIGHT] = f;
}
if (racine == this)
racine = f;
@@ -464,9 +464,9 @@ AVLTree::RestoreBalances (int diff, AVLTree * &racine)
}
if (r)
{
- if (f == r->son[RIGHT])
+ if (f == r->child[RIGHT])
return r->RestoreBalances (1, racine);
- if (f == r->son[LEFT])
+ if (f == r->child[LEFT])
return r->RestoreBalances (-1, racine);
}
return avl_no_err;
@@ -492,38 +492,38 @@ AVLTree::RestoreBalances (int diff, AVLTree * &racine)
{
if (diff < 0)
{
- if (son[RIGHT] == NULL)
+ if (child[RIGHT] == NULL)
{
// cout << "un probleme\n";
return avl_bal_err;
}
- AVLTree *r = dad;
+ AVLTree *r = parent;
AVLTree *a = this;
- AVLTree *b = son[LEFT];
- AVLTree *e = son[RIGHT];
- AVLTree *f = e->son[LEFT];
- AVLTree *g = e->son[RIGHT];
+ AVLTree *b = child[LEFT];
+ AVLTree *e = child[RIGHT];
+ AVLTree *f = e->child[LEFT];
+ AVLTree *g = e->child[RIGHT];
if (e->balance < 0)
{
- e->son[LEFT] = a;
- e->son[RIGHT] = g;
- a->son[LEFT] = b;
- a->son[RIGHT] = f;
+ e->child[LEFT] = a;
+ e->child[RIGHT] = g;
+ a->child[LEFT] = b;
+ a->child[RIGHT] = f;
if (a)
- a->dad = e;
+ a->parent = e;
if (g)
- g->dad = e;
+ g->parent = e;
if (b)
- b->dad = a;
+ b->parent = a;
if (f)
- f->dad = a;
- e->dad = r;
+ f->parent = a;
+ e->parent = r;
if (r)
{
- if (r->son[LEFT] == a)
- r->son[LEFT] = e;
- if (r->son[RIGHT] == a)
- r->son[RIGHT] = e;
+ if (r->child[LEFT] == a)
+ r->child[LEFT] = e;
+ if (r->child[RIGHT] == a)
+ r->child[RIGHT] = e;
}
if (racine == this)
racine = e;
@@ -531,34 +531,34 @@ AVLTree::RestoreBalances (int diff, AVLTree * &racine)
a->balance = 0;
if (r)
{
- if (e == r->son[RIGHT])
+ if (e == r->child[RIGHT])
return r->RestoreBalances (1, racine);
- if (e == r->son[LEFT])
+ if (e == r->child[LEFT])
return r->RestoreBalances (-1, racine);
}
return avl_no_err;
}
else if (e->balance == 0)
{
- e->son[LEFT] = a;
- e->son[RIGHT] = g;
- a->son[LEFT] = b;
- a->son[RIGHT] = f;
+ e->child[LEFT] = a;
+ e->child[RIGHT] = g;
+ a->child[LEFT] = b;
+ a->child[RIGHT] = f;
if (a)
- a->dad = e;
+ a->parent = e;
if (g)
- g->dad = e;
+ g->parent = e;
if (b)
- b->dad = a;
+ b->parent = a;
if (f)
- f->dad = a;
- e->dad = r;
+ f->parent = a;
+ e->parent = r;
if (r)
{
- if (r->son[LEFT] == a)
- r->son[LEFT] = e;
- if (r->son[RIGHT] == a)
- r->son[RIGHT] = e;
+ if (r->child[LEFT] == a)
+ r->child[LEFT] = e;
+ if (r->child[RIGHT] == a)
+ r->child[RIGHT] = e;
}
if (racine == this)
racine = e;
@@ -568,39 +568,39 @@ AVLTree::RestoreBalances (int diff, AVLTree * &racine)
}
else if (e->balance > 0)
{
- if (son[RIGHT]->son[LEFT] == NULL)
+ if (child[RIGHT]->child[LEFT] == NULL)
{
// cout << "un probleme\n";
return avl_bal_err;
}
- AVLTree *i = son[RIGHT]->son[LEFT]->son[LEFT];
- AVLTree *j = son[RIGHT]->son[LEFT]->son[RIGHT];
-
- f->son[LEFT] = a;
- f->son[RIGHT] = e;
- a->son[LEFT] = b;
- a->son[RIGHT] = i;
- e->son[LEFT] = j;
- e->son[RIGHT] = g;
+ AVLTree *i = child[RIGHT]->child[LEFT]->child[LEFT];
+ AVLTree *j = child[RIGHT]->child[LEFT]->child[RIGHT];
+
+ f->child[LEFT] = a;
+ f->child[RIGHT] = e;
+ a->child[LEFT] = b;
+ a->child[RIGHT] = i;
+ e->child[LEFT] = j;
+ e->child[RIGHT] = g;
if (b)
- b->dad = a;
+ b->parent = a;
if (i)
- i->dad = a;
+ i->parent = a;
if (g)
- g->dad = e;
+ g->parent = e;
if (j)
- j->dad = e;
+ j->parent = e;
if (a)
- a->dad = f;
+ a->parent = f;
if (e)
- e->dad = f;
- f->dad = r;
+ e->parent = f;
+ f->parent = r;
if (r)
{
- if (r->son[LEFT] == a)
- r->son[LEFT] = f;
- if (r->son[RIGHT] == a)
- r->son[RIGHT] = f;
+ if (r->child[LEFT] == a)
+ r->child[LEFT] = f;
+ if (r->child[RIGHT] == a)
+ r->child[RIGHT] = f;
}
if (racine == this)
racine = f;
@@ -623,9 +623,9 @@ AVLTree::RestoreBalances (int diff, AVLTree * &racine)
}
if (r)
{
- if (f == r->son[RIGHT])
+ if (f == r->child[RIGHT])
return r->RestoreBalances (1, racine);
- if (f == r->son[LEFT])
+ if (f == r->child[LEFT])
return r->RestoreBalances (-1, racine);
}
return avl_no_err;
@@ -637,12 +637,12 @@ AVLTree::RestoreBalances (int diff, AVLTree * &racine)
else if (diff > 0)
{
balance = 0;
- if (dad)
+ if (parent)
{
- if (this == dad->son[RIGHT])
- return dad->RestoreBalances (1, racine);
- if (this == dad->son[LEFT])
- return dad->RestoreBalances (-1, racine);
+ if (this == parent->child[RIGHT])
+ return parent->RestoreBalances (1, racine);
+ if (this == parent->child[LEFT])
+ return parent->RestoreBalances (-1, racine);
}
return avl_no_err;
}
@@ -673,126 +673,126 @@ AVLTree::Remove (AVLTree * &racine, AVLTree * &startNode, int &diff)
elem[RIGHT]->elem[LEFT] = elem[LEFT];
elem[LEFT] = elem[RIGHT] = NULL;
- if (son[LEFT] && son[RIGHT])
+ if (child[LEFT] && child[RIGHT])
{
- AVLTree *newMe = son[LEFT]->leafFromDad(this, RIGHT);
- if (newMe == NULL || newMe->son[RIGHT])
+ AVLTree *newMe = child[LEFT]->leafFromParent(this, RIGHT);
+ if (newMe == NULL || newMe->child[RIGHT])
{
// cout << "pas normal\n";
return avl_rm_err;
}
- if (newMe == son[LEFT])
+ if (newMe == child[LEFT])
{
startNode = newMe;
diff = -1;
- newMe->son[RIGHT] = son[RIGHT];
- son[RIGHT]->dad = newMe;
- newMe->dad = dad;
- if (dad)
+ newMe->child[RIGHT] = child[RIGHT];
+ child[RIGHT]->parent = newMe;
+ newMe->parent = parent;
+ if (parent)
{
- if (dad->son[LEFT] == this)
- dad->son[LEFT] = newMe;
- if (dad->son[RIGHT] == this)
- dad->son[RIGHT] = newMe;
+ if (parent->child[LEFT] == this)
+ parent->child[LEFT] = newMe;
+ if (parent->child[RIGHT] == this)
+ parent->child[RIGHT] = newMe;
}
}
else
{
- AVLTree *oDad = newMe->dad;
- startNode = oDad;
+ AVLTree *oParent = newMe->parent;
+ startNode = oParent;
diff = 1;
- oDad->son[RIGHT] = newMe->son[LEFT];
- if (newMe->son[LEFT])
- newMe->son[LEFT]->dad = oDad;
+ oParent->child[RIGHT] = newMe->child[LEFT];
+ if (newMe->child[LEFT])
+ newMe->child[LEFT]->parent = oParent;
- newMe->dad = dad;
- newMe->son[LEFT] = son[LEFT];
- newMe->son[RIGHT] = son[RIGHT];
- if (dad)
+ newMe->parent = parent;
+ newMe->child[LEFT] = child[LEFT];
+ newMe->child[RIGHT] = child[RIGHT];
+ if (parent)
{
- if (dad->son[LEFT] == this)
- dad->son[LEFT] = newMe;
- if (dad->son[RIGHT] == this)
- dad->son[RIGHT] = newMe;
+ if (parent->child[LEFT] == this)
+ parent->child[LEFT] = newMe;
+ if (parent->child[RIGHT] == this)
+ parent->child[RIGHT] = newMe;
}
- if (son[LEFT])
- son[LEFT]->dad = newMe;
- if (son[RIGHT])
- son[RIGHT]->dad = newMe;
+ if (child[LEFT])
+ child[LEFT]->parent = newMe;
+ if (child[RIGHT])
+ child[RIGHT]->parent = newMe;
}
newMe->balance = balance;
if (racine == this)
racine = newMe;
}
- else if (son[LEFT])
+ else if (child[LEFT])
{
- startNode = dad;
+ startNode = parent;
diff = 0;
- if (dad)
+ if (parent)
{
- if (this == dad->son[LEFT])
+ if (this == parent->child[LEFT])
diff = -1;
- if (this == dad->son[RIGHT])
+ if (this == parent->child[RIGHT])
diff = 1;
}
- if (dad)
+ if (parent)
{
- if (dad->son[LEFT] == this)
- dad->son[LEFT] = son[LEFT];
- if (dad->son[RIGHT] == this)
- dad->son[RIGHT] = son[LEFT];
+ if (parent->child[LEFT] == this)
+ parent->child[LEFT] = child[LEFT];
+ if (parent->child[RIGHT] == this)
+ parent->child[RIGHT] = child[LEFT];
}
- if (son[LEFT]->dad == this)
- son[LEFT]->dad = dad;
+ if (child[LEFT]->parent == this)
+ child[LEFT]->parent = parent;
if (racine == this)
- racine = son[LEFT];
+ racine = child[LEFT];
}
- else if (son[RIGHT])
+ else if (child[RIGHT])
{
- startNode = dad;
+ startNode = parent;
diff = 0;
- if (dad)
+ if (parent)
{
- if (this == dad->son[LEFT])
+ if (this == parent->child[LEFT])
diff = -1;
- if (this == dad->son[RIGHT])
+ if (this == parent->child[RIGHT])
diff = 1;
}
- if (dad)
+ if (parent)
{
- if (dad->son[LEFT] == this)
- dad->son[LEFT] = son[RIGHT];
- if (dad->son[RIGHT] == this)
- dad->son[RIGHT] = son[RIGHT];
+ if (parent->child[LEFT] == this)
+ parent->child[LEFT] = child[RIGHT];
+ if (parent->child[RIGHT] == this)
+ parent->child[RIGHT] = child[RIGHT];
}
- if (son[RIGHT]->dad == this)
- son[RIGHT]->dad = dad;
+ if (child[RIGHT]->parent == this)
+ child[RIGHT]->parent = parent;
if (racine == this)
- racine = son[RIGHT];
+ racine = child[RIGHT];
}
else
{
- startNode = dad;
+ startNode = parent;
diff = 0;
- if (dad)
+ if (parent)
{
- if (this == dad->son[LEFT])
+ if (this == parent->child[LEFT])
diff = -1;
- if (this == dad->son[RIGHT])
+ if (this == parent->child[RIGHT])
diff = 1;
}
- if (dad)
+ if (parent)
{
- if (dad->son[LEFT] == this)
- dad->son[LEFT] = NULL;
- if (dad->son[RIGHT] == this)
- dad->son[RIGHT] = NULL;
+ if (parent->child[LEFT] == this)
+ parent->child[LEFT] = NULL;
+ if (parent->child[RIGHT] == this)
+ parent->child[RIGHT] = NULL;
}
if (racine == this)
racine = NULL;
}
- dad = son[RIGHT] = son[LEFT] = NULL;
+ parent = child[RIGHT] = child[LEFT] = NULL;
balance = 0;
return avl_no_err;
}
@@ -828,43 +828,43 @@ AVLTree::Insert (AVLTree * &racine, int insertType, AVLTree * insertL,
}
else if (insertType == found_on_left)
{
- if (insertR == NULL || insertR->son[LEFT])
+ if (insertR == NULL || insertR->child[LEFT])
{
// cout << "ngou?\n";
return avl_ins_err;
}
- insertR->son[LEFT] = this;
- dad = insertR;
+ insertR->child[LEFT] = this;
+ parent = insertR;
insertOn(LEFT, insertR);
}
else if (insertType == found_on_right)
{
- if (insertL == NULL || insertL->son[RIGHT])
+ if (insertL == NULL || insertL->child[RIGHT])
{
// cout << "ngou?\n";
return avl_ins_err;
}
- insertL->son[RIGHT] = this;
- dad = insertL;
+ insertL->child[RIGHT] = this;
+ parent = insertL;
insertOn(RIGHT, insertL);
}
else if (insertType == found_between)
{
if (insertR == NULL || insertL == NULL
- || (insertR->son[LEFT] != NULL && insertL->son[RIGHT] != NULL))
+ || (insertR->child[LEFT] != NULL && insertL->child[RIGHT] != NULL))
{
// cout << "ngou?\n";
return avl_ins_err;
}
- if (insertR->son[LEFT] == NULL)
+ if (insertR->child[LEFT] == NULL)
{
- insertR->son[LEFT] = this;
- dad = insertR;
+ insertR->child[LEFT] = this;
+ parent = insertR;
}
- else if (insertL->son[RIGHT] == NULL)
+ else if (insertL->child[RIGHT] == NULL)
{
- insertL->son[RIGHT] = this;
- dad = insertL;
+ insertL->child[RIGHT] = this;
+ parent = insertL;
}
insertBetween (insertL, insertR);
}
@@ -877,22 +877,22 @@ AVLTree::Insert (AVLTree * &racine, int insertType, AVLTree * insertL,
}
// et on insere
- if (insertL->son[RIGHT])
+ if (insertL->child[RIGHT])
{
- insertL = insertL->son[RIGHT]->leafFromDad(insertL, LEFT);
- if (insertL->son[LEFT])
+ insertL = insertL->child[RIGHT]->leafFromParent(insertL, LEFT);
+ if (insertL->child[LEFT])
{
// cout << "ngou?\n";
return avl_ins_err;
}
- insertL->son[LEFT] = this;
- this->dad = insertL;
+ insertL->child[LEFT] = this;
+ this->parent = insertL;
insertBetween (insertL->elem[LEFT], insertL);
}
else
{
- insertL->son[RIGHT] = this;
- dad = insertL;
+ insertL->child[RIGHT] = this;
+ parent = insertL;
insertBetween (insertL, insertL->elem[RIGHT]);
}
}
@@ -915,24 +915,24 @@ AVLTree::Relocate (AVLTree * to)
to->elem[LEFT] = elem[LEFT];
to->elem[RIGHT] = elem[RIGHT];
- if (dad)
+ if (parent)
{
- if (dad->son[LEFT] == this)
- dad->son[LEFT] = to;
- if (dad->son[RIGHT] == this)
- dad->son[RIGHT] = to;
+ if (parent->child[LEFT] == this)
+ parent->child[LEFT] = to;
+ if (parent->child[RIGHT] == this)
+ parent->child[RIGHT] = to;
}
- if (son[RIGHT])
+ if (child[RIGHT])
{
- son[RIGHT]->dad = to;
+ child[RIGHT]->parent = to;
}
- if (son[LEFT])
+ if (child[LEFT])
{
- son[LEFT]->dad = to;
+ child[LEFT]->parent = to;
}
- to->dad = dad;
- to->son[RIGHT] = son[RIGHT];
- to->son[LEFT] = son[LEFT];
+ to->parent = parent;
+ to->child[RIGHT] = child[RIGHT];
+ to->child[LEFT] = child[LEFT];
}
diff --git a/src/livarot/AVL.h b/src/livarot/AVL.h
index cc0f095cc..741abfaf2 100644
--- a/src/livarot/AVL.h
+++ b/src/livarot/AVL.h
@@ -30,7 +30,7 @@ public:
protected:
- AVLTree *son[2];
+ AVLTree *child[2];
AVLTree();
virtual ~AVLTree();
@@ -57,7 +57,7 @@ protected:
private:
- AVLTree *dad;
+ AVLTree *parent;
int balance;
@@ -78,7 +78,7 @@ private:
void insertOn(Side s, AVLTree *of);
void insertBetween(AVLTree *l, AVLTree *r);
AVLTree *leaf(AVLTree *from, Side s);
- AVLTree *leafFromDad(AVLTree *from, Side s);
+ AVLTree *leafFromParent(AVLTree *from, Side s);
};
#endif
diff --git a/src/livarot/PathCutting.cpp b/src/livarot/PathCutting.cpp
index 201f64b54..0dc7ede50 100644
--- a/src/livarot/PathCutting.cpp
+++ b/src/livarot/PathCutting.cpp
@@ -641,21 +641,21 @@ Path** Path::SubPathsWithNesting(int &outNb,bool killNoSurf,int nbNest,int*
}
curAdd=NULL;
}
- Path* hasDad=NULL;
+ Path* hasParent=NULL;
for (int j=0;j<nbNest;j++) {
if ( conts[j] == i && nesting[j] >= 0 ) {
- int dadMvt=conts[nesting[j]];
+ int parentMvt=conts[nesting[j]];
for (int k=0;k<nbRes;k++) {
- if ( res[k] && res[k]->descr_cmd.empty() == false && res[k]->descr_cmd[0]->associated == dadMvt ) {
- hasDad=res[k];
+ if ( res[k] && res[k]->descr_cmd.empty() == false && res[k]->descr_cmd[0]->associated == parentMvt ) {
+ hasParent=res[k];
break;
}
}
}
if ( conts[j] > i ) break;
}
- if ( hasDad ) {
- curAdd=hasDad;
+ if ( hasParent ) {
+ curAdd=hasParent;
increment=true;
} else {
curAdd=new Path;
diff --git a/src/livarot/ShapeMisc.cpp b/src/livarot/ShapeMisc.cpp
index e5a98f0cf..c0bfe9428 100644
--- a/src/livarot/ShapeMisc.cpp
+++ b/src/livarot/ShapeMisc.cpp
@@ -373,7 +373,7 @@ Shape::ConvertToFormeNested (Path * dest, int nbP, Path * *orig, int /*wildPath*
int lastPtUsed = 0;
do
{
- int dadContour=-1;
+ int parentContour=-1;
int childEdge = -1;
bool foundChild = false;
int startBord = -1;
@@ -387,10 +387,10 @@ Shape::ConvertToFormeNested (Path * dest, int nbP, Path * *orig, int /*wildPath*
{
int askTo = pData[fi].askForWindingB;
if (askTo < 0 || askTo >= numberOfEdges() ) {
- dadContour=-1;
+ parentContour=-1;
} else {
- dadContour = GPOINTER_TO_INT(swdData[askTo].misc);
- dadContour-=1; // pour compenser le decalage
+ parentContour = GPOINTER_TO_INT(swdData[askTo].misc);
+ parentContour-=1; // pour compenser le decalage
childEdge = getPoint(fi).incidentEdge[FIRST];
}
}
@@ -463,7 +463,7 @@ Shape::ConvertToFormeNested (Path * dest, int nbP, Path * *orig, int /*wildPath*
contStart=(int*)g_realloc(contStart,(nbNest+1)*sizeof(int));
contStart[nbNest]=dest->descr_cmd.size();
if (foundChild) {
- nesting[nbNest++]=dadContour;
+ nesting[nbNest++]=parentContour;
foundChild = false;
} else {
nesting[nbNest++]=-1; // contient des bouts de coupure -> a part
@@ -504,7 +504,7 @@ Shape::ConvertToFormeNested (Path * dest, int nbP, Path * *orig, int /*wildPath*
contStart=(int*)g_realloc(contStart,(nbNest+1)*sizeof(int));
contStart[nbNest]=dest->descr_cmd.size();
if (foundChild) {
- nesting[nbNest++]=dadContour;
+ nesting[nbNest++]=parentContour;
foundChild = false;
} else {
nesting[nbNest++]=-1; // contient des bouts de coupure -> a part
diff --git a/src/livarot/sweep-event.cpp b/src/livarot/sweep-event.cpp
index 6f3a4d246..48354fc46 100644
--- a/src/livarot/sweep-event.cpp
+++ b/src/livarot/sweep-event.cpp
@@ -146,11 +146,11 @@ void SweepEventQueue::remove(SweepEvent *e)
}
while (2 * curInd + 1 < nbEvt) {
- int const son1 = 2 * curInd + 1;
- int const son2 = son1 + 1;
- int const no1 = inds[son1];
- int const no2 = inds[son2];
- if (son2 < nbEvt) {
+ int const child1 = 2 * curInd + 1;
+ int const child2 = child1 + 1;
+ int const no1 = inds[child1];
+ int const no2 = inds[child2];
+ if (child2 < nbEvt) {
if (px[1] > events[no1].posx[1]
|| (px[1] == events[no1].posx[1]
&& px[0] > events[no1].posx[0]))
@@ -159,28 +159,28 @@ void SweepEventQueue::remove(SweepEvent *e)
|| (events[no2].posx[1] == events[no1].posx[1]
&& events[no2].posx[0] > events[no1].posx[0]))
{
- events[to].ind = son1;
+ events[to].ind = child1;
events[no1].ind = curInd;
- inds[son1] = to;
+ inds[child1] = to;
inds[curInd] = no1;
- curInd = son1;
+ curInd = child1;
} else {
- events[to].ind = son2;
+ events[to].ind = child2;
events[no2].ind = curInd;
- inds[son2] = to;
+ inds[child2] = to;
inds[curInd] = no2;
- curInd = son2;
+ curInd = child2;
}
} else {
if (px[1] > events[no2].posx[1]
|| (px[1] == events[no2].posx[1]
&& px[0] > events[no2].posx[0]))
{
- events[to].ind = son2;
+ events[to].ind = child2;
events[no2].ind = curInd;
- inds[son2] = to;
+ inds[child2] = to;
inds[curInd] = no2;
- curInd = son2;
+ curInd = child2;
} else {
break;
}
@@ -190,9 +190,9 @@ void SweepEventQueue::remove(SweepEvent *e)
|| (px[1] == events[no1].posx[1]
&& px[0] > events[no1].posx[0]))
{
- events[to].ind = son1;
+ events[to].ind = child1;
events[no1].ind = curInd;
- inds[son1] = to;
+ inds[child1] = to;
inds[curInd] = no1;
}
diff --git a/src/livarot/sweep-tree.cpp b/src/livarot/sweep-tree.cpp
index 0cfd6bc52..7a016a2ee 100644
--- a/src/livarot/sweep-tree.cpp
+++ b/src/livarot/sweep-tree.cpp
@@ -131,8 +131,8 @@ SweepTree::Find(Geom::Point const &px, SweepTree *newOne, SweepTree *&insertL,
}
}
if (y < 0) {
- if (son[LEFT]) {
- return (static_cast<SweepTree *>(son[LEFT]))->Find(px, newOne,
+ if (child[LEFT]) {
+ return (static_cast<SweepTree *>(child[LEFT]))->Find(px, newOne,
insertL, insertR,
sweepSens);
} else {
@@ -145,8 +145,8 @@ SweepTree::Find(Geom::Point const &px, SweepTree *newOne, SweepTree *&insertL,
}
}
} else {
- if (son[RIGHT]) {
- return (static_cast<SweepTree *>(son[RIGHT]))->Find(px, newOne,
+ if (child[RIGHT]) {
+ return (static_cast<SweepTree *>(child[RIGHT]))->Find(px, newOne,
insertL, insertR,
sweepSens);
} else {
@@ -189,9 +189,9 @@ SweepTree::Find(Geom::Point const &px, SweepTree * &insertL,
}
if (y < 0)
{
- if (son[LEFT])
+ if (child[LEFT])
{
- return (static_cast<SweepTree *>(son[LEFT]))->Find(px, insertL,
+ return (static_cast<SweepTree *>(child[LEFT]))->Find(px, insertL,
insertR);
}
else
@@ -210,9 +210,9 @@ SweepTree::Find(Geom::Point const &px, SweepTree * &insertL,
}
else
{
- if (son[RIGHT])
+ if (child[RIGHT])
{
- return (static_cast<SweepTree *>(son[RIGHT]))->Find(px, insertL,
+ return (static_cast<SweepTree *>(child[RIGHT]))->Find(px, insertL,
insertR);
}
else
diff --git a/src/splivarot.cpp b/src/splivarot.cpp
index e5006884c..5c7b389ff 100644
--- a/src/splivarot.cpp
+++ b/src/splivarot.cpp
@@ -371,18 +371,18 @@ sp_selected_path_boolop(Inkscape::Selection *selection, SPDesktop *desktop, bool
// objects are not in parent/child relationship;
// find their lowest common ancestor
- Inkscape::XML::Node *dad = LCA(a, b);
- if (dad == NULL) {
+ Inkscape::XML::Node *parent = LCA(a, b);
+ if (parent == NULL) {
boolop_display_error_message(desktop, _("Unable to determine the <b>z-order</b> of the objects selected for difference, XOR, division, or path cut."));
return;
}
// find the children of the LCA that lead from it to the a and b
- Inkscape::XML::Node *as = AncetreFils(a, dad);
- Inkscape::XML::Node *bs = AncetreFils(b, dad);
+ Inkscape::XML::Node *as = AncetreFils(a, parent);
+ Inkscape::XML::Node *bs = AncetreFils(b, parent);
// find out which comes first
- for (Inkscape::XML::Node *child = dad->firstChild(); child; child = child->next()) {
+ for (Inkscape::XML::Node *child = parent->firstChild(); child; child = child->next()) {
if (child == as) {
/* a first, so reverse. */
reverseOrderForOp = true;
diff --git a/src/ui/tools/spray-tool.cpp b/src/ui/tools/spray-tool.cpp
index 0ded1e44b..91c606e8e 100644
--- a/src/ui/tools/spray-tool.cpp
+++ b/src/ui/tools/spray-tool.cpp
@@ -404,7 +404,7 @@ static bool sp_spray_recursive(SPDesktop *desktop,
SPItem *item_copied;
if(_fid <= population)
{
- // duplicate
+ // Duplicate
SPDocument *doc = item->document;
Inkscape::XML::Document* xml_doc = doc->getReprDoc();
Inkscape::XML::Node *old_repr = item->getRepr();
@@ -413,13 +413,13 @@ static bool sp_spray_recursive(SPDesktop *desktop,
parent->appendChild(copy);
SPObject *new_obj = doc->getObjectByRepr(copy);
- item_copied = SP_ITEM(new_obj); //convertion object->item
+ item_copied = SP_ITEM(new_obj); // Convertion object->item
Geom::Point center=item->getCenter();
sp_spray_scale_rel(center,desktop, item_copied, Geom::Scale(_scale,_scale));
sp_spray_scale_rel(center,desktop, item_copied, Geom::Scale(scale,scale));
sp_spray_rotate_rel(center,desktop,item_copied, Geom::Rotate(angle));
- //Move the cursor p
+ // Move the cursor p
Geom::Point move = (Geom::Point(cos(tilt)*cos(dp)*dr/(1-ratio)+sin(tilt)*sin(dp)*dr/(1+ratio), -sin(tilt)*cos(dp)*dr/(1-ratio)+cos(tilt)*sin(dp)*dr/(1+ratio)))+(p-a->midpoint());
sp_item_move_rel(item_copied, Geom::Translate(move[Geom::X], -move[Geom::Y]));
did = true;
@@ -427,10 +427,10 @@ static bool sp_spray_recursive(SPDesktop *desktop,
}
} else if (mode == SPRAY_MODE_SINGLE_PATH) {
- SPItem *father = NULL; //initial Object
- SPItem *item_copied = NULL; //Projected Object
- SPItem *unionResult = NULL; //previous union
- SPItem *son = NULL; //father copy
+ SPItem *parent_item = NULL; // Initial object
+ SPItem *item_copied = NULL; // Projected object
+ SPItem *unionResult = NULL; // Previous union
+ SPItem *child_item = NULL; // Parent copy
int i=1;
for (GSList *items = g_slist_copy(const_cast<GSList *>(selection->itemList()));
@@ -439,31 +439,31 @@ static bool sp_spray_recursive(SPDesktop *desktop,
SPItem *item1 = SP_ITEM(items->data);
if (i == 1) {
- father = item1;
+ parent_item = item1;
}
if (i == 2) {
unionResult = item1;
}
i++;
}
- SPDocument *doc = father->document;
+ SPDocument *doc = parent_item->document;
Inkscape::XML::Document* xml_doc = doc->getReprDoc();
- Inkscape::XML::Node *old_repr = father->getRepr();
+ Inkscape::XML::Node *old_repr = parent_item->getRepr();
Inkscape::XML::Node *parent = old_repr->parent();
- Geom::OptRect a = father->documentVisualBounds();
+ Geom::OptRect a = parent_item->documentVisualBounds();
if (a) {
if (i == 2) {
Inkscape::XML::Node *copy1 = old_repr->duplicate(xml_doc);
parent->appendChild(copy1);
SPObject *new_obj1 = doc->getObjectByRepr(copy1);
- son = SP_ITEM(new_obj1); // conversion object->item
- unionResult = son;
+ child_item = SP_ITEM(new_obj1); // Conversion object->item
+ unionResult = child_item;
Inkscape::GC::release(copy1);
}
if (_fid <= population) { // Rules the population of objects sprayed
- // duplicates the father
+ // Duplicates the parent item
Inkscape::XML::Node *copy2 = old_repr->duplicate(xml_doc);
parent->appendChild(copy2);
SPObject *new_obj2 = doc->getObjectByRepr(copy2);
@@ -472,18 +472,18 @@ static bool sp_spray_recursive(SPDesktop *desktop,
// Move around the cursor
Geom::Point move = (Geom::Point(cos(tilt)*cos(dp)*dr/(1-ratio)+sin(tilt)*sin(dp)*dr/(1+ratio), -sin(tilt)*cos(dp)*dr/(1-ratio)+cos(tilt)*sin(dp)*dr/(1+ratio)))+(p-a->midpoint());
- Geom::Point center=father->getCenter();
+ Geom::Point center = parent_item->getCenter();
sp_spray_scale_rel(center, desktop, item_copied, Geom::Scale(_scale, _scale));
sp_spray_scale_rel(center, desktop, item_copied, Geom::Scale(scale, scale));
sp_spray_rotate_rel(center, desktop, item_copied, Geom::Rotate(angle));
sp_item_move_rel(item_copied, Geom::Translate(move[Geom::X], -move[Geom::Y]));
- // union and duplication
+ // Union and duplication
selection->clear();
selection->add(item_copied);
selection->add(unionResult);
sp_selected_path_union_skip_undo(selection, selection->desktop());
- selection->add(father);
+ selection->add(parent_item);
Inkscape::GC::release(copy2);
did = true;
}
@@ -500,15 +500,15 @@ static bool sp_spray_recursive(SPDesktop *desktop,
// Creation of the clone
Inkscape::XML::Node *clone = xml_doc->createElement("svg:use");
- // Ad the clone to the list of the father's sons
+ // Ad the clone to the list of the parent's children
parent->appendChild(clone);
- // Generates the link between father and son attributes
+ // Generates the link between parent and child attributes
gchar *href_str = g_strdup_printf("#%s", old_repr->attribute("id"));
clone->setAttribute("xlink:href", href_str, false);
g_free(href_str);
SPObject *clone_object = doc->getObjectByRepr(clone);
- // conversion object->item
+ // Conversion object->item
item_copied = SP_ITEM(clone_object);
Geom::Point center = item->getCenter();
sp_spray_scale_rel(center, desktop, item_copied, Geom::Scale(_scale, _scale));
@@ -582,9 +582,9 @@ static void sp_spray_update_area(SprayTool *tc)
static void sp_spray_switch_mode(SprayTool *tc, gint mode, bool with_shift)
{
- // select the button mode
+ // Select the button mode
SP_EVENT_CONTEXT(tc)->desktop->setToolboxSelectOneValue("spray_tool_mode", mode);
- // need to set explicitly, because the prefs may not have changed by the previous
+ // Need to set explicitly, because the prefs may not have changed by the previous
tc->mode = mode;
tc->update_cursor(with_shift);
}
@@ -631,7 +631,7 @@ bool SprayTool::root_handler(GdkEvent* event) {
Geom::Point motion_doc(desktop->dt2doc(motion_dt));
sp_spray_extinput(this, event);
- // draw the dilating cursor
+ // Draw the dilating cursor
double radius = get_dilate_radius(this);
Geom::Affine const sm (Geom::Scale(radius/(1-this->ratio), radius/(1+this->ratio)) );
sp_canvas_item_affine_absolute(this->dilate_area, (sm*Geom::Rotate(this->tilt))*Geom::Translate(desktop->w2d(motion_w)));
@@ -645,19 +645,19 @@ bool SprayTool::root_handler(GdkEvent* event) {
this->message_context->flash(Inkscape::ERROR_MESSAGE, _("<b>Nothing selected!</b> Select objects to spray."));
}
- // dilating:
+ // Dilating:
if (this->is_drawing && ( event->motion.state & GDK_BUTTON1_MASK )) {
sp_spray_dilate(this, motion_w, motion_doc, motion_doc - this->last_push, event->button.state & GDK_SHIFT_MASK? true : false);
//this->last_push = motion_doc;
this->has_dilated = true;
- // it's slow, so prevent clogging up with events
+ // It's slow, so prevent clogging up with events
gobble_motion_events(GDK_BUTTON1_MASK);
return TRUE;
}
}
break;
- /*Spray with the scroll*/
+ /* Spray with the scroll */
case GDK_SCROLL: {
if (event->scroll.state & GDK_BUTTON1_MASK) {
double temp ;
@@ -708,7 +708,7 @@ bool SprayTool::root_handler(GdkEvent* event) {
if (this->is_dilating && event->button.button == 1 && !this->space_panning) {
if (!this->has_dilated) {
- // if we did not rub, do a light tap
+ // If we did not rub, do a light tap
this->pressure = 0.03;
sp_spray_dilate(this, motion_w, desktop->dt2doc(motion_dt), Geom::Point(0,0), MOD__SHIFT(event));
}
@@ -784,7 +784,7 @@ bool SprayTool::root_handler(GdkEvent* event) {
if (this->width > 1.0) {
this->width = 1.0;
}
- // the same spinbutton is for alt+x
+ // The same spinbutton is for alt+x
desktop->setToolboxAdjustmentValue("altx-spray", this->width * 100);
sp_spray_update_area(this);
ret = TRUE;