Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 110 → Rev 111

/trunk/Scribus/ChangeLogCVS
1,4 → 1,8
Changes since Version 1.1.2
22.11.2003 Added Group/Ungroup Items to Right Mouse Click Context Menu.
The Fontsize is now a float, you can have now Fontsize like 12.3 pt
Managed Guides is now available for Template Pages too.
21.11.2003 The Linewith of a Textframe is now honoured in the Distances of the
Text to the Frameborders when the Borderline is visible.
 
/trunk/Scribus/scribus/mpalette.h
132,7 → 132,7
MSpinBox* DRight;
QCheckBox* NormText2;
FontCombo* Fonts;
QSpinBox* Size;
MSpinBox* Size;
QToolButton* Revert;
QToolButton* Underline;
QButtonGroup* ButtonGroup1;
/trunk/Scribus/scribus/edit1format.h
45,7 → 45,7
QGroupBox* GroupFont;
QLabel* TextF1;
FontCombo* FontC;
QSpinBox* SizeC;
MSpinBox* SizeC;
QLabel* TextF2;
QPushButton* Cancel;
QPushButton* OkButton;
/trunk/Scribus/scribus/mpalette.cpp
427,7 → 427,7
Text20 = new QLabel( page_3, "Text20" );
Text20->setText(tr("Size:"));
layout41->addWidget( Text20, 1, 0 );
Size = new QSpinBox( page_3, "Fontsize:" );
Size = new MSpinBox( page_3, 1 );
Size->setPrefix( tr( "" ) );
Size->setSuffix( tr( " pt" ) );
Size->setMaxValue( 3000 );
969,7 → 969,7
ScaleX->setMinValue( 1 );
LXpos->setMaxValue( 300000 );
LXpos->setMinValue( -300000 );
Size->setMaxValue( 1024 );
Size->setMaxValue( 10240 );
Size->setMinValue( 1 );
LineSp->setMaxValue( 3000 );
LineSp->setMinValue( 1 );
983,6 → 983,7
Height->setDecimals(100);
Rot->setDecimals(100);
Extra->setDecimals(10);
Size->setDecimals(10);
LineSp->setDecimals(10);
LXpos->setDecimals(100);
LYpos->setDecimals(100);
/trunk/Scribus/scribus/util.cpp
696,18 → 696,18
Foi* fo = (*doc->AllFonts)[name];
if (fo->CharWidth.contains(c1))
{
w = fo->CharWidth[c1]*Siz;
w = fo->CharWidth[c1]*(Siz / 10.0);
if (fo->HasKern)
{
uint cl = FT_Get_Char_Index(doc->FFonts[name], c1);
uint cr = FT_Get_Char_Index(doc->FFonts[name], c2);
FT_Get_Kerning(doc->FFonts[name], cl, cr, ft_kerning_unscaled, &delta);
w += delta.x / fo->uniEM * Siz;
w += delta.x / fo->uniEM * (Siz / 10.0);
}
return w;
}
else
return static_cast<double>(Siz);
return static_cast<double>(Siz / 10.0);
}
 
QPointArray RegularPolygon(double w, double h, uint c, bool star, double factor, double rota)
/trunk/Scribus/scribus/edit1format.cpp
46,11 → 46,12
}
 
GroupFontLayout->addWidget( FontC, 0, 1 );
SizeC = new QSpinBox( GroupFont, "SizeC" );
SizeC = new MSpinBox( GroupFont, 1 );
SizeC->setMinimumSize( QSize( 70, 22 ) );
SizeC->setSuffix( tr( " pt" ) );
SizeC->setMinValue(1);
SizeC->setMaxValue(512);
SizeC->setMaxValue(5120);
SizeC->setLineStep(10);
SizeC->setValue(vor->FontSize);
 
GroupFontLayout->addWidget( SizeC, 1, 1 );
229,7 → 230,7
 
void EditStyle::FontChange(int val)
{
LineSpVal->setValue(static_cast<int>(((val * AutoVal / 100) + val) * 10));
LineSpVal->setValue(static_cast<int>((val * AutoVal / 100) + val));
}
 
void EditStyle::Verlassen()
/trunk/Scribus/scribus/story.cpp
70,12 → 70,29
if (c == 1)
{
tt = (SEditor*)cellWidget(r, 1);
if ((k->key() == Key_Left) || (k->key() == Key_Right) || (k->key() == Key_Down) || (k->key() == Key_Up))
if ((k->key() == Key_Prior) || (k->key() == Key_Next))
return;
if ((k->key() == Key_Left)
|| (k->key() == Key_Right)
|| (k->key() == Key_Down)
|| (k->key() == Key_Up)
|| (k->key() == Key_Home)
|| (k->key() == Key_End))
{
QTextEdit::CursorAction move;
tt->getCursorPosition(&p, &i);
switch (k->key())
{
case Key_Home:
tt = (SEditor*)cellWidget(0, 1);
setCurrentCell(0, 1);
move = QTextEdit::MoveLineStart;
break;
case Key_End:
tt = (SEditor*)cellWidget(n-1, 1);
setCurrentCell(n-1, 1);
move = QTextEdit::MoveEnd;
break;
case Key_Left:
if ((i == 0) && (r > 0))
{
/trunk/Scribus/scribus/page.h
312,6 → 312,8
void MoveObj(uint, uint, uint);
void UpdtObj(uint, uint);
void AddObj(uint, uint);
void DoGroup();
void DoUnGroup();
};
 
#endif
/trunk/Scribus/scribus/pageitem.cpp
80,7 → 80,7
FrameType = 0;
IFont = Doc->Dfont;
ISize = Doc->Dsize;
LineSp = (Doc->Dsize * static_cast<double>(Doc->AutoLine) / 100) + Doc->Dsize;
LineSp = ((Doc->Dsize / 10.0) * static_cast<double>(Doc->AutoLine) / 100) + (Doc->Dsize / 10.0);
Doc->Vorlagen[0].LineSpa = LineSp;
CurX = 0;
CurY = 0;
636,8 → 636,8
else
wide = Cwidth(Doc, hl->cfont, chx2, chs);
wide = wide * (hl->cscale / 100.0);
desc = static_cast<int>(-(*Doc->AllFonts)[hl->cfont]->numDescender * chs);
asce = static_cast<int>((*Doc->AllFonts)[hl->cfont]->numAscent * chs);
desc = static_cast<int>(-(*Doc->AllFonts)[hl->cfont]->numDescender * (chs / 10.0));
asce = static_cast<int>((*Doc->AllFonts)[hl->cfont]->numAscent * (chs / 10.0));
if (LiList.isEmpty())
{
pt1 = QPoint(static_cast<int>(CurX), static_cast<int>(CurY+desc+BExtra+lineCorr));
659,7 → 659,6
}
}
}
// CurX += Extra;
}
hl->xp = CurX+hl->cextra;
hl->yp = CurY;
874,8 → 873,8
if ((Zli2->Sele) && (Doc->AppMode == 7) && (Select))
{
wide = Zli2->wide;
desc = static_cast<int>((*Doc->AllFonts)[Zli2->ZFo]->numDescender * -Zli2->Siz);
asce = static_cast<int>((*Doc->AllFonts)[Zli2->ZFo]->numAscent * Zli2->Siz);
desc = static_cast<int>((*Doc->AllFonts)[Zli2->ZFo]->numDescender * (-Zli2->Siz / 10.0));
asce = static_cast<int>((*Doc->AllFonts)[Zli2->ZFo]->numAscent * (Zli2->Siz / 10.0));
p->setFillMode(1);
p->setBrush(darkBlue);
if (!Doc->RePos)
961,8 → 960,8
if ((Zli2->Sele) && (Doc->AppMode == 7) && (Select))
{
wide = Zli2->wide;
desc = static_cast<int>((*Doc->AllFonts)[Zli2->ZFo]->numDescender * -Zli2->Siz);
asce = static_cast<int>((*Doc->AllFonts)[Zli2->ZFo]->numAscent * Zli2->Siz);
desc = static_cast<int>((*Doc->AllFonts)[Zli2->ZFo]->numDescender * (-Zli2->Siz / 10.0));
asce = static_cast<int>((*Doc->AllFonts)[Zli2->ZFo]->numAscent * (Zli2->Siz / 10.0));
p->setFillMode(1);
p->setBrush(darkBlue);
if (!Doc->RePos)
1361,7 → 1360,7
 
void PageItem::SetZeichAttr(struct Pti *hl, int *chs, QString *chx)
{
int asce = static_cast<int>((*Doc->AllFonts)[hl->cfont]->numAscent * hl->csize);
int asce = static_cast<int>((*Doc->AllFonts)[hl->cfont]->numAscent * (hl->csize / 10.0));
int chst = hl->cstyle & 127;
if (chst != 0)
{
1373,7 → 1372,7
if (chst & 2)
{
CurY += asce * Doc->VTief / 100;
*chs = QMAX(hl->csize * Doc->VTiefSc / 100, 1);
*chs = QMAX(static_cast<int>(hl->csize * Doc->VTiefSc / 100), 1);
}
if (chst & 64)
{
1393,7 → 1392,7
ccx = " ";
if (ccx == QChar(13))
return;
double csi = static_cast<double>(hl->Siz) / 10.0;
double csi = static_cast<double>(hl->Siz) / 100.0;
uint chr = ccx[0].unicode();
if ((*Doc->AllFonts)[hl->ZFo]->CharWidth.contains(chr))
{
1413,10 → 1412,10
chma.translate(-hl->wide, 0);
gly.map(chma);
chma = QWMatrix();
chma.translate(hl->xco, hl->yco-hl->Siz);
chma.translate(hl->xco, hl->yco-(hl->Siz / 10.0));
}
else
chma.translate(hl->xco, hl->yco-hl->Siz);
chma.translate(hl->xco, hl->yco-(hl->Siz / 10.0));
gly.map(chma);
p->setFillMode(1);
p->setupPolygon(&gly);
1424,7 → 1423,7
p->fillPath();
if ((hl->Style & 4) && (hl->Farb2 != "None"))
{
p->setLineWidth((*Doc->AllFonts)[hl->ZFo]->strokeWidth * hl->Siz / 2);
p->setLineWidth((*Doc->AllFonts)[hl->ZFo]->strokeWidth * (hl->Siz / 10.0) / 2);
p->strokePath();
}
}
1431,16 → 1430,16
if (hl->Style & 16)
{
p->setPen(p->brush());
double st = (*Doc->AllFonts)[hl->ZFo]->strikeout_pos * hl->Siz;
p->setLineWidth(QMAX((*Doc->AllFonts)[hl->ZFo]->strokeWidth * hl->Siz, 1));
double st = (*Doc->AllFonts)[hl->ZFo]->strikeout_pos * (hl->Siz / 10.0);
p->setLineWidth(QMAX((*Doc->AllFonts)[hl->ZFo]->strokeWidth * (hl->Siz / 10.0), 1));
p->drawLine(FPoint(hl->xco-hl->kern, hl->yco-st), FPoint(hl->xco+hl->wide, hl->yco-st));
}
if (hl->Style & 8)
{
double st = (*Doc->AllFonts)[hl->ZFo]->underline_pos * hl->Siz;
double st = (*Doc->AllFonts)[hl->ZFo]->underline_pos * (hl->Siz / 10.0);
QString dummy;
p->setPen(p->brush());
p->setLineWidth(QMAX((*Doc->AllFonts)[hl->ZFo]->strokeWidth * hl->Siz, 1));
p->setLineWidth(QMAX((*Doc->AllFonts)[hl->ZFo]->strokeWidth * (hl->Siz / 10.0), 1));
if ((gly.size() > 4) && (ccx != QChar(32)))
p->drawUnderline(FPoint(hl->xco-hl->kern, hl->yco-st), FPoint(hl->xco+hl->wide, hl->yco-st), false, &dummy);
else
1452,7 → 1451,7
p->setLineWidth(1);
p->setPen(black);
p->setFillMode(0);
p->drawRect(hl->xco, hl->yco-hl->Siz, hl->Siz*(hl->scale / 100.0), hl->Siz);
p->drawRect(hl->xco, hl->yco-(hl->Siz / 10.0), (hl->Siz / 10.0)*(hl->scale / 100.0), (hl->Siz / 10.0));
}
}
 
1655,7 → 1654,7
else
Text += Ptext.at(a)->ch+"\t";
Text += Ptext.at(a)->cfont+"\t";
Text += QString::number(Ptext.at(a)->csize)+"\t";
Text += QString::number(Ptext.at(a)->csize / 10.0)+"\t";
Text += Ptext.at(a)->ccolor+"\t";
Text += QString::number(Ptext.at(a)->cextra)+"\t";
Text += QString::number(Ptext.at(a)->cshade)+'\t';
/trunk/Scribus/scribus/scribusview.cpp
1140,7 → 1140,7
p->PS_save();
if (ite->Reverse)
{
p->PS_translate(hl->xp, (hl->yp - tsz) * -1);
p->PS_translate(hl->xp, (hl->yp - (tsz / 10.0)) * -1);
p->PS_scale(-1, 1);
if (d < ite->MaxChars-1)
{
1154,7 → 1154,7
p->PS_translate(wideR, 0);
}
else
p->PS_translate(hl->xp, (hl->yp - tsz) * -1);
p->PS_translate(hl->xp, (hl->yp - (tsz / 10.0)) * -1);
if (hl->cscale != 100)
p->PS_scale(hl->cscale / 100.0, 1);
if (hl->ccolor != "None")
1161,7 → 1161,7
{
SetFarbe(hl->ccolor, hl->cshade, &h, &s, &v, &k);
p->PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
p->PS_showSub(chr, (*Doc->AllFonts)[hl->cfont]->RealName(), tsz, false);
p->PS_showSub(chr, (*Doc->AllFonts)[hl->cfont]->RealName(), tsz / 10.0, false);
}
p->PS_restore();
}
1168,7 → 1168,7
}
else
{
p->PS_selectfont(hl->cfont, tsz);
p->PS_selectfont(hl->cfont, tsz / 10.0);
if (hl->ccolor != "None")
{
SetFarbe(hl->ccolor, hl->cshade, &h, &s, &v, &k);
1214,7 → 1214,7
{
FPointArray gly = (*Doc->AllFonts)[hl->cfont]->GlyphArray[chr].Outlines.copy();
QWMatrix chma;
chma.scale(tsz / 10.0, tsz / 10.0);
chma.scale(tsz / 100.0, tsz / 100.0);
gly.map(chma);
chma = QWMatrix();
chma.scale(hl->cscale / 100.0, 1);
1229,7 → 1229,7
if (hl->cstroke != "None")
{
p->PS_save();
p->PS_setlinewidth(QMAX((*Doc->AllFonts)[hl->cfont]->strokeWidth / 2 * tsz, 1));
p->PS_setlinewidth(QMAX((*Doc->AllFonts)[hl->cfont]->strokeWidth / 2 * (tsz / 10.0), 1));
p->PS_setdash(SolidLine, FlatCap, MiterJoin);
p->PS_translate(hl->xp, (hl->yp - tsz) * -1);
SetFarbe(hl->cstroke, hl->cshade2, &h, &s, &v, &k);
1244,7 → 1244,7
if (hl->cstyle & 16)
{
double Ulen = Cwidth(Doc, hl->cfont, chx, hl->csize) * (hl->cscale / 100.0);
double Upos = (*Doc->AllFonts)[hl->cfont]->strikeout_pos * tsz;
double Upos = (*Doc->AllFonts)[hl->cfont]->strikeout_pos * (tsz / 10.0);
if (hl->ccolor != "None")
{
p->PS_setdash(SolidLine, FlatCap, MiterJoin);
1251,7 → 1251,7
SetFarbe(hl->ccolor, hl->cshade, &h, &s, &v, &k);
p->PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
}
p->PS_setlinewidth((*Doc->AllFonts)[hl->cfont]->strokeWidth * tsz);
p->PS_setlinewidth((*Doc->AllFonts)[hl->cfont]->strokeWidth * (tsz / 10.0));
p->PS_moveto(hl->xp, -hl->yp+Upos);
p->PS_lineto(hl->xp+Ulen, -hl->yp+Upos);
p->PS_stroke();
1267,7 → 1267,7
{
FPointArray gly = (*Doc->AllFonts)[hl->cfont]->GlyphArray[chr].Outlines.copy();
QWMatrix chma;
chma.scale(tsz / 10.0, tsz / 10.0);
chma.scale(tsz / 100.0, tsz / 100.0);
gly.map(chma);
chma = QWMatrix();
chma.scale(hl->cscale / 100.0, 1);
1275,7 → 1275,7
if (hl->ccolor != "None")
{
p->PS_save();
p->PS_translate(hl->xp+wide, (hl->yp - tsz) * -1);
p->PS_translate(hl->xp+wide, (hl->yp - (tsz / 10.0)) * -1);
SetFarbe(hl->ccolor, hl->cshade, &h, &s, &v, &k);
p->PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
SetClipPath(p, &gly);
1291,15 → 1291,15
ite->SetZeichAttr(hl, &chs, &chx);
double csi = chs / 10.0;
double wid = Cwidth(Doc, hl->cfont, chx, chs) * (hl->cscale / 100.0);
QPixmap pgPix(static_cast<int>(wid), hl->csize);
ScPainter *painter = new ScPainter(&pgPix, static_cast<int>(wid), hl->csize);
QPixmap pgPix(static_cast<int>(wid), static_cast<int>(hl->csize / 10.0));
ScPainter *painter = new ScPainter(&pgPix, static_cast<int>(wid), static_cast<int>(hl->csize / 10.0));
QString psSt = "1 -1 scale\n";
uint chr = chx[0].unicode();
if ((*Doc->AllFonts)[hl->cfont]->CharWidth.contains(chr))
{
FPointArray gly = (*Doc->AllFonts)[hl->cfont]->GlyphArray[chr].Outlines.copy();
double st = (*Doc->AllFonts)[hl->cfont]->underline_pos * chs;
painter->setLineWidth(QMAX((*Doc->AllFonts)[hl->cfont]->strokeWidth * chs, 1));
double st = (*Doc->AllFonts)[hl->cfont]->underline_pos * csi;
painter->setLineWidth(QMAX((*Doc->AllFonts)[hl->cfont]->strokeWidth * csi, 1));
if (gly.size() < 4)
{
gly.resize(0);
1309,13 → 1309,13
gly.addPoint(FPoint(1,0));
}
QWMatrix chma;
chma.scale(csi, csi);
chma.scale(csi / 10.0, csi / 10.0);
gly.map(chma);
chma = QWMatrix();
chma.scale(hl->cscale / 100.0, 1);
gly.map(chma);
painter->setupPolygon(&gly);
painter->drawUnderline(FPoint(0-hl->cextra, chs-st), FPoint(wid, chs-st), true, &psSt);
painter->drawUnderline(FPoint(0-hl->cextra, csi-st), FPoint(wid, csi-st), true, &psSt);
p->PS_save();
if (ite->Reverse)
{
1626,7 → 1626,7
tsz = hl->csize * Doc->VHochSc / 100;
if (hl->cstyle & 2)
tsz = hl->csize * Doc->VHochSc / 100;
if (((*Doc->AllFonts)[hl->cfont]->isOTF) || ((*Doc->AllFonts)[hl->cfont]->Subset))
if (((*Doc->AllFonts)[hl->cfont]->isOTF) || ((*Doc->AllFonts)[hl->cfont]->Subset))
{
uint chr = chx[0].unicode();
if (((*Doc->AllFonts)[hl->cfont]->CharWidth.contains(chr)) && (chr != 32))
1634,7 → 1634,7
p->PS_save();
if (c->Reverse)
{
p->PS_translate(hl->xp, (hl->yp - tsz) * -1);
p->PS_translate(hl->xp, (hl->yp - (tsz / 10.0)) * -1);
p->PS_scale(-1, 1);
if (d < c->MaxChars-1)
{
1648,7 → 1648,7
p->PS_translate(wideR, 0);
}
else
p->PS_translate(hl->xp, (hl->yp - tsz) * -1);
p->PS_translate(hl->xp, (hl->yp - (tsz / 10.0)) * -1);
if (hl->cscale != 100)
p->PS_scale(hl->cscale / 100.0, 1);
if (hl->ccolor != "None")
1655,7 → 1655,7
{
SetFarbe(hl->ccolor, hl->cshade, &h, &s, &v, &k);
p->PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
p->PS_showSub(chr, (*Doc->AllFonts)[hl->cfont]->RealName(), tsz, false);
p->PS_showSub(chr, (*Doc->AllFonts)[hl->cfont]->RealName(), tsz / 10.0, false);
}
p->PS_restore();
}
1662,7 → 1662,7
}
else
{
p->PS_selectfont(hl->cfont, tsz);
p->PS_selectfont(hl->cfont, tsz / 10.0);
if (hl->ccolor != "None")
{
SetFarbe(hl->ccolor, hl->cshade, &h, &s, &v, &k);
1708,7 → 1708,7
{
FPointArray gly = (*Doc->AllFonts)[hl->cfont]->GlyphArray[chr].Outlines.copy();
QWMatrix chma;
chma.scale(tsz / 10.0, tsz / 10.0);
chma.scale(tsz / 100.0, tsz / 100.0);
gly.map(chma);
chma = QWMatrix();
chma.scale(hl->cscale / 100.0, 1);
1723,9 → 1723,9
if (hl->cstroke != "None")
{
p->PS_save();
p->PS_setlinewidth(QMAX((*Doc->AllFonts)[hl->cfont]->strokeWidth / 2 * tsz, 1));
p->PS_setlinewidth(QMAX((*Doc->AllFonts)[hl->cfont]->strokeWidth / 2 * (tsz / 10.0), 1));
p->PS_setdash(SolidLine, FlatCap, MiterJoin);
p->PS_translate(hl->xp, (hl->yp - tsz) * -1);
p->PS_translate(hl->xp, (hl->yp - (tsz / 10.0)) * -1);
SetFarbe(hl->cstroke, hl->cshade2, &h, &s, &v, &k);
p->PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
SetClipPath(p, &gly);
1741,15 → 1741,15
c->SetZeichAttr(hl, &chs, &chx);
double csi = chs / 10.0;
double wid = Cwidth(Doc, hl->cfont, chx, chs) * (hl->cscale / 100.0);
QPixmap pgPix(hl->csize, static_cast<int>(wid));
ScPainter *painter = new ScPainter(&pgPix, hl->csize, static_cast<int>(wid));
QPixmap pgPix(static_cast<int>(wid), static_cast<int>(hl->csize / 10.0));
ScPainter *painter = new ScPainter(&pgPix, static_cast<int>(wid), static_cast<int>(hl->csize / 10.0));
QString psSt = "1 -1 scale\n";
uint chr = chx[0].unicode();
if ((*Doc->AllFonts)[hl->cfont]->CharWidth.contains(chr))
{
FPointArray gly = (*Doc->AllFonts)[hl->cfont]->GlyphArray[chr].Outlines.copy();
double st = (*Doc->AllFonts)[hl->cfont]->underline_pos * chs;
painter->setLineWidth(QMAX((*Doc->AllFonts)[hl->cfont]->strokeWidth * chs, 1));
double st = (*Doc->AllFonts)[hl->cfont]->underline_pos * csi;
painter->setLineWidth(QMAX((*Doc->AllFonts)[hl->cfont]->strokeWidth * csi, 1));
if (gly.size() < 4)
{
gly.resize(0);
1759,13 → 1759,13
gly.addPoint(FPoint(1,0));
}
QWMatrix chma;
chma.scale(csi, csi);
chma.scale(csi / 10.0, csi / 10.0);
gly.map(chma);
chma = QWMatrix();
chma.scale(hl->cscale / 100.0, 1);
gly.map(chma);
painter->setupPolygon(&gly);
painter->drawUnderline(FPoint(0-hl->cextra, chs-st), FPoint(wid, chs-st), true, &psSt);
painter->drawUnderline(FPoint(0-hl->cextra, csi-st), FPoint(wid, csi-st), true, &psSt);
p->PS_save();
if (c->Reverse)
{
1790,7 → 1790,7
if (hl->cstyle & 16)
{
double Ulen = Cwidth(Doc, hl->cfont, chx, hl->csize) * (hl->cscale / 100.0);
double Upos = (*Doc->AllFonts)[hl->cfont]->strikeout_pos * tsz;
double Upos = (*Doc->AllFonts)[hl->cfont]->strikeout_pos * (tsz / 10.0);
if (hl->ccolor != "None")
{
p->PS_setdash(SolidLine, FlatCap, MiterJoin);
1797,7 → 1797,7
SetFarbe(hl->ccolor, hl->cshade, &h, &s, &v, &k);
p->PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
}
p->PS_setlinewidth((*Doc->AllFonts)[hl->cfont]->strokeWidth * tsz);
p->PS_setlinewidth((*Doc->AllFonts)[hl->cfont]->strokeWidth * (tsz / 10.0));
p->PS_moveto(hl->xp, -hl->yp+Upos);
p->PS_lineto(hl->xp+Ulen, -hl->yp+Upos);
p->PS_stroke();
1813,7 → 1813,7
{
FPointArray gly = (*Doc->AllFonts)[hl->cfont]->GlyphArray[chr].Outlines.copy();
QWMatrix chma;
chma.scale(tsz / 10.0, tsz / 10.0);
chma.scale(tsz / 100.0, tsz / 100.0);
gly.map(chma);
chma = QWMatrix();
chma.scale(hl->cscale / 100.0, 1);
1821,7 → 1821,7
if (hl->ccolor != "None")
{
p->PS_save();
p->PS_translate(hl->xp+wide, (hl->yp - tsz) * -1);
p->PS_translate(hl->xp+wide, (hl->yp - (tsz / 10.0)) * -1);
SetFarbe(hl->ccolor, hl->cshade, &h, &s, &v, &k);
p->PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
SetClipPath(p, &gly);
2020,7 → 2020,7
p->PS_rotate(-hl->PRot);
if (c->Reverse)
{
p->PS_translate(hl->xp, (hl->yp - tsz) * -1);
p->PS_translate(hl->xp, (hl->yp - (tsz / 10.0)) * -1);
p->PS_scale(-1, 1);
if (d < c->MaxChars-1)
{
2034,7 → 2034,7
p->PS_translate(wideR, 0);
}
else
p->PS_translate(hl->xp, (hl->yp - tsz) * -1);
p->PS_translate(hl->xp, (hl->yp - (tsz / 10.0)) * -1);
if (hl->cscale != 100)
p->PS_scale(hl->cscale / 100.0, 1);
if (hl->ccolor != "None")
2041,7 → 2041,7
{
SetFarbe(hl->ccolor, hl->cshade, &h, &s, &v, &k);
p->PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
p->PS_showSub(chr, (*Doc->AllFonts)[hl->cfont]->RealName(), tsz, false);
p->PS_showSub(chr, (*Doc->AllFonts)[hl->cfont]->RealName(), tsz / 10.0, false);
}
p->PS_restore();
}
2048,7 → 2048,7
}
else
{
p->PS_selectfont(hl->cfont, tsz);
p->PS_selectfont(hl->cfont, tsz / 10.0);
p->PS_save();
p->PS_translate(hl->PtransX, -hl->PtransY);
p->PS_rotate(-hl->PRot);
/trunk/Scribus/scribus/libpostscript/pslib.h
52,7 → 52,7
virtual void PS_setcmykcolor_stroke(double c, double m, double y, double k);
virtual void PS_setlinewidth(double w);
virtual void PS_setdash(Qt::PenStyle st, Qt::PenCapStyle ca, Qt::PenJoinStyle jo);
virtual void PS_selectfont(QString f, int s);
virtual void PS_selectfont(QString f, double s);
virtual void PS_fill(bool mu);
virtual void PS_stroke();
virtual void PS_fill_stroke(bool mu);
62,7 → 62,7
virtual void PS_LinGradient(double w, double h, int item, int grad, bool mu);
virtual void PS_RadGradient(double w, double h, int item, bool mu);
virtual void PS_show(double x, double y);
virtual void PS_showSub(uint chr, QString font, int size, bool stroke);
virtual void PS_showSub(uint chr, QString font, double size, bool stroke);
virtual void PS_show_xyG(QString font, QString ch, double x, double y);
virtual void PS_image(bool inver, double x, double y, QString fn, double scalex, double scaley, QString Prof, bool UseEmbedded, bool UseProf, QString Name = "");
virtual void PS_plate(int nr);
/trunk/Scribus/scribus/libpostscript/pslib.cpp
268,9 → 268,7
PutDoc("%%BeginSetup\n");
PutDoc("/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse\n");
if (FontDesc != "")
{
PutDoc(FontDesc);
}
PutDoc("Scribusdict begin\n");
PutDoc(Fonts);
if (GraySc)
465,9 → 463,9
}
}
 
void PSLib::PS_selectfont(QString f, int s)
void PSLib::PS_selectfont(QString f, double s)
{
PutSeite(UsedFonts[f] + " " + IToStr(s) + " se\n");
PutSeite(UsedFonts[f] + " " + ToStr(s) + " se\n");
}
 
void PSLib::PS_fill(bool mu)
535,9 → 533,7
PutSeite("/Domain [0 1]\n");
if (DoSep)
{
int pla = Plate - 1;
if (pla < 0)
pla = 3;
int pla = Plate - 1 < 0 ? 3 : Plate - 1;
QStringList cols1 = QStringList::split(" ", GrColor2);
QStringList cols2 = QStringList::split(" ", GrColor1);
PutSeite("/C1 ["+ToStr(1-cols1[pla].toDouble())+"]\n");
575,9 → 571,7
PutSeite("/Domain [0 1]\n");
if (DoSep)
{
int pla = Plate - 1;
if (pla < 0)
pla = 3;
int pla = Plate - 1 < 0 ? 3 : Plate - 1;
QStringList cols1 = QStringList::split(" ", GrColor2);
QStringList cols2 = QStringList::split(" ", GrColor1);
PutSeite("/C0 ["+ToStr(1-cols1[pla].toDouble())+"]\n");
623,7 → 617,7
PutSeite("/hyphen glyphshow\n");
}
 
void PSLib::PS_showSub(uint chr, QString font, int size, bool stroke)
void PSLib::PS_showSub(uint chr, QString font, double size, bool stroke)
{
PutSeite(FillColor + " cmyk (G"+IToStr(chr)+") "+font+" "+ToStr(size / 10.0)+" ");
PutSeite(stroke ? "shgs\n" : "shgf\n");
741,17 → 735,10
#ifdef HAVE_CMS
QImage image2;
bool cmy = false;
if ((CMSuse) && (UseProf))
{
image = LoadPict(fn);
image = image.convertDepth(32);
image = LoadPict(fn);
image = image.convertDepth(32);
if ((CMSuse) && (UseProf))
image2 = LoadPictCol(fn, Prof, UseEmbedded, &cmy);
}
else
{
image = LoadPict(fn);
image = image.convertDepth(32);
}
if (inver)
{
image.invertPixels();
/trunk/Scribus/scribus/libabout/about.cpp
16,7 → 16,7
About::About( QWidget* parent )
: QDialog( parent, "About", true, 0 )
{
setCaption( tr( "About Scribus")+" "+VERSION );
setCaption( tr("About Scribus%1%2").arg(" ").arg(VERSION) );
setIcon(loadIcon("AppIcon.png"));
AboutLayout = new QVBoxLayout( this );
AboutLayout->setSpacing( 6 );
32,7 → 32,7
tabLayout1->addWidget( PixmapLabel1 );
BuildID = new QLabel( tab, "BB" );
BuildID->setAlignment(Qt::AlignCenter);
QString bu = "20. November 2003 ";
QString bu = tr("%1. %2 %3 ").arg(22).arg("November").arg(2003);
#ifdef HAVE_CMS
bu += "C";
#else
51,7 → 51,7
bu += "*";
#endif
 
BuildID->setText("Scribus Version "+QString(VERSION)+"\nBuild-ID: "+bu);
BuildID->setText(tr("Scribus Version %1\n%2 %3").arg(VERSION).arg(tr("Build-ID:")).arg(bu));
tabLayout1->addWidget( BuildID );
TabWidget2->insertTab( tab, tr( "About" ) );
tab_2 = new QWidget( TabWidget2, "tab_2" );
91,9 → 91,13
"<tr><td><b>" + tr("Spanish and Catalan:") + "</b></td><td> </td></tr>" +
"<tr><td>Josep Febrer</td><td>josep@linuxmail.org</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Hungarian and Italian:") + "</b></td><td> </td></tr>" +
"<tr><td><b>" + tr("Italian:") + "</b></td><td> </td></tr>" +
"<tr><td>Giovanni Biczs</td><td>gbiczo@freestart.hu</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Hungarian:") + "</b></td><td> </td></tr>" +
"<tr><td>Giovanni Biczó</td><td>gbiczo@freestart.hu</td></tr>" +
"<tr><td>Bence Nagy</td><td>scribus@tipogral.hu</td></tr>" +
"<tr><td>Zolt? Bszrm?yi</td><td>zboszor@freemail.hu</td></tr>" +
"<tr><td> </td><td> </td></tr>" +
"<tr><td><b>" + tr("Ukrainian:") + "</b></td><td> </td></tr>" +
"<tr><td>Sergiy Kudryk</td><td>kudryk@yahoo.com</td></tr>" +
/trunk/Scribus/scribus/scribus.cpp
178,7 → 178,7
BuildFontMenu();
SCFontsIterator it(Prefs.AvailFonts);
Prefs.DefFont = it.currentKey();
Prefs.DefSize = 12;
Prefs.DefSize = 120;
Prefs.AppFontSize = qApp->font().pointSize();
/** Default Farbenliste */
Prefs.DColors.clear();
3370,6 → 3370,8
connect(doc->ActPage, SIGNAL(NewBMNr(int, int)), BookPal->BView, SLOT(ChangeItem(int, int)));
connect(doc->ActPage, SIGNAL(RasterPic(bool)), this, SLOT(HaveRaster(bool)));
connect(doc->ActPage, SIGNAL(EditText()), this, SLOT(slotStoryEditor()));
connect(doc->ActPage, SIGNAL(DoGroup()), this, SLOT(GroupObj()));
connect(doc->ActPage, SIGNAL(DoUnGroup()), this, SLOT(UnGroupObj()));
if (!doc->TemplateMode)
{
connect(doc->ActPage, SIGNAL(DelObj(uint, uint)), Tpal, SLOT(slotRemoveElement(uint, uint)));
3996,7 → 3998,6
AdjustBM();
if (!doc->TemplateMode)
connect(doc->ActPage, SIGNAL(DelObj(uint, uint)), Tpal, SLOT(slotRemoveElement(uint, uint)));
// Tpal->slotDelPage(pg);
view->reformPages();
doc->OpenNodes.clear();
Tpal->BuildTree(view);
4034,7 → 4035,6
if (view->Pages.at(pg)->SelItem.count() != 0)
view->Pages.at(pg)->DeleteItem();
view->delPage(pg);
// Tpal->slotDelPage(pg);
AdjustBM();
}
if (!doc->TemplateMode)
4182,7 → 4182,7
bool ok = false;
if (c > 0)
{
c = SizeTMenu->text(id).left(2).toInt();
c = SizeTMenu->text(id).left(2).toInt() * 10;
doc->ActPage->chFSize(c);
}
else
4190,8 → 4190,8
Query* dia = new Query(this, "New", 1, 0, "Size:", "Size");
if (dia->exec())
{
c = dia->Answer->text().toInt(&ok);
if ((ok) && (c < 1025) && (c > 0))
c = qRound(dia->Answer->text().toDouble(&ok) * 10);
if ((ok) && (c < 10250) && (c > 0))
doc->ActPage->chFSize(c);
delete dia;
}
4206,7 → 4206,7
for (a = 0; a < SizeTMenu->count(); ++a)
{
SizeTMenu->setItemChecked(SizeTMenu->idAt(a), false);
if (SizeTMenu->text(SizeTMenu->idAt(a)).left(2).toInt() == size)
if (SizeTMenu->text(SizeTMenu->idAt(a)).left(2).toInt() == size / 10)
{
SizeTMenu->setItemChecked(SizeTMenu->idAt(a), true);
}
4972,7 → 4972,7
doc->GrabRad = dia->SpinBox3_2->value();
doc->GuideRad = dia->SpinBox2g->value() / UmReFaktor / 100;
doc->Dfont = dia->FontComb->currentText();
doc->Dsize = dia->SizeCombo->currentText().left(2).toInt();
doc->Dsize = dia->SizeCombo->currentText().left(2).toInt() * 10;
doc->minorGrid = dia->SpinBox1->value() / UmReFaktor / 100;
doc->majorGrid = dia->SpinBox2->value() / UmReFaktor / 100;
doc->minorColor = dia->Cmin;
5069,7 → 5069,7
Prefs.GrabRad = dia->SpinBox3_2->value();
Prefs.GuideRad = dia->SpinBox2g->value() / UmReFaktor / 100;
Prefs.DefFont = dia->FontComb->currentText();
Prefs.DefSize = dia->SizeCombo->currentText().left(2).toInt();
Prefs.DefSize = dia->SizeCombo->currentText().left(2).toInt() * 10;
Prefs.DminGrid = dia->SpinBox1->value() / UmReFaktor / 100;
Prefs.DmajGrid = dia->SpinBox2->value() / UmReFaktor / 100;
Prefs.DminColor = dia->Cmin;
5708,7 → 5708,10
MusterSeiten *dia = new MusterSeiten(this, doc, view, temp);
connect(dia, SIGNAL(CreateNew(int)), this, SLOT(slotNewPageT(int)));
connect(dia, SIGNAL(Fertig()), this, SLOT(ManTempEnd()));
menuBar()->setItemEnabled(pgmm, 0);
for (uint a=0; a<5; ++a)
{
pageMenu->setItemEnabled(pageMenu->idAt(a), 0);
}
editMenu->setItemEnabled(tman, 0);
ActWin->MenuStat[0] = DatSav->isEnabled();
ActWin->MenuStat[1] = fileMenu->isItemEnabled(fid1);
5730,8 → 5733,10
void ScribusApp::ManTempEnd()
{
view->HideTemplate();
menuBar()->setItemEnabled(pgmm, 1);
editMenu->setItemEnabled(tman, 1);
pageMenu->setItemEnabled(pageMenu->idAt(0), 1);
pageMenu->setItemEnabled(pageMenu->idAt(2), 1);
pageMenu->setItemEnabled(pageMenu->idAt(4), 1);
DatNeu->setEnabled(true);
DatSav->setEnabled(ActWin->MenuStat[0]);
DatOpe->setEnabled(true);
/trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
9,7 → 9,7
if (!PyArg_ParseTuple(args, "|s", &Name))
return NULL;
if (!Carrier->HaveDoc)
return PyInt_FromLong(0L);
return PyFloat_FromDouble(0.0);
int i = GetItem(QString(Name));
PageItem *it;
if (i != -1)
20,13 → 20,13
for (uint b = 0; b < it->Ptext.count(); b++)
{
if (it->Ptext.at(b)->cselect)
return PyInt_FromLong(static_cast<long>(it->Ptext.at(b)->csize));
return PyFloat_FromDouble(static_cast<double>(it->Ptext.at(b)->csize / 10.0));
}
}
else
return PyInt_FromLong(static_cast<long>(it->ISize));
return PyFloat_FromDouble(static_cast<long>(it->ISize / 10.0));
}
return PyInt_FromLong(0L);
return PyFloat_FromDouble(0.0);
}
 
PyObject *scribus_getfont(PyObject *self, PyObject* args)
299,8 → 299,8
PyObject *scribus_setfontsize(PyObject *self, PyObject* args)
{
char *Name = "";
int size;
if (!PyArg_ParseTuple(args, "i|s", &size, &Name))
double size;
if (!PyArg_ParseTuple(args, "d|s", &size, &Name))
return NULL;
Py_INCREF(Py_None);
if (!Carrier->HaveDoc)
315,7 → 315,7
doc->ActPage->SelItem.append(doc->ActPage->Items.at(i));
if (doc->ActPage->Items.at(i)->HasSel)
doc->AppMode = 7;
doc->ActPage->chFSize(size);
doc->ActPage->chFSize(qRound(size * 10.0));
doc->AppMode = Apm;
doc->ActPage->Deselect();
}
/trunk/Scribus/scribus/plugins/svgimplugin/svgplugin.cpp
341,7 → 341,7
double x = b.attribute( "x" ).isEmpty() ? 0.0 : parseUnit(b.attribute("x"));
double y = b.attribute( "y" ).isEmpty() ? 0.0 : parseUnit(b.attribute("y"));
parseStyle(gc, b);
z = Doku->ActPage->PaintText(x, y - gc->FontSize, 10, 10, gc->LWidth, gc->FillCol);
z = Doku->ActPage->PaintText(x, y - qRound(gc->FontSize / 10.0), 10, 10, gc->LWidth, gc->FillCol);
PageItem* ite = Doku->ActPage->Items.at(z);
ite->Extra = 0;
ite->TExtra = 0;
1208,7 → 1208,7
obj->Family = Doku->Dfont;
}
else if( command == "font-size" )
obj->FontSize = static_cast<int>(parseUnit(params));
obj->FontSize = static_cast<int>(parseUnit(params) * 10.0);
}
 
void SVGPlug::parseStyle( SvgStyle *obj, const QDomElement &e )
1360,12 → 1360,12
QPainter p;
p.begin(Doku->ActPage);
QFont ff(Doku->UsedFonts[m_gc.current()->Family]);
ff.setPointSize(QMAX(m_gc.current()->FontSize, 1));
ff.setPointSize(QMAX(qRound(m_gc.current()->FontSize / 10.0), 1));
p.setFont(ff);
int desc = p.fontMetrics().descent();
QString Text = QString::fromUtf8(e.text());
QDomNode c = e.firstChild();
ite->LineSp = m_gc.current()->FontSize + 2;
ite->LineSp = m_gc.current()->FontSize / 10.0 + 2;
if ((!c.isNull()) && (c.toElement().tagName() == "tspan"))
{
ite->Height = ite->LineSp+desc+2;
1376,7 → 1376,7
addGraphicContext();
SvgStyle *gc = m_gc.current();
parseStyle(gc, tspan);
ite->LineSp = gc->FontSize + 2;
ite->LineSp = gc->FontSize / 10.0 + 2;
Prog->SetNewFont(gc->Family);
double x = parseUnit( tspan.attribute( "x", "1" ) );
double y = parseUnit( tspan.attribute( "y", "1" ) );
/trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp
542,11 → 542,11
if ((hl->cstroke != "None") && (chst & 4))
{
tp->setAttribute("stroke", SetFarbe(hl->cstroke, hl->cshade2, plug));
tp->setAttribute("stroke-width", (*plug->doc->AllFonts)[hl->cfont]->strokeWidth * hl->csize);
tp->setAttribute("stroke-width", (*plug->doc->AllFonts)[hl->cfont]->strokeWidth * (hl->csize / 10.0));
}
else
tp->setAttribute("stroke", "none");
tp->setAttribute("font-size", hl->csize);
tp->setAttribute("font-size", (hl->csize / 10.0));
tp->setAttribute("font-family", (*plug->doc->AllFonts)[hl->cfont]->Family);
if (chst != 0)
{
/trunk/Scribus/scribus/page.cpp
1767,7 → 1767,7
bb->ISize = QMAX(qRound(bb->ISize*((scx+scy)/2)), 1);
if (bb->Ptext.count() != 0)
{
bb->LineSp = (bb->ISize * static_cast<double>(doku->AutoLine) / 100) + bb->ISize;
bb->LineSp = ((bb->ISize / 10.0) * static_cast<double>(doku->AutoLine) / 100) + (bb->ISize / 10.0);
for (aa = 0; aa < bb->Ptext.count(); ++aa)
{
bb->Ptext.at(aa)->csize = QMAX(qRound(bb->Ptext.at(aa)->csize*((scx+scy)/2)), 1);
1952,6 → 1952,10
pmen->insertItem(tr("Edit Text..."), this, SIGNAL(EditText()));
if (!b->Locked)
{
if (SelItem.count() > 1)
pmen->insertItem(tr("Group"), this, SIGNAL(DoGroup()));
if (b->Groups.count() != 0)
pmen->insertItem(tr("Un-group"), this, SIGNAL(DoUnGroup()));
pmen->insertItem(tr("Lock"), this, SLOT(ToggleLock()));
pmen->insertItem(tr("Send to Back"), this, SLOT(ToBack()));
pmen->insertItem(tr("Bring to Front"), this, SLOT(ToFront()));
2221,7 → 2225,7
if (b->Ptext.count() != 0)
{
b->ISize = QMAX(qRound(b->ISize * scy), 1);
b->LineSp = (b->ISize * static_cast<double>(doku->AutoLine) / 100) + b->ISize;
b->LineSp = ((b->ISize / 10.0)* static_cast<double>(doku->AutoLine) / 100) + (b->ISize / 10.0);
b->TxtScale = QMIN(QMAX(qRound(b->TxtScale * scx), 25), 400);
doku->CurrTextScale = b->TxtScale;
doku->CurrFontSize = b->ISize;
4407,8 → 4411,8
if (b->Ptext.at(b->CPos-1)->ch != QChar(13))
xp += qRound(Cwidth(doku, b->Ptext.at(b->CPos-1)->cfont, chx, chs)*(b->Ptext.at(b->CPos-1)->cscale / 100.0));
yp = static_cast<int>(b->Ptext.at(b->CPos-1)->yp);
int desc = static_cast<int>((*doku->AllFonts)[b->Ptext.at(b->CPos-1)->cfont]->numDescender * -b->Ptext.at(b->CPos-1)->csize);
int asce = static_cast<int>((*doku->AllFonts)[b->Ptext.at(b->CPos-1)->cfont]->numAscent * b->Ptext.at(b->CPos-1)->csize);
int desc = static_cast<int>((*doku->AllFonts)[b->Ptext.at(b->CPos-1)->cfont]->numDescender * (-b->Ptext.at(b->CPos-1)->csize / 10.0));
int asce = static_cast<int>((*doku->AllFonts)[b->Ptext.at(b->CPos-1)->cfont]->numAscent * (b->Ptext.at(b->CPos-1)->csize / 10.0));
yp1 = yp - asce;
yp += desc;
}
4419,8 → 4423,8
xp += static_cast<int>(doku->Vorlagen[b->Ptext.at(b->CPos)->cab].Indent);
yp = static_cast<int>(doku->Vorlagen[b->Ptext.at(b->CPos)->cab].LineSpa+b->Extra);
yp += static_cast<int>(doku->Vorlagen[b->Ptext.at(b->CPos)->cab].Avor);
int desc = static_cast<int>((*doku->AllFonts)[b->Ptext.at(b->CPos)->cfont]->numDescender * -b->Ptext.at(b->CPos)->csize);
int asce = static_cast<int>((*doku->AllFonts)[b->Ptext.at(b->CPos)->cfont]->numAscent * b->Ptext.at(b->CPos)->csize);
int desc = static_cast<int>((*doku->AllFonts)[b->Ptext.at(b->CPos)->cfont]->numDescender * (-b->Ptext.at(b->CPos)->csize / 10.0));
int asce = static_cast<int>((*doku->AllFonts)[b->Ptext.at(b->CPos)->cfont]->numAscent * (b->Ptext.at(b->CPos)->csize / 10.0));
yp1 = yp - asce;
yp += desc;
}
4638,8 → 4642,8
for (uint a = 0; a < b->Ptext.count(); ++a)
{
hl = b->Ptext.at(a);
int des = static_cast<int>((*doku->AllFonts)[hl->cfont]->numDescender * -hl->csize);
int asc = static_cast<int>((*doku->AllFonts)[hl->cfont]->numAscent * hl->csize);
int des = static_cast<int>((*doku->AllFonts)[hl->cfont]->numDescender * (-hl->csize / 10.0));
int asc = static_cast<int>((*doku->AllFonts)[hl->cfont]->numAscent * (hl->csize / 10.0));
if (asc > asce)
asce = asc;
if (des > desc)
4724,7 → 4728,7
Deselect();
if (b->Ptext.count() == 0)
return;
doku->loading = true;
// doku->loading = true;
for (uint a = 0; a < b->MaxChars; ++a)
{
pts.resize(0);
4752,7 → 4756,7
chx = chx.upper();
}
}
double csi = static_cast<double>(chs) / 10.0;
double csi = static_cast<double>(chs) / 100.0;
uint chr = chx[0].unicode();
QWMatrix chma;
chma.scale(csi, csi);
4816,7 → 4820,7
}
}
doku->GroupCounter++;
doku->loading = false;
// doku->loading = false;
SelItem.clear();
SelItem.append(b);
DeleteItem();
5665,7 → 5669,7
doku->CurrFontSize = size;
if (doku->AppMode != 7)
{
b->LineSp = (size * static_cast<double>(doku->AutoLine) / 100) + size;
b->LineSp = ((size / 10.0) * static_cast<double>(doku->AutoLine) / 100) + (size / 10.0);
doku->Vorlagen[0].LineSpa = b->LineSp;
emit ItemTextAttr(b->LineSp);
b->ISize = size;
6118,7 → 6122,7
it++;
hg->cfont = *it;
it++;
hg->csize = (*it).toInt();
hg->csize = qRound((*it).toDouble() * 10);
it++;
hg->ccolor = *it;
it++;
/trunk/Scribus/scribus/libpdf/pdflib.cpp
1654,7 → 1654,7
{
if ((hl->cstroke != "None") && (hl->cstyle & 4))
{
tmp2 += FToStr((*doc->AllFonts)[hl->cfont]->strokeWidth * tsz / 20.0)+" w\n[] 0 d\n0 J\n0 j\n";
tmp2 += FToStr((*doc->AllFonts)[hl->cfont]->strokeWidth * tsz / 200.0)+" w\n[] 0 d\n0 J\n0 j\n";
tmp2 += StrokeColor;
}
if (hl->ccolor != "None")
1674,13 → 1674,13
if (ite->Reverse)
{
double wid = Cwidth(doc, hl->cfont, chx, hl->csize) * (hl->cscale / 100.0);
tmp2 += "1 0 0 1 "+FToStr(hl->xp)+" "+FToStr((hl->yp - tsz) * -1)+" cm\n";
tmp2 += "1 0 0 1 "+FToStr(hl->xp)+" "+FToStr((hl->yp - (tsz / 10.0)) * -1)+" cm\n";
tmp2 += "-1 0 0 1 0 0 cm\n";
tmp2 += "1 0 0 1 "+FToStr(-wid)+" 0 cm\n";
tmp2 += FToStr(tsz)+" 0 0 "+FToStr(tsz)+" 0 0 cm\n";
tmp2 += FToStr(tsz / 10.0)+" 0 0 "+FToStr(tsz / 10.0)+" 0 0 cm\n";
}
else
tmp2 += FToStr(tsz)+" 0 0 "+FToStr(tsz)+" "+FToStr(hl->xp)+" "+FToStr((hl->yp - tsz) * -1)+" cm\n";
tmp2 += FToStr(tsz / 10.0)+" 0 0 "+FToStr(tsz / 10.0)+" "+FToStr(hl->xp)+" "+FToStr((hl->yp - (tsz / 10.0)) * -1)+" cm\n";
tmp2 += FToStr(hl->cscale / 100.0)+" 0 0 1 0 0 cm\n";
tmp2 += "/"+(*doc->AllFonts)[hl->cfont]->RealName()+IToStr(chr)+" Do\n";
if (hl->cstyle & 4)
1721,7 → 1721,7
{
int chs = hl->csize;
double wtr = Cwidth(doc, hl->cfont, chx, chs);
tmp2 += "1 0 0 1 "+FToStr(wtr / tsz)+" 0 cm\n";
tmp2 += "1 0 0 1 "+FToStr(wtr / (tsz / 10.0))+" 0 cm\n";
chx = "-";
chr = chx[0].unicode();
FPointArray gly = (*doc->AllFonts)[hl->cfont]->GlyphArray[chr].Outlines.copy();
1766,7 → 1766,7
if (GlyphsIdxOfFont[hl->cfont].contains(cc))
idx = GlyphsIdxOfFont[hl->cfont][cc].Code;
idx1 = (idx >> 8) & 0xFF;
tmp += UsedFontsP[hl->cfont]+"S"+IToStr(idx1)+" "+IToStr(tsz)+" Tf\n";
tmp += UsedFontsP[hl->cfont]+"S"+IToStr(idx1)+" "+FToStr(tsz / 10.0)+" Tf\n";
if (hl->cstroke != "None")
{
tmp += StrokeColor;
1782,9 → 1782,9
if (hl->cstyle & 4)
{
if (hl->ccolor != "None")
tmp += FToStr((*doc->AllFonts)[hl->cfont]->strokeWidth * tsz / 2.0)+" w 2 Tr\n";
tmp += FToStr((*doc->AllFonts)[hl->cfont]->strokeWidth * tsz / 20.0)+" w 2 Tr\n";
else
tmp += FToStr((*doc->AllFonts)[hl->cfont]->strokeWidth * tsz / 2.0)+" w 1 Tr\n";
tmp += FToStr((*doc->AllFonts)[hl->cfont]->strokeWidth * tsz / 20.0)+" w 1 Tr\n";
}
else
tmp += "0 Tr\n";
1829,11 → 1829,11
{
double csi = tsz / 10.0;
double wid = Cwidth(doc, hl->cfont, chx, hl->csize) * (hl->cscale / 100.0);
QPixmap pgPix(tsz, static_cast<int>(wid));
ScPainter *painter = new ScPainter(&pgPix, tsz, static_cast<int>(wid));
QPixmap pgPix(static_cast<int>(wid), static_cast<int>(csi));
ScPainter *painter = new ScPainter(&pgPix, static_cast<int>(wid), static_cast<int>(csi));
FPointArray gly = (*doc->AllFonts)[hl->cfont]->GlyphArray[chr].Outlines.copy();
double st = (*doc->AllFonts)[hl->cfont]->underline_pos * tsz;
double Uwid = QMAX((*doc->AllFonts)[hl->cfont]->strokeWidth * tsz, 1);
double st = (*doc->AllFonts)[hl->cfont]->underline_pos * csi;
double Uwid = QMAX((*doc->AllFonts)[hl->cfont]->strokeWidth * csi, 1);
painter->setLineWidth(Uwid);
if (gly.size() < 4)
{
1844,7 → 1844,7
gly.addPoint(FPoint(1,0));
}
QWMatrix chma;
chma.scale(csi, csi);
chma.scale(csi / 10.0, csi / 10.0);
gly.map(chma);
chma = QWMatrix();
chma.scale(hl->cscale / 100.0, 1);
1863,7 → 1863,7
else
tmp2 += "1 0 0 -1 "+FToStr(hl->xp)+" "+FToStr((hl->yp - st) * -1)+" cm\n";
painter->setupPolygon(&gly);
painter->drawUnderline(FPoint(0, tsz-st), FPoint(wid, tsz-st), true, &tmp2);
painter->drawUnderline(FPoint(0, tsz-st), FPoint(wid, csi-st), true, &tmp2);
tmp2 += "h f Q\n";
painter->end();
delete painter;
1872,8 → 1872,8
if (hl->cstyle & 16)
{
double Ulen = Cwidth(doc, hl->cfont, chx, hl->csize) * (hl->cscale / 100.0);
double Upos = (*doc->AllFonts)[hl->cfont]->strikeout_pos * tsz;
double Uwid = QMAX((*doc->AllFonts)[hl->cfont]->strokeWidth * tsz, 1);
double Upos = (*doc->AllFonts)[hl->cfont]->strikeout_pos * (tsz / 10.0);
double Uwid = QMAX((*doc->AllFonts)[hl->cfont]->strokeWidth * (tsz / 10.0), 1);
if (hl->ccolor != "None")
{
if (Options->UseRGB)
/trunk/Scribus/scribus/scribusdoc.cpp
48,7 → 48,7
DocName = tr("Document")+"-";
UsedFonts.clear();
Dfont = "";
Dsize = 12;
Dsize = 120;
CurrentSel = -1;
DocTitel = "";
DocAutor = "";
/trunk/Scribus/scribus/scpreview.cpp
202,7 → 202,7
OB.BaseOffs = QStodouble(pg.attribute("BASEOF","0"));
OB.Ausrich = QStoInt(pg.attribute("ALIGN","0"));
OB.IFont = DoFonts[pg.attribute("IFONT")];
OB.ISize = QStoInt(pg.attribute("ISIZE","12"));
OB.ISize = qRound(QStodouble(pg.attribute("ISIZE","12")) * 10.0);
OB.Pfile = pg.attribute("PFILE");
OB.Pfile2 = pg.attribute("PFILE2","");
OB.Pfile3 = pg.attribute("PFILE3","");
311,7 → 311,7
it++;
hg->cfont = *it;
it++;
hg->csize = (*it).toInt();
hg->csize = qRound((*it).toDouble() * 10.0);
it++;
hg->ccolor = *it;
it++;
645,7 → 645,7
pS->setPen(tmpfa);
}
chs = hl->csize;
asce = Prefs->AvailFonts[hl->cfont]->numAscent * hl->csize;
asce = Prefs->AvailFonts[hl->cfont]->numAscent * (hl->csize / 10.0);
int chst = hl->cstyle & 127;
if (chst != 0)
{
668,7 → 668,7
}
}
}
wide = Prefs->AvailFonts[hl->cfont]->CharWidth[chx[0].unicode()]*chs;
wide = Prefs->AvailFonts[hl->cfont]->CharWidth[chx[0].unicode()]*(chs / 10.0);
if ((CurX+(wide+hl->cextra)/2) >= wid)
{
if (zae < cl.size()-1)
772,11 → 772,11
if (ccx == QChar(29))
ccx = " ";
double wide;
double csi = static_cast<double>(Siz) / 10.0;
double csi = static_cast<double>(Siz) / 100.0;
uint chr = ccx[0].unicode();
if (Prefs->AvailFonts[ZFo]->CharWidth.contains(chr))
{
wide = Prefs->AvailFonts[ZFo]->CharWidth[chr]*Siz;
wide = Prefs->AvailFonts[ZFo]->CharWidth[chr]*(Siz / 10.0);
QWMatrix chma;
chma.scale(csi, csi);
FPointArray gly = Prefs->AvailFonts[ZFo]->GlyphArray[chr].Outlines.copy();
791,10 → 791,10
chma.translate(-wide, 0);
gly.map(chma);
chma = QWMatrix();
chma.translate(xco, yco-Siz);
chma.translate(xco, yco-(Siz / 10.0));
}
else
chma.translate(xco, yco-Siz);
chma.translate(xco, yco-(Siz / 10.0));
gly.map(chma);
p->setupPolygon(&gly);
p->setFillMode(1);
802,20 → 802,20
p->fillPath();
if ((Style & 4) && ((mod % 2) != 0))
{
p->setLineWidth(Prefs->AvailFonts[ZFo]->strokeWidth * Siz / 2);
p->setLineWidth(Prefs->AvailFonts[ZFo]->strokeWidth * Siz / 20);
p->strokePath();
}
if (Style & 16)
{
double st = Prefs->AvailFonts[ZFo]->strikeout_pos * Siz;
p->setLineWidth(QMAX(Prefs->AvailFonts[ZFo]->strokeWidth * Siz, 1));
double st = Prefs->AvailFonts[ZFo]->strikeout_pos * (Siz / 10.0);
p->setLineWidth(QMAX(Prefs->AvailFonts[ZFo]->strokeWidth * (Siz / 10.0), 1));
p->drawLine(FPoint(xco, yco-st), FPoint(xco+wide, yco-st));
}
if (Style & 8)
{
double st = Prefs->AvailFonts[ZFo]->underline_pos * Siz;
double st = Prefs->AvailFonts[ZFo]->underline_pos * (Siz / 10.0);
QString dummy;
p->setLineWidth(QMAX(Prefs->AvailFonts[ZFo]->strokeWidth * Siz, 1));
p->setLineWidth(QMAX(Prefs->AvailFonts[ZFo]->strokeWidth * (Siz / 10.0), 1));
if (gly.size() > 4)
p->drawUnderline(FPoint(xco, yco-st), FPoint(xco+wide, yco-st), false, &dummy);
else
827,7 → 827,7
p->setLineWidth(1);
p->setPen(Qt::black);
p->setFillMode(0);
p->drawRect(xco, yco-Siz, Siz, Siz);
p->drawRect(xco, yco-Siz, (Siz / 10.0), (Siz / 10.0));
}
}
 
/trunk/Scribus/scribus/editformats.cpp
100,7 → 100,7
{
struct StVorL sty;
sty.Vname = tr("New Style");
sty.LineSpa = (Docu->Dsize * static_cast<double>(Docu->AutoLine) / 100) + Docu->Dsize;
sty.LineSpa = ((Docu->Dsize / 10.0) * static_cast<double>(Docu->AutoLine) / 100) + (Docu->Dsize / 10.0);
sty.Ausri = 0;
sty.Indent = 0;
sty.First = 0;
/trunk/Scribus/scribus/scribusXml.cpp
205,7 → 205,7
tmpf = view->Prefs->GFontSub[tmpf];
}
fo = avail[tmpf]->Font;
fo.setPointSize(doc->Dsize);
fo.setPointSize(qRound(doc->Dsize / 10.0));
doc->AddFont(tmpf, fo);
DoFonts[pg.attribute("NAME")] = tmpf;
}
230,7 → 230,7
vg.Font = DoFonts[pg.attribute("FONT")];
else
vg.Font = DoFonts[Defont];
vg.FontSize = QStoInt(pg.attribute("FONTSIZE","12"));
vg.FontSize = qRound(QStodouble(pg.attribute("FONTSIZE","12")) * 10.0);
doc->Vorlagen.append(vg);
}
if(pg.tagName()=="JAVA")
447,7 → 447,7
OB.BaseOffs = QStodouble(obj.attribute("BASEOF","0"));
OB.Ausrich = QStoInt(obj.attribute("ALIGN","0"));
OB.IFont = DoFonts[obj.attribute("IFONT", doc->Dfont)];
OB.ISize = QStoInt(obj.attribute("ISIZE","12"));
OB.ISize = qRound(QStodouble(obj.attribute("ISIZE","12")) * 10.0);
OB.Pfile=obj.attribute("PFILE");
OB.Pfile2=obj.attribute("PFILE2","");
OB.Pfile3=obj.attribute("PFILE3","");
648,7 → 648,7
doc->PageSpa=QStodouble(dc.attribute("ABSTSPALTEN"));
doc->Einheit = QStoInt(dc.attribute("UNITS","0"));
Defont=dc.attribute("DFONT");
doc->Dsize=QStoInt(dc.attribute("DSIZE"));
doc->Dsize=qRound(QStodouble(dc.attribute("DSIZE")) * 10);
doc->DocAutor=dc.attribute("AUTHOR");
doc->DocComments=dc.attribute("COMMENTS");
doc->DocKeyWords=dc.attribute("KEYWORDS","");
705,7 → 705,7
tmpf = view->Prefs->GFontSub[tmpf];
}
fo = avail[tmpf]->Font;
fo.setPointSize(doc->Dsize);
fo.setPointSize(qRound(doc->Dsize / 10.0));
doc->AddFont(tmpf, fo);
DoFonts[pg.attribute("NAME")] = tmpf;
}
730,7 → 730,7
vg.Font = DoFonts[pg.attribute("FONT")];
else
vg.Font = DoFonts[Defont];
vg.FontSize = QStoInt(pg.attribute("FONTSIZE","12"));
vg.FontSize = qRound(QStodouble(pg.attribute("FONTSIZE","12")) * 10.0);
doc->Vorlagen.append(vg);
}
if(pg.tagName()=="JAVA")
1018,7 → 1018,7
OB.BaseOffs = QStodouble(obj.attribute("BASEOF","0"));
OB.Ausrich = QStoInt(obj.attribute("ALIGN","0"));
OB.IFont = DoFonts[obj.attribute("IFONT", doc->Dfont)];
OB.ISize = QStoInt(obj.attribute("ISIZE","12"));
OB.ISize = qRound(QStodouble(obj.attribute("ISIZE","12")) * 10);
OB.Pfile=obj.attribute("PFILE");
OB.Pfile2=obj.attribute("PFILE2","");
OB.Pfile3=obj.attribute("PFILE3","");
1311,7 → 1311,7
tmpf = FontSub[tmpf];
}
fo = avail[tmpf]->Font;
fo.setPointSize(doc->Dsize);
fo.setPointSize(qRound(doc->Dsize / 10.0));
if(!doc->UsedFonts.contains(tmpf))
doc->AddFont(tmpf, fo);
DoFonts[pg.attribute("NAME")] = tmpf;
1493,7 → 1493,7
OB.BaseOffs = QStodouble(pg.attribute("BASEOF","0"));
OB.Ausrich = QStoInt(pg.attribute("ALIGN","0"));
OB.IFont = DoFonts[pg.attribute("IFONT")];
OB.ISize = QStoInt(pg.attribute("ISIZE","12"));
OB.ISize = qRound(QStodouble(pg.attribute("ISIZE","12")) * 10);
OB.Pfile = pg.attribute("PFILE");
OB.Pfile2 = pg.attribute("PFILE2","");
OB.Pfile3 = pg.attribute("PFILE3","");
1609,9 → 1609,9
 
QString ScriXmlDoc::WriteElem(QPtrList<PageItem> *Selitems, ScribusDoc *doc)
{
int ts, ts2, tsh, tsh2, tst, tst2, tsb, tsb2, tshs, tshs2, tsc, tsc2;
int tsh, tsh2, tst, tst2, tsb, tsb2, tshs, tshs2, tsc, tsc2;
QString text, tf, tf2, tc, tc2, tcs, tcs2, tmp, tmpy;
double te, te2, xf, yf;
double te, te2, xf, yf, ts, ts2;
PageItem *item;
QDomDocument docu("scribus");
QString st="<SCRIBUSELEMUTF8></SCRIBUSELEMUTF8>";
1789,7 → 1789,7
ob.setAttribute("REXTRA",item->RExtra);
ob.setAttribute("ALIGN",item->Ausrich);
ob.setAttribute("IFONT",item->IFont);
ob.setAttribute("ISIZE",item->ISize);
ob.setAttribute("ISIZE",item->ISize / 10.0);
if (item->Pfile != "")
ob.setAttribute("PFILE",Path2Relative(item->Pfile));
else
1827,7 → 1827,7
for(uint k=0;k<item->Ptext.count();++k)
{
QDomElement it=docu.createElement("ITEXT");
ts = item->Ptext.at(k)->csize;
ts = item->Ptext.at(k)->csize / 10.0;
tf = item->Ptext.at(k)->cfont;
tc = item->Ptext.at(k)->ccolor;
te = item->Ptext.at(k)->cextra;
1858,7 → 1858,7
ob.appendChild(it);
break;
}
ts2 = item->Ptext.at(k)->csize;
ts2 = item->Ptext.at(k)->csize / 10.0;
tf2 = item->Ptext.at(k)->cfont;
tc2 = item->Ptext.at(k)->ccolor;
te2 = item->Ptext.at(k)->cextra;
1886,7 → 1886,7
k++;
if (k == item->Ptext.count())
break;
ts2 = item->Ptext.at(k)->csize;
ts2 = item->Ptext.at(k)->csize / 10.0;
tf2 = item->Ptext.at(k)->cfont;
tc2 = item->Ptext.at(k)->ccolor;
te2 = item->Ptext.at(k)->cextra;
1970,7 → 1970,7
fo.setAttribute("VOR",doc->Vorlagen[ff].Avor);
fo.setAttribute("NACH",doc->Vorlagen[ff].Anach);
fo.setAttribute("FONT",doc->Vorlagen[ff].Font);
fo.setAttribute("FONTSIZE",doc->Vorlagen[ff].FontSize);
fo.setAttribute("FONTSIZE",doc->Vorlagen[ff].FontSize / 10.0);
elem.appendChild(fo);
}
}
1999,9 → 1999,9
 
void ScriXmlDoc::WritePages(ScribusView *view, QDomDocument docu, QDomElement dc, QProgressBar *dia2, uint maxC)
{
int ts, ts2, tsh, tsh2, tst, tst2, tsb, tsb2, tshs, tshs2, tsc, tsc2;
int tsh, tsh2, tst, tst2, tsb, tsb2, tshs, tshs2, tsc, tsc2;
QString text, tf, tf2, tc, tc2, tcs, tcs2, tmp, tmpy, Ndir;
double te, te2, xf, yf;
double ts, ts2, te, te2, xf, yf;
uint ObCount = maxC;
Page *page;
PageItem *item;
2090,7 → 2090,7
ob.setAttribute("BBOXH",item->BBoxH);
ob.setAttribute("ALIGN",item->Ausrich);
ob.setAttribute("IFONT",item->IFont);
ob.setAttribute("ISIZE",item->ISize);
ob.setAttribute("ISIZE",item->ISize / 10.0 );
if(item->ScaleType)
ob.setAttribute("SCALETYPE", 1);
else
2206,7 → 2206,7
for(uint k=0;k<item->Ptext.count();++k)
{
QDomElement it=docu.createElement("ITEXT");
ts = item->Ptext.at(k)->csize;
ts = item->Ptext.at(k)->csize / 10.0;
tf = item->Ptext.at(k)->cfont;
tc = item->Ptext.at(k)->ccolor;
te = item->Ptext.at(k)->cextra;
2237,7 → 2237,7
ob.appendChild(it);
break;
}
ts2 = item->Ptext.at(k)->csize;
ts2 = item->Ptext.at(k)->csize / 10.0;
tf2 = item->Ptext.at(k)->cfont;
tc2 = item->Ptext.at(k)->ccolor;
te2 = item->Ptext.at(k)->cextra;
2265,7 → 2265,7
k++;
if (k == item->Ptext.count())
break;
ts2 = item->Ptext.at(k)->csize;
ts2 = item->Ptext.at(k)->csize / 10.0;
tf2 = item->Ptext.at(k)->cfont;
tc2 = item->Ptext.at(k)->ccolor;
te2 = item->Ptext.at(k)->cextra;
2362,7 → 2362,7
dc.setAttribute("ABSTSPALTEN",doc->PageSpa);
dc.setAttribute("UNITS",doc->Einheit);
dc.setAttribute("DFONT",doc->Dfont);
dc.setAttribute("DSIZE",doc->Dsize);
dc.setAttribute("DSIZE",doc->Dsize / 10.0);
dc.setAttribute("AUTHOR",doc->DocAutor);
dc.setAttribute("COMMENTS",doc->DocComments);
dc.setAttribute("KEYWORDS",doc->DocKeyWords);
2464,7 → 2464,7
fo.setAttribute("VOR",doc->Vorlagen[ff].Avor);
fo.setAttribute("NACH",doc->Vorlagen[ff].Anach);
fo.setAttribute("FONT",doc->Vorlagen[ff].Font);
fo.setAttribute("FONTSIZE",doc->Vorlagen[ff].FontSize);
fo.setAttribute("FONTSIZE",doc->Vorlagen[ff].FontSize / 10.0);
dc.appendChild(fo);
}
}
2611,7 → 2611,7
elem.appendChild(dc1a);
QDomElement dc2=docu.createElement("FONTS");
dc2.setAttribute("FACE",Vor->DefFont);
dc2.setAttribute("SIZE",Vor->DefSize);
dc2.setAttribute("SIZE",Vor->DefSize / 10.0);
elem.appendChild(dc2);
QDomElement dc3=docu.createElement("TYPO");
dc3.setAttribute("TIEF",Vor->DVTief);
2992,7 → 2992,7
}
else
Vorein->DefFont = dc.attribute("FACE");
Vorein->DefSize = QStoInt(dc.attribute("SIZE"));
Vorein->DefSize = qRound(QStodouble(dc.attribute("SIZE")) * 10.0);
}
if (dc.tagName()=="FONT")
{