Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 2584 → Rev 2585

/branches/Version13x/Scribus/scribus/plugins/pixmapexport/export.cpp
56,7 → 56,7
{
bool res;
ExportBitmap *ex = new ExportBitmap(plug);
ExportForm *dia = new ExportForm(d, ex->pageSize, ex->quality, ex->bitmapType);
ExportForm *dia = new ExportForm(d, ex->pageDPI, ex->quality, ex->bitmapType);
 
// interval widgets handling
QString tmp;
66,7 → 66,7
{
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
std::vector<int> pageNs;
ex->pageSize = dia->DPIBox->value();
ex->pageDPI = dia->DPIBox->value();
ex->enlargement = dia->EnlargementBox->value();
ex->quality = dia->QualityBox->value();
ex->exportDir = dia->OutputDirectory->text();
103,7 → 103,7
ExportBitmap::ExportBitmap(ScribusApp *plug)
{
carrier = plug;
pageSize = 72;
pageDPI = 72;
quality = 100;
enlargement = 100;
exportDir = QDir::currentDirPath();
132,10 → 132,10
if (!carrier->doc->Pages.at(pageNr))
return FALSE;
 
QImage im = carrier->view->PageToPixmap(pageNr, qRound(carrier->doc->pageHeight * enlargement / 100));
int dpi = qRound(100.0 / 2.54 * pageSize);
im.setDotsPerMeterY(dpi);
im.setDotsPerMeterX(dpi);
QImage im = carrier->view->PageToPixmap(pageNr, qRound(carrier->doc->pageHeight * enlargement * (pageDPI / 72) / 100));
int dpm = qRound(100.0 / 2.54 * pageDPI);
im.setDotsPerMeterY(dpm);
im.setDotsPerMeterX(dpm);
if (QFile::exists(fileName) && !overwrite)
{
QApplication::restoreOverrideCursor();
/branches/Version13x/Scribus/scribus/plugins/pixmapexport/export.h
37,30 → 37,30
{
Q_OBJECT
public:
/*! Initializing the default export variables and attributes */
/*! Initializing the default export variables and attributes */
ExportBitmap(ScribusApp *plug);
/*! nothing doing destructor. */
~ExportBitmap();
 
/*! Type of the exported image */
/*! Type of the exported image */
QString bitmapType;
/*! Height of the page - exported image */
int pageSize;
/*! Dpi of the exported image */
int pageDPI;
/*! Enlargement of the exported image... 2x 3x etc. */
int enlargement;
/*! Quality of the image <0; 100> */
/*! Quality of the image <0; 100> */
int quality;
/*! A place for stored images */
/*! A place for stored images */
QString exportDir;
/*! Overwrite the existing files? */
/*! Overwrite the existing files? */
bool overwrite;
 
/*! Exports only the actual page */
/*! Exports only the actual page */
bool exportActual();
/*! Exports chosen interval of the pages */
/*! Exports chosen interval of the pages */
bool exportInterval(std::vector<int> &pageNs);
private:
/*! reference to the Scribus application object */
/*! reference to the Scribus application object */
ScribusApp *carrier;
/*! create specified filename "docfilename-005.ext" */
QString getFileName(uint pageNr);
68,7 → 68,7
\param pageNr number of the page
\param single bool TRUE if only the one page is exported
*/
bool exportPage(uint pageNr, bool single);
bool exportPage(uint pageNr, bool single);
};
 
ScrAction *fileNewFromTemplateAction;
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/objimageexport.cpp
125,7 → 125,7
{
if(!checkHaveDocument())
return NULL;
QImage im = Carrier->view->PageToPixmap(Carrier->doc->currentPage->PageNr, qRound(Carrier->doc->pageHeight * self->scale / 100));
QImage im = Carrier->view->PageToPixmap(Carrier->doc->currentPage->PageNr, qRound(Carrier->doc->pageHeight * self->scale * (self->dpi / 72) / 100));
int dpi = qRound(100.0 / 2.54 * self->dpi);
im.setDotsPerMeterY(dpi);
im.setDotsPerMeterX(dpi);
145,7 → 145,7
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 / 100));
QPixmap pixmap = Carrier->view->PageToPixmap(Carrier->doc->currentPage->PageNr, qRound(Carrier->doc->pageHeight * self->scale * (self->dpi / 72) / 100));
QImage im = pixmap.convertToImage();
int dpi = qRound(100.0 / 2.54 * self->dpi);
im.setDotsPerMeterY(dpi);