Fix for restoreColors()
restoreColors() needed a fix to not clear the paint of unclosed shapes.
This commit is contained in:
parent
dc046e027c
commit
313f5e0eb4
2 changed files with 8 additions and 9 deletions
|
@ -1051,15 +1051,13 @@ void fillAreaWithUndo(const TImageP &img, const TRectD &area, TStroke *stroke,
|
||||||
for (int tempY = 0; tempY < tempRaster->getLy(); tempY++) {
|
for (int tempY = 0; tempY < tempRaster->getLy(); tempY++) {
|
||||||
for (int tempX = 0; tempX < tempRaster->getLx();
|
for (int tempX = 0; tempX < tempRaster->getLx();
|
||||||
tempX++, tempPix++, keepPix++) {
|
tempX++, tempPix++, keepPix++) {
|
||||||
if (tempPix->getInk() >= IGNORECOLORSTYLE ||
|
if (tempPix->getInk() < IGNORECOLORSTYLE) {
|
||||||
tempPix->getPaint() >= IGNORECOLORSTYLE) {
|
|
||||||
continue;
|
|
||||||
} else {
|
|
||||||
// Handle all other pixels
|
|
||||||
keepPix->setInk(tempPix->getInk());
|
keepPix->setInk(tempPix->getInk());
|
||||||
keepPix->setPaint(tempPix->getPaint());
|
|
||||||
keepPix->setTone(tempPix->getTone());
|
|
||||||
}
|
}
|
||||||
|
if (tempPix->getPaint() < IGNORECOLORSTYLE) {
|
||||||
|
keepPix->setPaint(tempPix->getPaint());
|
||||||
|
}
|
||||||
|
keepPix->setTone(tempPix->getTone());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,8 +99,9 @@ void restoreColors(const TRasterCM32P &r,
|
||||||
// in order to make the paint to protrude behind the line
|
// in order to make the paint to protrude behind the line
|
||||||
params.m_prevailing = false;
|
params.m_prevailing = false;
|
||||||
for (UINT i = 0; i < seeds.size(); i++) {
|
for (UINT i = 0; i < seeds.size(); i++) {
|
||||||
params.m_p = seeds[i].first;
|
params.m_p = seeds[i].first;
|
||||||
params.m_styleId = seeds[i].second;
|
// params.m_styleId = seeds[i].second;
|
||||||
|
params.m_styleId = IGNORECOLORSTYLE;
|
||||||
fill(r, params);
|
fill(r, params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue