Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 2612 → Rev 2613

/branches/Version13x/Scribus/scribus/plugins/pixmapexport/export.cpp
132,7 → 132,15
if (!carrier->doc->Pages.at(pageNr))
return FALSE;
 
QImage im = carrier->view->PageToPixmap(pageNr, qRound(carrier->doc->pageHeight * 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->pageHeight > carrier->doc->pageWidth)
? pixmapSize = carrier->doc->pageHeight
: pixmapSize = carrier->doc->pageWidth;
QImage im = carrier->view->PageToPixmap(pageNr, qRound(pixmapSize * enlargement * (pageDPI / 72.0) / 100.0));
int dpm = qRound(100.0 / 2.54 * pageDPI);
im.setDotsPerMeterY(dpm);
im.setDotsPerMeterX(dpm);
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/objimageexport.cpp
130,7 → 130,17
{
if(!checkHaveDocument())
return NULL;
QImage im = Carrier->view->PageToPixmap(Carrier->doc->currentPage->PageNr, qRound(Carrier->doc->pageHeight * 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->pageHeight > Carrier->doc->pageWidth)
? pixmapSize = Carrier->doc->pageHeight
: pixmapSize = Carrier->doc->pageWidth;
QPixmap pixmap = Carrier->view->PageToPixmap(Carrier->doc->currentPage->PageNr, qRound(pixmapSize * 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);
150,7 → 160,16
return NULL;
if (!PyArg_ParseTuple(args, const_cast<char*>("es"), "utf-8", &value))
return NULL;
QPixmap pixmap = Carrier->view->PageToPixmap(Carrier->doc->currentPage->PageNr, qRound(Carrier->doc->pageHeight * 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->pageHeight > Carrier->doc->pageWidth)
? pixmapSize = Carrier->doc->pageHeight
: pixmapSize = Carrier->doc->pageWidth;
QPixmap pixmap = Carrier->view->PageToPixmap(Carrier->doc->currentPage->PageNr, qRound(pixmapSize * self->scale * (self->dpi / 72.0) / 100.0));
QImage im = pixmap.convertToImage();
int dpi = qRound(100.0 / 2.54 * self->dpi);
im.setDotsPerMeterY(dpi);