Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 132 → Rev 133

/trunk/Scribus/ChangeLogCVS
1,4 → 1,6
Changes since Version 1.1.4
22.12.2003 Improved the Geometry Settings in the Properties Palette for Groups.
 
21.12.2003 Added a right Click Context Menu for Pages too.
Improved the Node Palette.
You can set now the Base Point for Object resizing and moving
/trunk/Scribus/scribus/mpalette.cpp
1421,14 → 1421,22
void Mpalette::setXY(double x, double y)
{
bool tmp = HaveItem;
double inX, inY, b, h, r;
double inX, inY, b, h, r, dummy1, dummy2;
QWMatrix ma;
FPoint n;
if (HaveItem)
{
b = CurItem->Width;
h = CurItem->Height;
r = CurItem->Rot;
if (doc->ActPage->GroupSel)
{
doc->ActPage->getGroupRect(&dummy1, &dummy2, &b, &h);
r = 0.0;
}
else
{
b = CurItem->Width;
h = CurItem->Height;
r = CurItem->Rot;
}
}
else
{
1720,7 → 1728,13
if (doc->ActPage->GroupSel)
{
doc->ActPage->getGroupRect(&gx, &gy, &gw, &gh);
doc->ActPage->moveGroup(x - gx, 0, true);
if ((TopLeft->isChecked()) || (BottomLeft->isChecked()))
base = gx;
if (Center->isChecked())
base = gx + gw / 2.0;
if ((TopRight->isChecked()) || (BottomRight->isChecked()))
base = gx + gw;
doc->ActPage->moveGroup(x - base, 0, true);
}
else
{
1766,7 → 1780,13
if (doc->ActPage->GroupSel)
{
doc->ActPage->getGroupRect(&gx, &gy, &gw, &gh);
doc->ActPage->moveGroup(0, y - gy, true);
if ((TopLeft->isChecked()) || (TopRight->isChecked()))
base = gy;
if (Center->isChecked())
base = gy + gh / 2.0;
if ((BottomLeft->isChecked()) || (BottomRight->isChecked()))
base = gy + gh;
doc->ActPage->moveGroup(0, y - base, true);
}
else
{
1875,10 → 1895,15
 
void Mpalette::NewR()
{
double gx, gy, gh, gw;
if ((HaveDoc) && (HaveItem))
{
if (doc->ActPage->GroupSel)
{
doc->ActPage->RotateGroup(static_cast<double>(Rot->value() - RoVal)/100.0*(-1));
doc->ActPage->getGroupRect(&gx, &gy, &gw, &gh);
setXY(gx, gy);
}
else
doc->ActPage->RotateItem(static_cast<double>(Rot->value())/100.0*(-1), CurItem->ItemNr);
emit DocChanged();
2206,28 → 2231,50
 
void Mpalette::NewRotMode(int m)
{
double gx, gy, gh, gw;
double inX, inY, gx, gy, gh, gw;
if ((HaveDoc) && (HaveItem))
{
HaveItem = false;
if (doc->ActPage->GroupSel)
{
doc->ActPage->setGroupRect();
doc->ActPage->getGroupRect(&gx, &gy, &gw, &gh);
if (m == 0)
{
doc->ActPage->RCenter = FPoint(gx, gy);
inX = gx;
inY = gy;
}
if (m == 1)
{
doc->ActPage->RCenter = FPoint(gx+gw, gy);
inX = gx+gw;
inY = gy;
}
if (m == 2)
{
doc->ActPage->RCenter = FPoint(gx + gw / 2.0, gy + gh / 2.0);
inX = gx + gw / 2.0;
inY = gy + gh / 2.0;
}
if (m == 3)
{
doc->ActPage->RCenter = FPoint(gx, gy+gh);
inX = gx;
inY = gy+gh;
}
if (m == 4)
{
doc->ActPage->RCenter = FPoint(gx+gw, gy+gh);
inX = gx+gw;
inY = gy+gh;
}
Xpos->setValue(qRound(inX*UmReFaktor*100.0));
Ypos->setValue(qRound(inY*UmReFaktor*100.0));
}
else
{
double inX, inY, b, h, r;
HaveItem = false;
double b, h, r;
QWMatrix ma;
FPoint n;
b = CurItem->Width;
2249,8 → 2296,8
inY = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
Xpos->setValue(qRound(inX*UmReFaktor*100.0));
Ypos->setValue(qRound(inY*UmReFaktor*100.0));
HaveItem = true;
}
HaveItem = true;
doc->RotMode = m;
}
}
/trunk/Scribus/scribus/libabout/about.cpp
38,7 → 38,7
tabLayout1->addWidget( PixmapLabel1 );
BuildID = new QLabel( tab, "BB" );
BuildID->setAlignment(Qt::AlignCenter);
QString bu = tr("%1. %2 %3 ").arg(21).arg("December").arg(2003);
QString bu = tr("%1. %2 %3 ").arg(22).arg("December").arg(2003);
#ifdef HAVE_CMS
bu += "C";
#else
/trunk/Scribus/scribus/scribus.cpp
3009,7 → 3009,7
else
{
ScriXmlDoc *ss = new ScriXmlDoc();
Buffer2 = ss->WriteElem(&doc->ActPage->SelItem, doc);
BufferI = ss->WriteElem(&doc->ActPage->SelItem, doc);
doc->ActPage->DeleteItem();
}
slotDocCh();
/trunk/Scribus/scribus/page.cpp
562,16 → 562,23
b = SelItem.at(gc);
if (b->Rot != 0)
{
QPainter p;
p.begin(this);
p.translate(static_cast<int>(b->Xpos), static_cast<int>(b->Ypos));
p.rotate(b->Rot);
QRect apr = QRegion(p.xForm(QRect(0, 0, static_cast<int>(b->Width), static_cast<int>(QMAX(b->Height, 1))))).boundingRect();
p.end();
minx = QMIN(minx, apr.x());
miny = QMIN(miny, apr.y());
maxx = QMAX(maxx, apr.x() + apr.width());
maxy = QMAX(maxy, apr.y() + apr.height());
FPointArray pb;
FPoint p1;
pb.resize(0);
pb.addPoint(FPoint(b->Xpos, b->Ypos));
p1 = transformPoint(FPoint(b->Width, 0.0), b->Xpos, b->Ypos, b->Rot, 1.0, 1.0);
pb.addPoint(p1);
p1 = transformPoint(FPoint(b->Width, b->Height), b->Xpos, b->Ypos, b->Rot, 1.0, 1.0);
pb.addPoint(p1);
p1 = transformPoint(FPoint(0.0, b->Height), b->Xpos, b->Ypos, b->Rot, 1.0, 1.0);
pb.addPoint(p1);
for (uint pc = 0; pc < 4; ++pc)
{
minx = QMIN(minx, pb.point(pc).x());
miny = QMIN(miny, pb.point(pc).y());
maxx = QMAX(maxx, pb.point(pc).x());
maxy = QMAX(maxy, pb.point(pc).y());
}
}
else
{