Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 9620 → Rev 9621

/branches/Version13x/Scribus/scribus/preview.cpp
45,6 → 45,7
#include "scpaths.h"
#include "pageselector.h"
#include "printerutil.h"
#include "sccolorengine.h"
#include "gsutil.h"
 
#if defined(_WIN32)
721,10 → 722,12
//FIXME: if source and target have different sizesomething went wrong.
// eg. loadPicture() failed and returned a 1x1 image
CMYKColor cmykValues;
int h = QMIN(target.height(),source.height());
int w = QMIN(target.width(),source.width());
int cyan, c, m, yc, k, cc, mm, yy, kk;
col.getCMYK(&c, &m, &yc, &k);
ScColorEngine::getCMYKValues(col, doc, cmykValues);
cmykValues.getValues(c, m, yc, k);
for (int y=0; y < h; ++y )
{
QRgb *p = (QRgb *)target.scanLine( y );
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/cmdcolor.cpp
40,6 → 40,7
return NULL;
}
edc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc->PageColors : PrefsManager::instance()->colorSet();
ScribusDoc* currentDoc = ScCore->primaryMainWindow()->HaveDoc ? ScCore->primaryMainWindow()->doc : NULL;
QString col = QString::fromUtf8(Name);
if (!edc.contains(col))
{
46,7 → 47,9
PyErr_SetString(NotFoundError, QObject::tr("Color not found.","python error"));
return NULL;
}
edc[col].getCMYK(&c, &m, &y, &k);
CMYKColor cmykValues;
ScColorEngine::getCMYKValues(edc[col], currentDoc, cmykValues);
cmykValues.getValues(c, m, y, k);
return Py_BuildValue("(iiii)", static_cast<long>(c), static_cast<long>(m), static_cast<long>(y), static_cast<long>(k));
}