Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 12562 → Rev 12563

/trunk/Scribus/scribus/pageitem.cpp
4289,6 → 4289,26
totalRect.getCoords(x1, y1, x2, y2);
}
 
double PageItem::visualXPos() const
{
return (lineColor() != CommonStrings::None) ? Xpos - (m_lineWidth / 2.0) : Xpos;
}
 
double PageItem::visualYPos() const
{
return (lineColor() != CommonStrings::None) ? Ypos - (m_lineWidth / 2.0) : Ypos;
}
 
double PageItem::visualWidth() const
{
return (lineColor() != CommonStrings::None) ? Width + m_lineWidth : Width;
}
 
double PageItem::visualHeight() const
{
return (lineColor() != CommonStrings::None) ? Height + m_lineWidth : Height;
}
 
bool PageItem::pointWithinItem(const int x, const int y) const
{
const_cast<PageItem*>(this)-> setRedrawBounding();
/trunk/Scribus/scribus/canvasmode.cpp
375,7 → 375,7
p->setBrush(m_brush["outline"]);
p->setPen(m_pen["outline"]);
p->translate(deltax, deltay);
p->translate(currItem->xPos() - x, currItem->yPos() - y);
p->translate(x, y);
if (currItem->rotation() != 0)
{
p->setRenderHint(QPainter::Antialiasing);
/trunk/Scribus/scribus/canvas.cpp
208,7 → 208,9
// be huge, into account.
// ### might be interesting to investigate if it would be painless to just change
// PageItem::getTransform.
double extraS(item->lineWidth() / -2.0);
double extraS = 0.0;
if (item->lineColor() != CommonStrings::None)
extraS = (item->lineWidth() / -2.0);
Canvas::FrameHandle result = frameHitTest(item->getTransform().inverted().map(canvasPoint), QRectF(extraS, extraS, item->visualWidth(), item->visualHeight()));
// qDebug() << "frameHitTest for item" << item->ItemNr
// << item->getTransform().inverted().map(canvasPoint)
990,8 → 992,11
Qt::PenCapStyle le = Qt::FlatCap;
if (currItem->NamedLStyle.isEmpty())
{
lw2 = qRound(currItem->lineWidth() / 2.0);
lw = qRound(qMax(currItem->lineWidth(), 1.0));
if (currItem->lineColor() != CommonStrings::None)
{
lw2 = qRound(currItem->lineWidth() / 2.0);
lw = qRound(qMax(currItem->lineWidth(), 1.0));
}
le = currItem->PLineEnd;
}
else
/trunk/Scribus/scribus/pageitem.h
524,8 → 524,8
//Position
double xPos() const { return Xpos; }
double yPos() const { return Ypos; }
double visualXPos() const { return Xpos - (m_lineWidth / 2.0); }
double visualYPos() const { return Ypos - (m_lineWidth / 2.0); }
double visualXPos() const;
double visualYPos() const;
FPoint xyPos() const { return FPoint(Xpos, Ypos); }
void setXPos(const double, bool drawingOnly=false);
void setYPos(const double, bool drawingOnly=false);
534,8 → 534,8
//Size
double width() const { return Width; }
double height() const { return Height; }
double visualWidth() const { return Width + m_lineWidth; }
double visualHeight() const { return Height + m_lineWidth; }
double visualWidth() const;
double visualHeight() const;
void setWidth(const double);
void setHeight(const double);
void setWidthHeight(const double, const double, bool drawingOnly);
/trunk/Scribus/scribus/canvasgesture_resize.cpp
58,9 → 58,11
PageItem* currItem = m_doc->m_Selection->itemAt(0);
m_bounds = QRectF(currItem->visualXPos(), currItem->visualYPos(), currItem->visualWidth(), currItem->visualHeight());
m_rotation = currItem->rotation();
currItem->OldB2 = currItem->visualWidth();
currItem->OldH2 = currItem->visualHeight();
m_extraWidth = m_extraHeight = currItem->lineWidth();
// currItem->OldB2 = currItem->visualWidth();
// currItem->OldH2 = currItem->visualHeight();
currItem->OldB2 = currItem->width();
currItem->OldH2 = currItem->height();
m_extraWidth = m_extraHeight = (currItem->lineColor() != CommonStrings::None) ? currItem->lineWidth() : 0.0;
m_extraX = m_extraY = m_extraWidth / 2.0;
}
m_origRatio = m_bounds.width() / m_bounds.height();