Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 2610 → Rev 2611

/trunk/Scribus/scribus/plugins/pixmapexport/export.cpp
104,8 → 104,15
if (!carrier->view->Pages.at(pageNr))
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.0) / 100.0));
/* a little magic here - I need to compute the "maxGr" value...
* We need to know the right size of the page for landscape,
* portrait and user defined sizes.
*/
double pixmapSize;
(carrier->doc->PageH > carrier->doc->PageB)
? pixmapSize = carrier->doc->PageH
: pixmapSize = carrier->doc->PageB;
QPixmap pixmap = carrier->view->PageToPixmap(pageNr, qRound(pixmapSize * enlargement * (pageDPI / 72.0) / 100.0));
QImage im = pixmap.convertToImage();
int dpm = qRound((100.0 / 2.54) * pageDPI);
im.setDotsPerMeterY(dpm);
/trunk/Scribus/scribus/plugins/scriptplugin/objimageexport.cpp
132,7 → 132,15
if(!checkHaveDocument())
return NULL;
 
QPixmap pixmap = Carrier->view->PageToPixmap(Carrier->doc->ActPage->PageNr, qRound(Carrier->doc->PageH * self->scale * (self->dpi / 72.0) / 100.0));
/* a little magic here - I need to compute the "maxGr" value...
* We need to know the right size of the page for landscape,
* portrait and user defined sizes.
*/
double pixmapSize;
(Carrier->doc->PageH > Carrier->doc->PageB)
? pixmapSize = Carrier->doc->PageH
: pixmapSize = Carrier->doc->PageB;
QPixmap pixmap = Carrier->view->PageToPixmap(Carrier->doc->ActPage->PageNr, qRound(pixmapSize * 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,7 → 161,16
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.0)/ 100.0));
 
/* a little magic here - I need to compute the "maxGr" value...
* We need to know the right size of the page for landscape,
* portrait and user defined sizes.
*/
double pixmapSize;
(Carrier->doc->PageH > Carrier->doc->PageB)
? pixmapSize = Carrier->doc->PageH
: pixmapSize = Carrier->doc->PageB;
QPixmap pixmap = Carrier->view->PageToPixmap(Carrier->doc->ActPage->PageNr, qRound(pixmapSize * self->scale * (self->dpi / 72.0) / 100.0));
QImage im = pixmap.convertToImage();
int dpm = qRound(100.0 / 2.54 * self->dpi);
im.setDotsPerMeterY(dpm);