Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 7960 → Rev 7961

/branches/Version13x/Scribus/scribus/pageitem_pathtext.cpp
215,6 → 215,16
trafo *= QWMatrix( tangent.x(), tangent.y(), tangent.y(), -tangent.x(), point.x(), point.y() ); // ID's Rainbow mode
else if (textPathType == 1)
trafo *= QWMatrix( 1, 0, 0, -1, point.x(), point.y() ); // ID's Stair Step mode
else if (textPathType == 2)
{
double a = 1;
if (tangent.x() < 0)
a = -1;
if (fabs(tangent.x()) > 0.1)
trafo *= QWMatrix( a, (tangent.y() / tangent.x()) * a, 0, -1, point.x(), point.y() ); // ID's Skew mode
else
trafo *= QWMatrix( a, 4 * a, 0, -1, point.x(), point.y() );
}
#else
QWMatrix trafo = QWMatrix( 1, 0, 0, -1, -dx*sc, 0 );
if (textPathFlipped)
223,6 → 233,16
trafo *= QWMatrix( tangent.x(), tangent.y(), tangent.y(), -tangent.x(), point.x()*sc, point.y()*sc ); // ID's Rainbow mode
else if (textPathType == 1)
trafo *= QWMatrix( 1, 0, 0, -1, point.x()*sc, point.y()*sc ); // ID's Stair Step mode
else if (textPathType == 2)
{
double a = 1;
if (tangent.x() < 0)
a = -1;
if (fabs(tangent.x()) > 0.1)
trafo *= QWMatrix( a, (tangent.y() / tangent.x()) * a, 0, -1, point.x()*sc, point.y()*sc ); // ID's Skew mode
else
trafo *= QWMatrix( a, 4 * a, 0, -1, point.x()*sc, point.y()*sc );
}
#endif
QWMatrix sca = p->worldMatrix();
trafo *= sca;
/branches/Version13x/Scribus/scribus/mpalette.cpp
4159,6 → 4159,7
pathTextType->clear();
pathTextType->insertItem( tr("Default"));
pathTextType->insertItem( tr("Stair Step"));
pathTextType->insertItem( tr("Skew"));
flippedPathText->setText( "Flip Text" );
showcurveCheckBox->setText( tr("Show Curve"));
pathTextTypeLabel->setText( tr("Type:"));
/branches/Version13x/Scribus/scribus/pdflib.cpp
3843,6 → 3843,20
trafo *= QWMatrix( hl->PtransX, -hl->PtransY, -hl->PtransY, -hl->PtransX, hl->glyph.xoffset, -hl->glyph.yoffset );
else if (ite->textPathType == 1)
trafo *= QWMatrix(1, 0, 0, -1, hl->glyph.xoffset, -hl->glyph.yoffset );
else if (ite->textPathType == 2)
{
double a = 1;
double b = -1;
if (hl->PtransX < 0)
{
a = -1;
b = 1;
}
if (fabs(hl->PtransX) > 0.1)
trafo *= QWMatrix( a, (hl->PtransY / hl->PtransX) * b, 0, -1, hl->glyph.xoffset, -hl->glyph.yoffset ); // ID's Skew mode
else
trafo *= QWMatrix( a, 6 * b, 0, -1, hl->glyph.xoffset, -hl->glyph.yoffset );
}
tmp += FToStr(trafo.m11())+" "+FToStr(trafo.m12())+" "+FToStr(trafo.m21())+" "+FToStr(trafo.m22())+" "+FToStr(trafo.dx())+" "+FToStr(trafo.dy())+" cm\n";
if (ite->BaseOffs != 0)
tmp += "1 0 0 1 0 "+FToStr( -ite->BaseOffs)+" cm\n";
/branches/Version13x/Scribus/scribus/pslib.cpp
2573,6 → 2573,20
PutSeite("["+ToStr(hl->PtransX) + " " + ToStr(-hl->PtransY) + " " + ToStr(-hl->PtransY) + " " + ToStr(-hl->PtransX) + " " + ToStr(hl->glyph.xoffset) + " " + ToStr(-hl->glyph.yoffset) + "]\n");
else if (c->textPathType == 1)
PutSeite("["+ToStr(1) + " " + ToStr(0) + " " + ToStr(0) + " " + ToStr(-1) + " " + ToStr(hl->glyph.xoffset) + " " + ToStr(-hl->glyph.yoffset) + "]\n");
else if (c->textPathType == 2)
{
double a = 1;
double b = -1;
if (hl->PtransX < 0)
{
a = -1;
b = 1;
}
if (fabs(hl->PtransX) > 0.1)
PutSeite("["+ToStr(a) + " " + ToStr((hl->PtransY / hl->PtransX) * b) + " " + ToStr(0) + " " + ToStr(-1) + " " + ToStr(hl->glyph.xoffset) + " " + ToStr(-hl->glyph.yoffset) + "]\n");
else
PutSeite("["+ToStr(a) + " " + ToStr(4) + " " + ToStr(0) + " " + ToStr(-1) + " " + ToStr(hl->glyph.xoffset) + " " + ToStr(-hl->glyph.yoffset) + "]\n");
}
PutSeite("["+ToStr(0) + " " + ToStr(0) + " " + ToStr(0) + " " + ToStr(0) + " " + ToStr(0) + " " + ToStr(0) + "] concatmatrix\nconcat\n");
PS_translate(0, (tsz / 10.0));
if (c->BaseOffs != 0)
2619,6 → 2633,20
PutSeite("["+ToStr(hl->PtransX) + " " + ToStr(-hl->PtransY) + " " + ToStr(-hl->PtransY) + " " + ToStr(-hl->PtransX) + " " + ToStr(hl->glyph.xoffset) + " " + ToStr(-hl->glyph.yoffset) + "]\n");
else if (c->textPathType == 1)
PutSeite("["+ToStr(1) + " " + ToStr(0) + " " + ToStr(0) + " " + ToStr(-1) + " " + ToStr(hl->glyph.xoffset) + " " + ToStr(-hl->glyph.yoffset) + "]\n");
else if (c->textPathType == 2)
{
double a = 1;
double b = -1;
if (hl->PtransX < 0)
{
a = -1;
b = 1;
}
if (fabs(hl->PtransX) > 0.1)
PutSeite("["+ToStr(a) + " " + ToStr((hl->PtransY / hl->PtransX) * b) + " " + ToStr(0) + " " + ToStr(-1) + " " + ToStr(hl->glyph.xoffset) + " " + ToStr(-hl->glyph.yoffset) + "]\n");
else
PutSeite("["+ToStr(a) + " " + ToStr(4) + " " + ToStr(0) + " " + ToStr(-1) + " " + ToStr(hl->glyph.xoffset) + " " + ToStr(-hl->glyph.yoffset) + "]\n");
}
PutSeite("["+ToStr(0) + " " + ToStr(0) + " " + ToStr(0) + " " + ToStr(0) + " " + ToStr(0) + " " + ToStr(0) + "] concatmatrix\nconcat\n");
if (c->BaseOffs != 0)
PS_translate(0, -c->BaseOffs);