Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 2600 → Rev 2601

/trunk/Scribus/scribus/plugins/pixmapexport/dialog.cpp
69,7 → 69,7
groupBox1Layout->addWidget( QualityBox, 1, 1 );
DPIBox = new QSpinBox( groupBox1, "DPIBox" );
DPIBox->setMaxValue( 2400 );
DPIBox->setMinValue( 1 );
DPIBox->setMinValue( 72 );
DPIBox->setValue(size);
groupBox1Layout->addWidget( DPIBox, 2, 1 );
EnlargementBox = new QSpinBox( groupBox1, "EnlargementBox" );
/trunk/Scribus/scribus/plugins/pixmapexport/export.cpp
105,9 → 105,9
return FALSE;
 
/* a little magic here - I need to compute the "maxGr" value... */
QPixmap pixmap = carrier->view->PageToPixmap(pageNr, qRound(carrier->doc->PageH * enlargement * (pageDPI / 72)/ 100));
QPixmap pixmap = carrier->view->PageToPixmap(pageNr, qRound(carrier->doc->PageH * enlargement * (pageDPI / 72.0) / 100.0));
QImage im = pixmap.convertToImage();
int dpm = qRound(100.0 / 2.54 * pageDPI);
int dpm = qRound((100.0 / 2.54) * pageDPI);
im.setDotsPerMeterY(dpm);
im.setDotsPerMeterX(dpm);
if (QFile::exists(fileName) && !overwrite)
/trunk/Scribus/scribus/plugins/scriptplugin/objimageexport.cpp
132,7 → 132,7
if(!checkHaveDocument())
return NULL;
 
QPixmap pixmap = Carrier->view->PageToPixmap(Carrier->doc->ActPage->PageNr, qRound(Carrier->doc->PageH * self->scale * (self->dpi / 72) / 100));
QPixmap pixmap = Carrier->view->PageToPixmap(Carrier->doc->ActPage->PageNr, qRound(Carrier->doc->PageH * self->scale * (self->dpi / 72.0) / 100.0));
QImage im = pixmap.convertToImage();
int dpm = qRound(100.0 / 2.54 * self->dpi);
im.setDotsPerMeterY(dpm);
153,11 → 153,11
return NULL;
if (!PyArg_ParseTuple(args, "es", "utf-8", &value))
return NULL;
QPixmap pixmap = Carrier->view->PageToPixmap(Carrier->doc->ActPage->PageNr, qRound(Carrier->doc->PageH * self->scale *(self->dpi / 72)/ 100));
QPixmap pixmap = Carrier->view->PageToPixmap(Carrier->doc->ActPage->PageNr, qRound(Carrier->doc->PageH * self->scale *(self->dpi / 72.0)/ 100.0));
QImage im = pixmap.convertToImage();
int dpi = qRound(100.0 / 2.54 * self->dpi);
im.setDotsPerMeterY(dpi);
im.setDotsPerMeterX(dpi);
int dpm = qRound(100.0 / 2.54 * self->dpi);
im.setDotsPerMeterY(dpm);
im.setDotsPerMeterX(dpm);
if (!im.save(value, PyString_AsString(self->type), self->quality))
{
PyErr_SetString(ScribusException, QObject::tr("Failed to export image", "python error"));