/trunk/Scribus/ChangeLogCVS |
---|
1,4 → 1,7 |
Changes since Version 1.1.5 |
19.02.2004 Improved the PDF-Export settings, the Compression method for |
Images can now be set. Zip and JPEG Compression is available. |
18.02.2004 Improved the PDF-Export, Images are now written as jpg into the PDF. |
Fixed a problem with freetype > 2.1.4 |
/trunk/Scribus/scribus/pdfopts.cpp |
---|
162,32 → 162,56 |
GroupBox1Layout->addWidget( Resolution, 5, 1, AlignLeft ); |
Layout13->addWidget( GroupBox1 ); |
tabLayout->addLayout( Layout13 ); |
GroupBox2 = new QGroupBox( tab, "GroupBox2" ); |
GroupBox2->setTitle( tr( "Compression" ) ); |
GroupBox2->setColumnLayout(0, Qt::Vertical ); |
GroupBox2->layout()->setSpacing( 0 ); |
GroupBox2->layout()->setMargin( 0 ); |
GroupBox2Layout = new QGridLayout( GroupBox2->layout() ); |
GroupBox2Layout->setAlignment( Qt::AlignTop ); |
GroupBox2Layout->setSpacing( 6 ); |
GroupBox2Layout->setMargin( 11 ); |
DSColor = new QCheckBox( GroupBox2, "DSColor" ); |
DSColor->setText( tr( "Downsample Images to:" ) ); |
Compression = new QCheckBox( tab, "Compression" ); |
Compression->setChecked( Optionen->Compress ); |
Compression->setText( tr( "Compress Text and Vector Graphics" ) ); |
tabLayout->addWidget( Compression ); |
CBox = new QGroupBox( tab, "CBox" ); |
CBox->setTitle( tr( "Image Settings" ) ); |
CBox->setColumnLayout(0, Qt::Vertical ); |
CBox->layout()->setSpacing( 6 ); |
CBox->layout()->setMargin( 11 ); |
CBoxLayout = new QGridLayout( CBox->layout() ); |
CBoxLayout->setAlignment( Qt::AlignTop ); |
TextCom1 = new QLabel( CBox, "TextCom1" ); |
TextCom1->setText( tr( "Method:" ) ); |
CBoxLayout->addWidget( TextCom1, 0, 0 ); |
CMethod = new QComboBox( true, CBox, "CMethod" ); |
CMethod->clear(); |
CMethod->insertItem( tr( "Automatic" ) ); |
CMethod->insertItem( tr( "JPEG" ) ); |
CMethod->insertItem( tr( "Zip" ) ); |
CMethod->insertItem( tr( "None" ) ); |
CMethod->setEditable(false); |
CMethod->setCurrentItem(Optionen->CompressMethod); |
CBoxLayout->addWidget( CMethod, 0, 1 ); |
TextCom2 = new QLabel( CBox, "TextCom2" ); |
TextCom2->setText( tr( "Quality:" ) ); |
CBoxLayout->addWidget( TextCom2, 1, 0 ); |
CQualtity = new QComboBox( true, CBox, "CQualtity" ); |
CQualtity->clear(); |
CQualtity->insertItem( tr( "Maximum" ) ); |
CQualtity->insertItem( tr( "High" ) ); |
CQualtity->insertItem( tr( "Medium" ) ); |
CQualtity->insertItem( tr( "Low" ) ); |
CQualtity->insertItem( tr( "Minimum" ) ); |
CQualtity->setEditable(false); |
CQualtity->setCurrentItem(Optionen->Quality); |
CBoxLayout->addWidget( CQualtity, 1, 1 ); |
DSColor = new QCheckBox( CBox, "DSColor" ); |
DSColor->setText( tr( "Downsample Images to:" ) ); |
DSColor->setChecked(Optionen->RecalcPic); |
GroupBox2Layout->addWidget( DSColor, 1, 0 ); |
ValC = new QSpinBox( GroupBox2, "ValC" ); |
ValC->setSuffix( tr( " dpi" ) ); |
ValC->setMaxValue( 4000 ); |
ValC->setMinValue( 35 ); |
ValC->setValue(Optionen->PicRes); |
CBoxLayout->addWidget( DSColor, 2, 0 ); |
ValC = new QSpinBox( CBox, "ValC" ); |
ValC->setSuffix( tr( " dpi" ) ); |
ValC->setMaxValue( 4000 ); |
ValC->setMinValue( 35 ); |
ValC->setValue(Optionen->PicRes); |
ValC->setEnabled(DSColor->isChecked() ? true : false); |
GroupBox2Layout->addWidget( ValC, 1, 1, AlignLeft ); |
Compression = new QCheckBox( GroupBox2, "Compression" ); |
Compression->setText( tr( "Compress Text and Vector Graphics" ) ); |
Compression->setChecked(Optionen->Compress); |
GroupBox2Layout->addMultiCellWidget( Compression, 0, 0, 0, 1 ); |
tabLayout->addWidget( GroupBox2 ); |
Options->insertTab( tab, tr( "General" ) ); |
CBoxLayout->addWidget( ValC, 2, 1, AlignLeft ); |
tabLayout->addWidget( CBox ); |
Options->insertTab( tab, tr( "General" ) ); |
tab_3 = new QWidget( Options, "tab_3" ); |
tabLayout_3 = new QVBoxLayout( tab_3 ); |
tabLayout_3->setSpacing( 6 ); |
255,6 → 279,11 |
FontsToEmbed.append(Optionen->EmbedList[efo]); |
} |
} |
else |
{ |
EmbedFonts->setChecked(true); |
EmbedAll(); |
} |
Layout6->addWidget( EmbedList ); |
GroupFontLayout->addLayout( Layout6 ); |
tabLayout_3->addWidget( GroupFont ); |
/trunk/Scribus/scribus/util.cpp |
---|
98,7 → 98,7 |
QString ImageToTxt(QImage *im); |
QString ImageToCMYK(QImage *im); |
QString ImageToCMYK_PS(QImage *im, int pl, bool pre); |
void Convert2JPG(QString fn, QImage *image, bool isCMYK); |
void Convert2JPG(QString fn, QImage *image, int Quality, bool isCMYK); |
QString MaskToTxt(QImage *im, bool PDF = true); |
void Level2Layer(ScribusDoc *doc, struct Layer *ll, int Level); |
void BezierPoints(QPointArray *ar, QPoint n1, QPoint n2, QPoint n3, QPoint n4); |
388,7 → 388,7 |
Bild.load(fn); |
if (gray != 0) |
{ |
if (Bild.depth() == 8) |
if ((Bild.depth() == 8) && (Bild.isGrayscale())) |
*gray = true; |
else |
*gray = false; |
963,7 → 963,7 |
longjmp (myerr->setjmp_buffer, 1); |
} |
void Convert2JPG(QString fn, QImage *image, bool isCMYK) |
void Convert2JPG(QString fn, QImage *image, int Quality, bool isCMYK) |
{ |
struct jpeg_compress_struct cinfo; |
struct my_error_mgr jerr; |
997,7 → 997,8 |
cinfo.input_components = 3; |
} |
jpeg_set_defaults (&cinfo); |
jpeg_set_quality (&cinfo, 75, true); |
int qual[] = { 95, 85, 75, 50, 25 }; // These are the JPEG Quality settings 100 means best, 0 .. don't discuss |
jpeg_set_quality (&cinfo, qual[Quality], true); |
jpeg_start_compress (&cinfo, TRUE); |
row_pointer[0] = new uchar[cinfo.image_width*cinfo.input_components]; |
int w = cinfo.image_width; |
/trunk/Scribus/scribus/scribusdoc.h |
---|
280,6 → 280,8 |
bool Thumbnails; |
bool Articles; |
bool Compress; |
int CompressMethod; |
int Quality; |
bool RecalcPic; |
bool Bookmarks; |
int PicRes; |
/trunk/Scribus/scribus/libabout/about.cpp |
---|
54,7 → 54,7 |
tabLayout1->addWidget( PixmapLabel1 ); |
BuildID = new QLabel( tab, "BB" ); |
BuildID->setAlignment(Qt::AlignCenter); |
QString bu = tr("%1. %2 %3 ").arg(18).arg("February").arg(2004); |
QString bu = tr("%1. %2 %3 ").arg(19).arg("February").arg(2004); |
#ifdef HAVE_CMS |
bu += "C"; |
#else |
/trunk/Scribus/scribus/scribus.cpp |
---|
5878,6 → 5878,8 |
doc->PDF_Optionen.Datei = fn; |
doc->PDF_Optionen.Thumbnails = dia->CheckBox1->isChecked(); |
doc->PDF_Optionen.Compress = dia->Compression->isChecked(); |
doc->PDF_Optionen.CompressMethod = dia->CMethod->currentItem(); |
doc->PDF_Optionen.Quality = dia->CQualtity->currentItem(); |
doc->PDF_Optionen.Resolution = dia->Resolution->value(); |
doc->PDF_Optionen.EmbedList = dia->FontsToEmbed; |
doc->PDF_Optionen.RecalcPic = dia->DSColor->isChecked(); |
/trunk/Scribus/scribus/libprefs/prefs.cpp |
---|
23,9 → 23,9 |
\author Franz Schmid |
\date |
\brief Creates Preferences dialog and returns pointer to it |
\param d QWidget pointer to Preferences dialog widget |
\param Vor preV struct pointer |
\retval dia returned widget pointer |
\param d QWidget * to Preferences dialog widget |
\param Vor preV * struct |
\retval dia * widget pointer |
*/ |
void* Run(QWidget *d, preV *Vor) |
{ |
39,6 → 39,7 |
\date |
\brief Constructor for Preferences dialog box |
\param parent QWidget pointer to parent window |
\param Vor preV * struct |
\retval Preferences dialog |
*/ |
Preferences::Preferences( QWidget* parent, preV *Vor) |
/trunk/Scribus/scribus/plugins/svgimplugin/svgplugin.cpp |
---|
24,16 → 24,41 |
extern double Cwidth(ScribusDoc *doc, QString name, QString ch, int Siz, QString ch2 = " "); |
extern FPoint GetMaxClipF(FPointArray Clip); |
/*! |
\fn QString Name() |
\author Franz Schmid |
\date |
\brief Returns name of plugin |
\param None |
\retval QString containing name of plugin: Import SVG-Image... |
*/ |
QString Name() |
{ |
return QObject::tr("Import SVG-Image"); |
} |
/*! |
\fn int Type() |
\author Franz Schmid |
\date |
\brief Returns type of plugin |
\param None |
\retval int containing type of plugin (1: Extra, 2: Import, 3: Export, 4: ) |
*/ |
int Type() |
{ |
return 2; |
} |
/*! |
\fn void Run(QWidget *d, ScribusApp *plug) |
\author Franz Schmid |
\date |
\brief Run the SVG import |
\param d QWidget * |
\param plug ScribusApp * |
\retval None |
*/ |
void Run(QWidget *d, ScribusApp *plug) |
{ |
QString fileName; |
50,6 → 75,16 |
delete dia; |
} |
/*! |
\fn SVGPlug::SVGPlug( QWidget* parent, ScribusApp *plug, QString fName ) |
\author Franz Schmid |
\date |
\brief Create the SVG importer window |
\param parent QWidget * |
\param plug ScribusApp * |
\param fName QString |
\retval SVGPlug plugin |
*/ |
SVGPlug::SVGPlug( QWidget* parent, ScribusApp *plug, QString fName ) |
{ |
QString f = ""; |
85,6 → 120,14 |
QDir::setCurrent(CurDirP); |
} |
/*! |
\fn void SVGPlug::convert() |
\author Franz Schmid |
\date |
\brief |
\param None |
\retval None |
*/ |
void SVGPlug::convert() |
{ |
bool ret = false; |
144,6 → 187,14 |
Doku->loading = false; |
} |
/*! |
\fn void SVGPlug::addGraphicContext() |
\author Franz Schmid |
\date |
\brief |
\param None |
\retval None |
*/ |
void SVGPlug::addGraphicContext() |
{ |
SvgStyle *gc = new SvgStyle; |
152,6 → 203,14 |
m_gc.push( gc ); |
} |
/*! |
\fn void SVGPlug::setupTransform( const QDomElement &e ) |
\author Franz Schmid |
\date |
\brief |
\param e const QDomElement & |
\retval None |
*/ |
void SVGPlug::setupTransform( const QDomElement &e ) |
{ |
SvgStyle *gc = m_gc.current(); |
160,6 → 219,14 |
gc->matrix = mat * gc->matrix; |
} |
/*! |
\fn void SVGPlug::parseGroup(const QDomElement &e) |
\author Franz Schmid |
\date |
\brief |
\param e const QDomElement & |
\retval None |
*/ |
void SVGPlug::parseGroup(const QDomElement &e) |
{ |
QPtrList<PageItem> GElements; |
453,6 → 520,14 |
} |
} |
/*! |
\fn double SVGPlug::fromPercentage( const QString &s ) |
\author Franz Schmid |
\date |
\brief |
\param s const QString & |
\retval double |
*/ |
double SVGPlug::fromPercentage( const QString &s ) |
{ |
if( s.endsWith( "%" ) ) |
461,6 → 536,14 |
return s.toDouble(); |
} |
/*! |
\fn double SVGPlug::parseUnit(const QString &unit) |
\author Franz Schmid |
\date |
\brief |
\param unit const QString & |
\retval double |
*/ |
double SVGPlug::parseUnit(const QString &unit) |
{ |
bool ok = false; |
479,6 → 562,14 |
return value; |
} |
/*! |
\fn QWMatrix SVGPlug::parseTransform( const QString &transform ) |
\author Franz Schmid |
\date |
\brief |
\param transform const QString |
\retval QWMatrix |
*/ |
QWMatrix SVGPlug::parseTransform( const QString &transform ) |
{ |
QWMatrix result; |
540,6 → 631,15 |
return result; |
} |
/*! |
\fn const char * SVGPlug::getCoord( const char *ptr, double &number ) |
\author Franz Schmid |
\date |
\brief |
\param ptr const char * |
\param number double & |
\retval const char * |
*/ |
const char * SVGPlug::getCoord( const char *ptr, double &number ) |
{ |
int integer, exponent; |
603,6 → 703,15 |
return ptr; |
} |
/*! |
\fn bool SVGPlug::parseSVG( const QString &s, FPointArray *ite ) |
\author Franz Schmid |
\date |
\brief |
\param s const QString & |
\param ite FPointArray * |
\retval bool |
*/ |
bool SVGPlug::parseSVG( const QString &s, FPointArray *ite ) |
{ |
QString d = s; |
821,6 → 930,24 |
return ret; |
} |
/*! |
\fn void SVGPlug::calculateArc(FPointArray *ite, bool relative, double &curx, double &cury, double angle, double x, double y, double r1, double r2, bool largeArcFlag, bool sweepFlag) |
\author Franz Schmid |
\date |
\brief |
\param ite FPointArray * |
\param relative bool |
\param curx double & |
\param cury double & |
\param angle double |
\param x double |
\param y double |
\param r1 double |
\param r2 double |
\param largeArcFlag bool |
\param sweepFlag bool |
\retval None |
*/ |
void SVGPlug::calculateArc(FPointArray *ite, bool relative, double &curx, double &cury, double angle, double x, double y, double r1, double r2, bool largeArcFlag, bool sweepFlag) |
{ |
double sin_th, cos_th; |
930,6 → 1057,16 |
cury += y; |
} |
/*! |
\fn void SVGPlug::svgMoveTo(FPointArray *i, double x1, double y1) |
\author Franz Schmid |
\date |
\brief |
\param i FPointArray * |
\param x1 double |
\param y1 double |
\retval None |
*/ |
void SVGPlug::svgMoveTo(FPointArray *i, double x1, double y1) |
{ |
if (!FirstM) |
941,6 → 1078,16 |
PathLen = 0; |
} |
/*! |
\fn void SVGPlug::svgLineTo(FPointArray *i, double x1, double y1) |
\author Franz Schmid |
\date |
\brief |
\param i FPointArray * |
\param x1 double |
\param y1 double |
\retval None |
*/ |
void SVGPlug::svgLineTo(FPointArray *i, double x1, double y1) |
{ |
if ((!FirstM) && (WasM)) |
970,6 → 1117,20 |
PathLen += 4; |
} |
/*! |
\fn void SVGPlug::svgCurveToCubic(FPointArray *i, double x1, double y1, double x2, double y2, double x3, double y3) |
\author Franz Schmid |
\date |
\brief |
\param i FPointArray * |
\param x1 double |
\param y1 double |
\param x2 double |
\param y2 double |
\param x3 double |
\param y3 double |
\retval None |
*/ |
void SVGPlug::svgCurveToCubic(FPointArray *i, double x1, double y1, double x2, double y2, double x3, double y3) |
{ |
if ((!FirstM) && (WasM)) |
1001,6 → 1162,14 |
PathLen += 4; |
} |
/*! |
\fn void SVGPlug::svgClosePath(FPointArray *i) |
\author Franz Schmid |
\date |
\brief |
\param i FPointArray * |
\retval None |
*/ |
void SVGPlug::svgClosePath(FPointArray *i) |
{ |
if ((PathLen == 4) || (i->point(i->size()-2).x() != StartX) || (i->point(i->size()-2).y() != StartY)) |
1012,6 → 1181,14 |
} |
} |
/*! |
\fn QColor SVGPlug::parseColorN( const QString &rgbColor ) |
\author Franz Schmid |
\date |
\brief |
\param rgbColor const QString & |
\retval Qcolor |
*/ |
QColor SVGPlug::parseColorN( const QString &rgbColor ) |
{ |
int r, g, b; |
1019,6 → 1196,14 |
return QColor( r, g, b ); |
} |
/*! |
\fn QString SVGPlug::parseColor( const QString &s ) |
\author Franz Schmid |
\date |
\brief |
\param s const QString & |
\retval QString |
*/ |
QString SVGPlug::parseColor( const QString &s ) |
{ |
QColor c; |
1076,6 → 1261,16 |
return ret; |
} |
/*! |
\fn void SVGPlug::parsePA( SvgStyle *obj, const QString &command, const QString ¶ms ) |
\author Franz Schmid |
\date |
\brief |
\param obj SvgStyle * |
\param command const QString & |
\param params const QString & |
\retval None |
*/ |
void SVGPlug::parsePA( SvgStyle *obj, const QString &command, const QString ¶ms ) |
{ |
if( command == "fill" ) |
1218,6 → 1413,15 |
obj->FontSize = static_cast<int>(parseUnit(params) * 10.0); |
} |
/*! |
\fn void SVGPlug::parseStyle( SvgStyle *obj, const QDomElement &e ) |
\author Franz Schmid |
\date |
\brief |
\param obj SvgStyle * |
\param e const QDomElement & |
\retval None |
*/ |
void SVGPlug::parseStyle( SvgStyle *obj, const QDomElement &e ) |
{ |
SvgStyle *gc = m_gc.current(); |
1268,6 → 1472,15 |
return; |
} |
/*! |
\fn void SVGPlug::parseColorStops(GradientHelper *gradient, const QDomElement &e) |
\author Franz Schmid |
\date |
\brief |
\param gradient GradientHelper * |
\param e const QDomElement & |
\retval None |
*/ |
void SVGPlug::parseColorStops(GradientHelper *gradient, const QDomElement &e) |
{ |
QString Col = "Black"; |
1311,6 → 1524,14 |
} |
} |
/*! |
\fn void SVGPlug::parseGradient( const QDomElement &e ) |
\author Franz Schmid |
\date |
\brief |
\param e const QDomElement & |
\retval None |
*/ |
void SVGPlug::parseGradient( const QDomElement &e ) |
{ |
GradientHelper gradhelper; |
1361,6 → 1582,15 |
m_gradients.insert(e.attribute("id"), gradhelper); |
} |
/*! |
\fn void SVGPlug::parseText(PageItem *ite, const QDomElement &e) |
\author Franz Schmid |
\date |
\brief |
\param ite PageItem * |
\param e const QDomElement & |
\retval None |
*/ |
void SVGPlug::parseText(PageItem *ite, const QDomElement &e) |
{ |
struct Pti *hg; |
1463,6 → 1693,14 |
p.end(); |
} |
/*! |
\fn SVGPlug::~SVGPlug() |
\author Franz Schmid |
\date |
\brief Destructor |
\param None |
\retval None |
*/ |
SVGPlug::~SVGPlug() |
{ |
} |
/trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp |
---|
33,16 → 33,41 |
extern QString Path2Relative(QString Path); |
extern QImage LoadPict(QString fn, bool *gray = 0); |
/*! |
\fn QString Name() |
\author Franz Schmid |
\date |
\brief Returns name of plugin |
\param None |
\retval QString containing name of plugin: Save Page as SVG... |
*/ |
QString Name() |
{ |
return QObject::tr("Save Page as SVG..."); |
} |
/*! |
\fn int Type() |
\author Franz Schmid |
\date |
\brief Returns type of plugin |
\param None |
\retval int containing type of plugin (1: Extra, 2: Import, 3: Export, 4: ) |
*/ |
int Type() |
{ |
return 3; |
} |
/*! |
\fn void Run(QWidget *d, ScribusApp *plug) |
\author Franz Schmid |
\date |
\brief Run the SVG export |
\param d QWidget * |
\param plug ScribusApp * |
\retval None |
*/ |
void Run(QWidget *d, ScribusApp *plug) |
{ |
if (plug->HaveDoc) |
73,6 → 98,16 |
} |
} |
/*! |
\fn SVGExPlug::SVGExPlug( QWidget* parent, ScribusApp *plug, QString fName ) |
\author Franz Schmid |
\date |
\brief Create the SVG exporter window |
\param parent QWidget * |
\param plug ScribusApp * |
\param fName QString |
\retval SVGExPlug plugin |
*/ |
SVGExPlug::SVGExPlug( QWidget* parent, ScribusApp *plug, QString fName ) |
{ |
QDomDocument docu("svgdoc"); |
125,7 → 160,17 |
#endif |
} |
/*! |
\fn void SVGExPlug::ProcessPage(ScribusApp *plug, Page *Seite, QDomDocument *docu, QDomElement *elem) |
\author Franz Schmid |
\date |
\brief Process a page to export to SVG format |
\param plug ScribusApp |
\param Seite Page * |
\param docu QDomDocument * |
\param elem QDomElement * |
\retval None |
*/ |
void SVGExPlug::ProcessPage(ScribusApp *plug, Page *Seite, QDomDocument *docu, QDomElement *elem) |
{ |
QString tmp, trans, fill, stroke, strokeW, strokeLC, strokeLJ, strokeDA, gradi, Clipi, chx; |
494,6 → 539,14 |
} |
} |
/*! |
\fn QString SVGExPlug::SetClipPath(PageItem *ite) |
\author Franz Schmid |
\date |
\brief |
\param ite PageItem * |
\retval QString Clipping Path |
*/ |
QString SVGExPlug::SetClipPath(PageItem *ite) |
{ |
QString tmp = ""; |
526,6 → 579,14 |
return tmp; |
} |
/*! |
\fn QString SVGExPlug::FToStr(double c) |
\author Franz Schmid |
\date |
\brief Converts double to string |
\param c double |
\retval QString |
*/ |
QString SVGExPlug::FToStr(double c) |
{ |
QString cc; |
532,6 → 593,14 |
return cc.setNum(c); |
} |
/*! |
\fn QString SVGExPlug::IToStr(int c) |
\author Franz Schmid |
\date |
\brief Converts integer to QString |
\param c int |
\retval QString representation of value |
*/ |
QString SVGExPlug::IToStr(int c) |
{ |
QString cc; |
538,6 → 607,16 |
return cc.setNum(c); |
} |
/*! |
\fn void SVGExPlug::SetTextProps(QDomElement *tp, struct Pti *hl, ScribusApp *plug) |
\author Franz Schmid |
\date |
\brief Set text properties |
\param tp QDomElement * |
\param hl struct Pti * |
\param plug ScribusApp * |
\retval None |
*/ |
void SVGExPlug::SetTextProps(QDomElement *tp, struct Pti *hl, ScribusApp *plug) |
{ |
int chst = hl->cstyle & 127; |
567,6 → 646,16 |
} |
} |
/*! |
\fn QString SVGExPlug::SetFarbe(QString farbe, int shad, ScribusApp *plug) |
\author Franz Schmid |
\date |
\brief |
\param farbe QString |
\param shad int |
\param plug ScribusApp * |
\retval QString Colour settings |
*/ |
QString SVGExPlug::SetFarbe(QString farbe, int shad, ScribusApp *plug) |
{ |
int h, s, v, sneu; |
587,6 → 676,16 |
return tmp.name(); |
} |
/*! |
\fn QString SVGExPlug::GetMultiStroke(ScribusApp *plug, struct singleLine *sl, PageItem *Item) |
\author Franz Schmid |
\date |
\brief |
\param plug ScribusApp * |
\param sl struct singleLine * |
\param Item PageItem * |
\retval QString Stroke settings |
*/ |
QString SVGExPlug::GetMultiStroke(ScribusApp *plug, struct singleLine *sl, PageItem *Item) |
{ |
QString tmp = "fill:none; "; |
653,6 → 752,14 |
return tmp; |
} |
/*! |
\fn SVGExPlug::~SVGExPlug() |
\author Franz Schmid |
\date |
\brief Destructore |
\param None |
\retval None |
*/ |
SVGExPlug::~SVGExPlug() |
{ |
} |
/trunk/Scribus/scribus/plugins/printpreview/preview.cpp |
---|
21,16 → 21,41 |
extern QPixmap loadIcon(QString nam); |
/*! |
\fn QString Name() |
\author Franz Schmid |
\date |
\brief Returns name of plugin |
\param None |
\retval QString containing name of plugin: Print Preview |
*/ |
QString Name() |
{ |
return QObject::tr("Print Preview"); |
} |
/*! |
\fn int Type() |
\author Franz Schmid |
\date |
\brief Returns type of plugin |
\param None |
\retval int containing type of plugin (1: Extra, 2: Import, 3: Export, 4: ) |
*/ |
int Type() |
{ |
return 1; |
} |
/*! |
\fn void Run(QWidget *d, ScribusApp *plug) |
\author Franz Schmid |
\date |
\brief Run the print preview |
\param d QWidget * |
\param plug ScribusApp * |
\retval None |
*/ |
void Run(QWidget *d, ScribusApp *plug) |
{ |
if (plug->HaveDoc) |
41,6 → 66,15 |
} |
} |
/*! |
\fn PPreview::PPreview( QWidget* parent, ScribusApp *pl) |
\author Franz Schmid |
\date |
\brief Create the Print Preview window |
\param parent QWidget * |
\param pl ScribusApp * |
\retval PPreview window |
*/ |
PPreview::PPreview( QWidget* parent, ScribusApp *pl) : QDialog( parent, "Preview", true, 0 ) |
{ |
QString tmp; |
130,6 → 164,14 |
connect(PGSel, SIGNAL(GotoPage(int)), this, SLOT(ToSeite(int))); |
} |
/*! |
\fn void PPreview::ToSeite(int num) |
\author Franz Schmid |
\date |
\brief Jump to newly selected page and create the new preview |
\param num int Page Number |
\retval None |
*/ |
void PPreview::ToSeite(int num) |
{ |
int n = num-1; |
139,21 → 181,53 |
Anz->setPixmap(CreatePreview(n, 72)); |
} |
/*! |
\fn void PPreview::ToggleTextAA() |
\author Franz Schmid |
\date |
\brief Toggle Text anti-aliasing and create the new preview |
\param None |
\retval None |
*/ |
void PPreview::ToggleTextAA() |
{ |
Anz->setPixmap(CreatePreview(APage, 72)); |
} |
/*! |
\fn void PPreview::ToggleGr() |
\author Franz Schmid |
\date |
\brief Toggle Graphics anti-aliasing and create the new preview |
\param None |
\retval None |
*/ |
void PPreview::ToggleGr() |
{ |
Anz->setPixmap(CreatePreview(APage, 72)); |
} |
/*! |
\fn void PPreview::ToggleTr() |
\author Franz Schmid |
\date |
\brief Toggle transparency and create the new preview |
\param None |
\retval None |
*/ |
void PPreview::ToggleTr() |
{ |
Anz->setPixmap(CreatePreview(APage, 72)); |
} |
/*! |
\fn void PPreview::ToggleCMYK() |
\author Craig Bradney |
\date |
\brief When CMYK preview is toggled, (dis)enable the CMYK controls and create the new preview |
\param None |
\retval None |
*/ |
void PPreview::ToggleCMYK() |
{ |
bool c = EnableCMYK->isChecked() ? true : false; |
165,6 → 239,14 |
Anz->setPixmap(CreatePreview(APage, 72)); |
} |
/*! |
\fn void PPreview::ToggleCMYK_Colour() |
\author Craig Bradney |
\date |
\brief If CMYK preview is enabled, create a new preview with the new CMYK plate settings |
\param None |
\retval None |
*/ |
void PPreview::ToggleCMYK_Colour() |
{ |
if (EnableCMYK->isChecked()) |
171,6 → 253,15 |
Anz->setPixmap(CreatePreview(APage, 72)); |
} |
/*! |
\fn QPixmap PPreview::CreatePreview(int Seite, int Res) |
\author Franz Schmid |
\date |
\brief |
\param Seite int page number |
\param Res int |
\retval Bild QPixmap print preview |
*/ |
QPixmap PPreview::CreatePreview(int Seite, int Res) |
{ |
int ret = -1; |
/trunk/Scribus/scribus/libpdf/pdflib.cpp |
---|
41,7 → 41,7 |
extern QString CompressStr(QString *in); |
extern QString ImageToTxt(QImage *im); |
extern QString ImageToCMYK(QImage *im); |
extern void Convert2JPG(QString fn, QImage *image, bool isCMYK); |
extern void Convert2JPG(QString fn, QImage *image, int Quality, bool isCMYK); |
extern QString MaskToTxt(QImage *im, bool PDF = true); |
extern char *toHex( uchar u ); |
extern QString String2Hex(QString *in, bool lang = true); |
2777,6 → 2777,7 |
QChar tc; |
bool found = false; |
bool gray = false; |
bool alphaM = false; |
int ret = -1; |
int afl; |
double x2, y2, b, h, ax, ay, a2, a1, sxn, syn; |
2823,7 → 2824,7 |
loadText((Embedded ? InputProfiles[Options->ImageProf] : InputProfiles[Profil]), |
&dataP); |
PutDoc("<<\n"); |
if ((Options->Compress) && (CompAvail)) |
if ((Options->CompressMethod != 3) && (CompAvail)) |
{ |
PutDoc("/Filter /FlateDecode\n"); |
dataP = CompressStr(&dataP); |
2940,31 → 2941,22 |
} |
aufl = 1; |
} |
if (img.hasAlphaBuffer()) |
alphaM = true; |
if (inver) |
img.invertPixels(); |
if (Options->UseRGB) |
im = ImageToTxt(&img); |
else |
{ |
#ifdef HAVE_CMS |
if ((CMSuse) && (Options->UseProfiles2)) |
im = ImageToTxt(&img); |
else |
#endif |
im = ImageToCMYK(&img); |
} |
if (!Options->RecalcPic) |
{ |
sxn = sx * (1.0 / aufl); |
syn = sy * (1.0 / aufl); |
} |
if (img.hasAlphaBuffer()) |
if (alphaM) |
{ |
QImage iMask = img.createAlphaMask(); |
QString im2 = MaskToTxt(&iMask); |
StartObj(ObjCounter); |
ObjCounter++; |
if ((Options->Compress) && (CompAvail)) |
if ((Options->CompressMethod != 3) && (CompAvail)) |
im2 = CompressStr(&im2); |
PutDoc("<<\n/Type /XObject\n/Subtype /Image\n"); |
PutDoc("/Width "+IToStr(iMask.width())+"\n"); |
2971,15 → 2963,26 |
PutDoc("/Height "+IToStr(iMask.height())+"\n"); |
PutDoc("/ImageMask true\n/BitsPerComponent 1\n"); |
PutDoc("/Length "+IToStr(im2.length())+"\n"); |
if ((Options->Compress) && (CompAvail)) |
if ((Options->CompressMethod != 3) && (CompAvail)) |
PutDoc("/Filter /FlateDecode\n"); |
PutDoc(">>\nstream\n"+EncStream(&im2, ObjCounter-1)+"\nendstream\nendobj\n"); |
Seite.XObjects[ResNam+IToStr(ResCount)] = ObjCounter-1; |
ResCount++; |
} |
if (Options->UseRGB) |
im = ImageToTxt(&img); |
else |
{ |
#ifdef HAVE_CMS |
if ((CMSuse) && (Options->UseProfiles2)) |
im = ImageToTxt(&img); |
else |
#endif |
im = ImageToCMYK(&img); |
} |
StartObj(ObjCounter); |
ObjCounter++; |
if ((Options->Compress) && (CompAvail)) |
if (((Options->CompressMethod == 2) || (Options->CompressMethod == 0)) && (CompAvail)) |
im = CompressStr(&im); |
PutDoc("<<\n/Type /XObject\n/Subtype /Image\n"); |
PutDoc("/Width "+IToStr(img.width())+"\n"); |
2999,7 → 3002,7 |
else |
{ |
#endif |
if ((gray) && (Options->UseRGB)) |
if ((gray) && (Options->UseRGB) && (ext == "jpg") && (!Options->RecalcPic)) |
PutDoc("/ColorSpace /DeviceGray\n"); |
else |
PutDoc(Options->UseRGB ? "/ColorSpace /DeviceRGB\n" : "/ColorSpace /DeviceCMYK\n"); |
3016,21 → 3019,45 |
} |
else |
{ |
QString tmpFile = QString(getenv("HOME"))+"/.scribus/sc.jpg"; |
if ((Options->UseRGB) || (Options->UseProfiles2)) |
Convert2JPG(tmpFile, &img, false); |
else |
Convert2JPG(tmpFile, &img, true); |
im = ""; |
loadText(tmpFile, &im); |
system("rm -f "+tmpFile); |
int cm = Options->CompressMethod; |
if ((Options->CompressMethod == 1) || (Options->CompressMethod == 0)) |
{ |
QString tmpFile = QString(getenv("HOME"))+"/.scribus/sc.jpg"; |
if ((Options->UseRGB) || (Options->UseProfiles2)) |
Convert2JPG(tmpFile, &img, Options->Quality, false); |
else |
Convert2JPG(tmpFile, &img, Options->Quality, true); |
if (Options->CompressMethod == 0) |
{ |
QFileInfo fi(tmpFile); |
if (fi.size() < im.length()) |
{ |
im = ""; |
loadText(tmpFile, &im); |
cm = 1; |
} |
else |
cm = 2; |
} |
else |
{ |
im = ""; |
loadText(tmpFile, &im); |
cm = 1; |
} |
system("rm -f "+tmpFile); |
} |
PutDoc("/BitsPerComponent 8\n"); |
PutDoc("/Length "+IToStr(im.length())+"\n"); |
if (img.hasAlphaBuffer()) |
if (alphaM) |
PutDoc("/Mask "+IToStr(ObjCounter-2)+" 0 R\n"); |
if ((Options->Compress) && (CompAvail)) |
PutDoc("/Filter /DCTDecode\n"); |
// PutDoc("/Filter /FlateDecode\n"); |
if (CompAvail) |
{ |
if (cm == 1) |
PutDoc("/Filter /DCTDecode\n"); |
else |
PutDoc("/Filter /FlateDecode\n"); |
} |
} |
PutDoc(">>\nstream\n"+EncStream(&im, ObjCounter-1)+"\nendstream\nendobj\n"); |
Seite.XObjects[ResNam+IToStr(ResCount)] = ObjCounter-1; |
/trunk/Scribus/scribus/scribusdoc.cpp |
---|
110,6 → 110,8 |
PDF_Optionen.Thumbnails = false; |
PDF_Optionen.Articles = false; |
PDF_Optionen.Compress = true; |
PDF_Optionen.CompressMethod = 0; |
PDF_Optionen.Quality = 0; |
PDF_Optionen.RecalcPic = false; |
PDF_Optionen.Bookmarks = false; |
PDF_Optionen.PicRes = 300; |
/trunk/Scribus/scribus/pdfopts.h |
---|
43,11 → 43,16 |
QLabel* TextLabel1; |
QTabWidget* Options; |
QWidget* tab; |
QSpinBox* ValC; |
QSpinBox* Resolution; |
QCheckBox* DSColor; |
QCheckBox* Article; |
QCheckBox* Compression; |
QCheckBox* DSColor; |
QSpinBox* ValC; |
QGroupBox* CBox; |
QLabel* TextCom1; |
QLabel* TextCom2; |
QComboBox* CQualtity; |
QComboBox* CMethod; |
QToolButton* FileC; |
QPushButton* OK; |
QPushButton* Cancel; |
54,7 → 59,6 |
QLineEdit* Datei; |
BookMView *BView; |
QGroupBox* GroupBox1; |
QGroupBox* GroupBox2; |
QLabel* TextLabel2; |
QComboBox* ComboBox1; |
QLabel* TextLabel1x; |
168,6 → 172,7 |
void EnablePGI2(); |
protected: |
QGridLayout* CBoxLayout; |
QVBoxLayout* PDFOptsLayout; |
QHBoxLayout* Layout5; |
QVBoxLayout* tabLayout; |
/trunk/Scribus/scribus/scribusXml.cpp |
---|
743,7 → 743,7 |
QFileInfo efp(OB.An_Extern); |
OB.An_Extern = efp.absFilePath(); |
} |
OB.AnZiel = QStoInt(obj.attribute("ANZIEL","0")); |
OB.AnZiel = QStoInt(obj.attribute("ANZIEL","0")); |
OB.AnName = obj.attribute("ANNAME",""); |
OB.AnToolTip = obj.attribute("ANTOOLTIP",""); |
OB.AnRollOver = obj.attribute("ANROLL",""); |
1163,6 → 1163,8 |
doc->PDF_Optionen.Articles = static_cast<bool>(QStoInt(pg.attribute("Articles"))); |
doc->PDF_Optionen.Thumbnails = static_cast<bool>(QStoInt(pg.attribute("Thumbnails"))); |
doc->PDF_Optionen.Compress = static_cast<bool>(QStoInt(pg.attribute("Compress"))); |
doc->PDF_Optionen.CompressMethod = QStoInt(pg.attribute("CMethod","0")); |
doc->PDF_Optionen.Quality = QStoInt(pg.attribute("Quality","0")); |
doc->PDF_Optionen.RecalcPic = static_cast<bool>(QStoInt(pg.attribute("RecalcPic"))); |
doc->PDF_Optionen.Bookmarks = static_cast<bool>(QStoInt(pg.attribute("Bookmarks"))); |
doc->PDF_Optionen.PresentMode = static_cast<bool>(QStoInt(pg.attribute("PresentMode"))); |
2966,6 → 2968,8 |
pdf.setAttribute("Articles", static_cast<int>(doc->PDF_Optionen.Articles)); |
pdf.setAttribute("Bookmarks", static_cast<int>(doc->PDF_Optionen.Bookmarks)); |
pdf.setAttribute("Compress", static_cast<int>(doc->PDF_Optionen.Compress)); |
pdf.setAttribute("CMethod", doc->PDF_Optionen.CompressMethod); |
pdf.setAttribute("Quality", doc->PDF_Optionen.Quality); |
pdf.setAttribute("PresentMode", static_cast<int>(doc->PDF_Optionen.PresentMode)); |
pdf.setAttribute("RecalcPic", static_cast<int>(doc->PDF_Optionen.RecalcPic)); |
pdf.setAttribute("RGBMode", static_cast<int>(doc->PDF_Optionen.UseRGB)); |