Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 3719 → Rev 3718

/branches/Version13x/Scribus/scribus/util.cpp
1213,20 → 1213,20
{
static QMap<QRgb, QPixmap*> pxCache;
 
QRgb index=rgb.rgb();
if (pxCache.contains(index))
return pxCache[index];
 
QPixmap *pm = new QPixmap(15, 15);
pm->fill(rgb);
QPainter p;
p.begin(pm);
p.setBrush(Qt::NoBrush);
QPen b(Qt::black, 1);
p.setPen(b);
p.drawRect(0, 0, 15, 15);
p.end();
pxCache.insert(index, pm);
QPixmap * pm = pxCache[rgb.rgb()];
if (!pm)
{
pm = new QPixmap(15, 15);
pm->fill(rgb);
QPainter p;
p.begin(pm);
p.setBrush(Qt::NoBrush);
QPen b(Qt::black, 1);
p.setPen(b);
p.drawRect(0, 0, 15, 15);
p.end();
pxCache[rgb.rgb()] = pm;
}
return pm;
}
 
1234,13 → 1234,12
{
static QMap<QRgb, QPixmap*> pxCache;
 
QRgb index=rgb.rgb();
if (pxCache.contains(index))
return pxCache[index];
 
QPixmap *pm = new QPixmap(30, 15);
pm->fill(rgb);
pxCache.insert(index, pm);
QPixmap * pm = pxCache[rgb.rgb()];
if (!pm) {
pm = new QPixmap(30, 15);
pm->fill(rgb);
pxCache[rgb.rgb()] = pm;
}
return pm;
}
 
1309,6 → 1308,7
if (col.isRegistrationColor())
paintAlert(regIcon, *pa, 45, 0);
pxCache.insert(res, pa);
return pa;
}
 
1326,8 → 1326,7
FPoint np, rp;
double mx = 0;
double my = 0;
uint clipSize=Clip->size();
for (uint c = 0; c < clipSize; ++c)
for (uint c = 0; c < Clip->size(); ++c)
{
np = Clip->point(c);
if (np.x() > 900000)
1346,8 → 1345,7
FPoint np, rp;
double mx = 99999;
double my = 99999;
uint clipSize=Clip->size();
for (uint c = 0; c < clipSize; ++c)
for (uint c = 0; c < Clip->size(); ++c)
{
np = Clip->point(c);
if (np.x() > 900000)