r16930 by craig - Apply patch to new branch. note, does not compile
scribus-commit
scribus-commit at lists.scribus.net
Mon Oct 24 20:20:02 UTC 2011
Author: craig
Date: Mon Oct 24 20:20:02 2011
New Revision: 16930
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=16930
Log:
Apply patch to new branch. note, does not compile
Modified:
branches/Version135scrollfix/Scribus/scribus/CMakeLists.txt
branches/Version135scrollfix/Scribus/scribus/canvas.cpp
branches/Version135scrollfix/Scribus/scribus/canvas.h
branches/Version135scrollfix/Scribus/scribus/canvasgesture_linemove.cpp
branches/Version135scrollfix/Scribus/scribus/canvasgesture_pan.cpp
branches/Version135scrollfix/Scribus/scribus/canvasgesture_rulermove.cpp
branches/Version135scrollfix/Scribus/scribus/canvasmode.cpp
branches/Version135scrollfix/Scribus/scribus/canvasmode_edit.cpp
branches/Version135scrollfix/Scribus/scribus/canvasmode_editgradient.cpp
branches/Version135scrollfix/Scribus/scribus/canvasmode_legacy.cpp
branches/Version135scrollfix/Scribus/scribus/canvasmode_magnifier.cpp
branches/Version135scrollfix/Scribus/scribus/canvasmode_nodeedit.cpp
branches/Version135scrollfix/Scribus/scribus/canvasmode_normal.cpp
branches/Version135scrollfix/Scribus/scribus/scribusview.cpp
branches/Version135scrollfix/Scribus/scribus/scribusview.h
Modified: branches/Version135scrollfix/Scribus/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16930&path=/branches/Version135scrollfix/Scribus/scribus/CMakeLists.txt
==============================================================================
--- branches/Version135scrollfix/Scribus/scribus/CMakeLists.txt (original)
+++ branches/Version135scrollfix/Scribus/scribus/CMakeLists.txt Mon Oct 24 20:20:02 2011
@@ -88,7 +88,7 @@
canvasgesture_rulermove.h
canvasmode.h
canvasmode_edit.h
- canvasmode_legacy.h
+ #canvasmode_legacy.h
canvasmode_measurements.h
canvasmode_normal.h
charselect.h
@@ -324,7 +324,7 @@
canvasmode_framelinks.cpp
canvasmode_edit.cpp
canvasmode_editgradient.cpp
- canvasmode_legacy.cpp
+ #canvasmode_legacy.cpp
canvasmode_magnifier.cpp
canvasmode_measurements.cpp
canvasmode_nodeedit.cpp
Modified: branches/Version135scrollfix/Scribus/scribus/canvas.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16930&path=/branches/Version135scrollfix/Scribus/scribus/canvas.cpp
==============================================================================
--- branches/Version135scrollfix/Scribus/scribus/canvas.cpp (original)
+++ branches/Version135scrollfix/Scribus/scribus/canvas.cpp Mon Oct 24 20:20:02 2011
@@ -2354,6 +2354,42 @@
m_view->horizRuler->update();
}
-
-
-
+//Canvas rebuild
+
+qreal Canvas::scaledLineWidth() const
+{
+ return 1.0 / m_viewMode.scale;
+}
+
+QSizeF Canvas::scaledQSizeF(QSizeF size) const
+{
+ return size*m_viewMode.scale;
+}
+
+qreal Canvas::scaledGrabRadius() const
+{
+ return m_doc->guidesSettings.grabRad / m_viewMode.scale;
+}
+
+qreal Canvas::scaledGuideRadius() const
+{
+ return m_doc->guidesSettings.guideRad / m_viewMode.scale;
+}
+
+void Canvas::scaleAndTranslateQPainter(QPainter *p)
+{
+ p->scale(m_viewMode.scale, m_viewMode.scale);
+ p->translate(-m_doc->minCanvasCoordinate.x(), -m_doc->minCanvasCoordinate.y());
+}
+
+void Canvas::mouseMoveScrollDeltas(qreal* dx, qreal *dy, QPointF& referencePoint, QMouseEvent* m)
+{
+ FPoint canvasPoint(globalToCanvas(m->globalPos()));
+ *dx = (referencePoint.x() - canvasPoint.x()) * m_viewMode.scale;
+ *dy = (referencePoint.y() - canvasPoint.y()) * m_viewMode.scale;
+}
+
+qreal Canvas::zoomLevel() const
+{
+ return 100.0*m_viewMode.scale/PrefsManager::instance()->appPrefs.DisScale;
+}
Modified: branches/Version135scrollfix/Scribus/scribus/canvas.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16930&path=/branches/Version135scrollfix/Scribus/scribus/canvas.h
==============================================================================
--- branches/Version135scrollfix/Scribus/scribus/canvas.h (original)
+++ branches/Version135scrollfix/Scribus/scribus/canvas.h Mon Oct 24 20:20:02 2011
@@ -138,7 +138,7 @@
void setRenderModeFillBuffer() { m_renderMode = RENDER_BUFFERED; }
void setRenderModeUseBuffer(bool use) { m_renderMode = (use ? RENDER_BUFFERED : RENDER_NORMAL) ; }
- double scale() const { return m_viewMode.scale; }
+// double scale() const { return m_viewMode.scale; }
void setScale(double scale) { if (m_viewMode.scale != scale) { m_viewMode.scale = scale; clearBuffers(); update(); } }
QPoint canvasToLocal(FPoint p) const;
QPoint canvasToGlobal(FPoint p) const;
@@ -193,8 +193,17 @@
void displayRotHUD(QPoint m, double rot);
void setupEditHRuler(PageItem * item, bool forceAndReset = false);
+ //Canvas rebuild
+ qreal scaledLineWidth() const;
+ qreal scaledGrabRadius() const;
+ qreal scaledGuideRadius() const;
+ QSizeF scaledQSizeF(QSizeF size) const;
+ void scaleAndTranslateQPainter(QPainter *p);
+ void mouseMoveScrollDeltas(qreal* dx, qreal *dx, QPointF& referencePoint, QMouseEvent* m);
+ qreal zoomLevel() const;
private:
+ //double scale() const { return m_viewMode.scale; }
void DrawPageMarks(ScPainter *p, Page* page, QRect clip);
void drawLinkFrameLine(ScPainter* painter, FPoint &start, FPoint &end);
void PaintSizeRect(QRect neu);
Modified: branches/Version135scrollfix/Scribus/scribus/canvasgesture_linemove.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16930&path=/branches/Version135scrollfix/Scribus/scribus/canvasgesture_linemove.cpp
==============================================================================
--- branches/Version135scrollfix/Scribus/scribus/canvasgesture_linemove.cpp (original)
+++ branches/Version135scrollfix/Scribus/scribus/canvasgesture_linemove.cpp Mon Oct 24 20:20:02 2011
@@ -113,10 +113,11 @@
void LineMove::drawControls(QPainter* p)
{
p->save();
- p->scale(m_canvas->scale(), m_canvas->scale());
- p->translate(-m_doc->minCanvasCoordinate.x(), -m_doc->minCanvasCoordinate.y());
+ m_canvas->scaleAndTranslateQPainter(p);
+// p->scale(m_canvas->scale(), m_canvas->scale());
+// p->translate(-m_doc->minCanvasCoordinate.x(), -m_doc->minCanvasCoordinate.y());
p->setBrush(Qt::NoBrush);
- p->setPen(QPen(Qt::black, 1.0 / m_canvas->scale(), Qt::DotLine, Qt::FlatCap, Qt::MiterJoin));
+ p->setPen(QPen(Qt::black, m_canvas->scaledLineWidth(), Qt::DotLine, Qt::FlatCap, Qt::MiterJoin));
p->drawLine(m_bounds.topLeft(), m_bounds.bottomRight());
p->restore();
}
Modified: branches/Version135scrollfix/Scribus/scribus/canvasgesture_pan.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16930&path=/branches/Version135scrollfix/Scribus/scribus/canvasgesture_pan.cpp
==============================================================================
--- branches/Version135scrollfix/Scribus/scribus/canvasgesture_pan.cpp (original)
+++ branches/Version135scrollfix/Scribus/scribus/canvasgesture_pan.cpp Mon Oct 24 20:20:02 2011
@@ -64,10 +64,12 @@
void PanGesture::mouseMoveEvent(QMouseEvent* m)
{
- FPoint m_canvasPoint = m_canvas->globalToCanvas(m->globalPos());
- double scale = m_canvas->scale();
- double dx = (m_canvasRefPoint.x() - m_canvasPoint.x()) * scale;
- double dy = (m_canvasRefPoint.y() - m_canvasPoint.y()) * scale;
+ qreal dx, dy;
+ m_canvas->mouseMoveScrollDeltas(&dx, &dx, m_canvasRefPoint, m);
+ //FPoint m_canvasPoint = m_canvas->globalToCanvas(m->globalPos());
+ //double scale = m_canvas->scale();
+ //double dx = (m_canvasRefPoint.x() - m_canvasPoint.x()) * scale;
+ //double dy = (m_canvasRefPoint.y() - m_canvasPoint.y()) * scale;
m_view->scrollBy(dx, dy);
}
Modified: branches/Version135scrollfix/Scribus/scribus/canvasgesture_rulermove.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16930&path=/branches/Version135scrollfix/Scribus/scribus/canvasgesture_rulermove.cpp
==============================================================================
--- branches/Version135scrollfix/Scribus/scribus/canvasgesture_rulermove.cpp (original)
+++ branches/Version135scrollfix/Scribus/scribus/canvasgesture_rulermove.cpp Mon Oct 24 20:20:02 2011
@@ -33,19 +33,20 @@
QColor color(m_doc->guidesSettings.guideColor);
p->save();
QPoint pageOrigin = m_canvas->canvasToLocal(QPointF(page->xOffset(), page->yOffset()));
- QSize pageSize = (QSizeF(page->width(), page->height()) * m_canvas->scale()).toSize();
+ //QSize pageSize = (QSizeF(page->width(), page->height()) * m_canvas->scale()).toSize();
+ QSize pageSize = m_canvas->scaledQSizeF(QSizeF(page->width(), page->height())).toSize();
switch (m_mode)
{
case HORIZONTAL:
- p->setPen(QPen(color, 1.0 / m_canvas->scale(), Qt::DashDotLine, Qt::FlatCap, Qt::MiterJoin));
+ p->setPen(QPen(color, m_canvas->scaledLineWidth(), Qt::DashDotLine, Qt::FlatCap, Qt::MiterJoin));
p->drawLine(QPoint(pageOrigin.x(), m_xy.y()), QPoint(pageOrigin.x() + pageSize.width(), m_xy.y()));
break;
case VERTICAL:
- p->setPen(QPen(color, 1.0 / m_canvas->scale(), Qt::DashDotLine, Qt::FlatCap, Qt::MiterJoin));
+ p->setPen(QPen(color, m_canvas->scaledLineWidth(), Qt::DashDotLine, Qt::FlatCap, Qt::MiterJoin));
p->drawLine(QPoint(m_xy.x(), pageOrigin.y()), QPoint(m_xy.x(), pageOrigin.y() + pageSize.height()));
break;
case ORIGIN:
- p->setPen(QPen(color, 1.0 / m_canvas->scale(), Qt::DotLine, Qt::FlatCap, Qt::MiterJoin));
+ p->setPen(QPen(color, m_canvas->scaledLineWidth(), Qt::DotLine, Qt::FlatCap, Qt::MiterJoin));
p->drawLine(QPoint(m_xy.x(), 0), QPoint(m_xy.x(), m_canvas->height()));
p->drawLine(QPoint(0, m_xy.y()), QPoint(m_canvas->width(), m_xy.y()));
break;
@@ -107,7 +108,8 @@
const int page = m_doc->OnPage(mousePointDoc.x(), mousePointDoc.y());
if ((m_doc->guidesSettings.guidesShown) && (!m_doc->GuideLock) && page >= 0)
{
- double grabRadScale = m_doc->guidesSettings.grabRad / m_canvas->scale();
+ //double grabRadScale = m_doc->guidesSettings.grabRad / m_canvas->scale();
+ double grabRadScale = m_canvas->scaledGrabRadius();
int index = m_doc->Pages->at(page)->guides.isMouseOnVertical(mousePointDoc.x() + grabRadScale, mousePointDoc.x() - grabRadScale, GuideManagerCore::Standard);
if (index >= 0)
{
@@ -139,7 +141,8 @@
const int page = m_doc->OnPage(mousePointDoc.x(), mousePointDoc.y());
if ((m_doc->guidesSettings.guidesShown) && page >= 0)
{
- double grabRadScale = m_doc->guidesSettings.grabRad / m_canvas->scale();
+ //double grabRadScale = m_doc->guidesSettings.grabRad / m_canvas->scale();
+ double grabRadScale = m_canvas->scaledGrabRadius();
int index = m_doc->Pages->at(page)->guides.isMouseOnVertical(mousePointDoc.x() + grabRadScale, mousePointDoc.x() - grabRadScale, GuideManagerCore::Standard);
if (index >= 0)
{
Modified: branches/Version135scrollfix/Scribus/scribus/canvasmode.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16930&path=/branches/Version135scrollfix/Scribus/scribus/canvasmode.cpp
==============================================================================
--- branches/Version135scrollfix/Scribus/scribus/canvasmode.cpp (original)
+++ branches/Version135scrollfix/Scribus/scribus/canvasmode.cpp Mon Oct 24 20:20:02 2011
@@ -26,7 +26,7 @@
#include "canvasmode_editgradient.h"
#include "canvasmode_eyedropper.h"
#include "canvasmode_framelinks.h"
-#include "canvasmode_legacy.h"
+//#include "canvasmode_legacy.h"
#include "canvasmode_magnifier.h"
#include "canvasmode_measurements.h"
#include "canvasmode_nodeedit.h"
@@ -147,7 +147,8 @@
// more modes as they are defined...
default:
- result = new LegacyMode(view);
+ result = new CanvasMode_Normal(view);
+ //result = new LegacyMode(view);
break;
}
return result;
@@ -169,8 +170,9 @@
// int tg(0);
// QStringList tu;
QString ds;
- psx->scale(m_canvas->scale(), m_canvas->scale());
- psx->translate(-m_doc->minCanvasCoordinate.x(), -m_doc->minCanvasCoordinate.y());
+ m_canvas->scaleAndTranslateQPainter(psx);
+ //psx->scale(m_canvas->scale(), m_canvas->scale());
+ //psx->translate(-m_doc->minCanvasCoordinate.x(), -m_doc->minCanvasCoordinate.y());
psx->setClipping(true);
psx->setClipRegion(QRegion ( m_canvas->exposedRect() ) );
@@ -189,12 +191,12 @@
psx->save();
psx->setPen(m_pen["selection-group"]);
psx->setBrush(m_brush["selection-group"]);
- double lineAdjust(psx->pen().width()/m_canvas->scale());
+ double lineAdjust(psx->pen().width()*m_canvas->scaledLineWidth());
double x, y, w, h;
m_doc->m_Selection->setGroupRect();
m_doc->m_Selection->getVisualGroupRect(&x, &y, &w, &h);
- const double markWidth = 4 / m_canvas->scale();
- const double halfMarkWidth = 2 / m_canvas->scale();
+ const double markWidth = 4 * m_canvas->scaledLineWidth();
+ const double halfMarkWidth = 2 * m_canvas->scaledLineWidth();
psx->translate(x,y);
x = -lineAdjust;
@@ -239,7 +241,7 @@
psx->save();
psx->setPen(m_pen["selection-group-inside"]);
psx->setBrush(m_brush["selection-group-inside"]);
- double lineAdjust(psx->pen().width()/m_canvas->scale());
+ double lineAdjust(psx->pen().width() * m_canvas->scaledLineWidth());
double x, y, w, h;
w = currItem->visualWidth() ;
h = currItem->visualHeight() ;
@@ -267,8 +269,8 @@
else if (m_doc->m_Selection->count() != 0)
{
// ds = "S" + QString::number(m_doc->m_Selection->count())+" ";
- const double markWidth = 4 / m_canvas->scale();
- const double halfMarkWidth = 2 / m_canvas->scale();
+ const double markWidth = 4 * m_canvas->scaledLineWidth();
+ const double halfMarkWidth = 2 * m_canvas->scaledLineWidth();
uint docSelectionCount = m_doc->m_Selection->count();
PageItem *currItem;
@@ -283,7 +285,7 @@
psx->save();
psx->setPen(m_pen["selection"]);
psx->setBrush(m_brush["selection"]);
- double lineAdjust(psx->pen().width()/m_canvas->scale());
+ double lineAdjust(psx->pen().width() * m_canvas->scaledLineWidth());
double x, y, w, h;
w = currItem->visualWidth();
h = currItem->visualHeight();
@@ -342,8 +344,9 @@
void CanvasMode::drawOutline(QPainter* p, double scalex, double scaley, double deltax, double deltay)
{
p->save();
- p->scale(m_canvas->scale(), m_canvas->scale());
- p->translate(-m_doc->minCanvasCoordinate.x(), -m_doc->minCanvasCoordinate.y());
+ m_canvas->scaleAndTranslateQPainter(p);
+ //p->scale(m_canvas->scale(), m_canvas->scale());
+ //p->translate(-m_doc->minCanvasCoordinate.x(), -m_doc->minCanvasCoordinate.y());
if (m_doc->m_Selection->count() == 1)
Modified: branches/Version135scrollfix/Scribus/scribus/canvasmode_edit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16930&path=/branches/Version135scrollfix/Scribus/scribus/canvasmode_edit.cpp
==============================================================================
--- branches/Version135scrollfix/Scribus/scribus/canvasmode_edit.cpp (original)
+++ branches/Version135scrollfix/Scribus/scribus/canvasmode_edit.cpp Mon Oct 24 20:20:02 2011
@@ -84,11 +84,15 @@
{
PageItem* currItem;
if (m_doc->appMode == modeEdit && GetItem(&currItem))
+ m_view->updateCanvasItem(currItem);
+ /*
{
QRectF brect = currItem->getBoundingRect();
// qDebug() << "update cursor" << brect;
- m_canvas->update(QRectF(m_canvas->canvasToLocal(brect.topLeft()), QSizeF(brect.width(),brect.height())*m_canvas->scale()).toRect());
- }
+// m_canvas->update(QRectF(m_canvas->canvasToLocal(brect.topLeft()), QSizeF(brect.width(),brect.height())*m_canvas->scale()).toRect());
+ m_canvas->update(QRectF(m_canvas->canvasToLocal(brect.topLeft()), m_canvas->scaledQSizeF(QSizeF(brect.width(),brect.height()))).toRect());
+ }
+ */
}
void CanvasMode_Edit::keyPressEvent(QKeyEvent *e)
@@ -146,7 +150,7 @@
p->save();
p->translate(currItem->xPos(), currItem->yPos());
p->rotate(currItem->rotation());
- p->setPen(QPen(Qt::blue, 1.0 / m_canvas->scale(), Qt::DashLine, Qt::FlatCap, Qt::MiterJoin));
+ p->setPen(QPen(Qt::blue, m_canvas->scaledLineWidth(), Qt::DashLine, Qt::FlatCap, Qt::MiterJoin));
p->setClipRect(QRectF(0.0, 0.0, currItem->width(), currItem->height()));
p->setBrush(Qt::NoBrush);
p->setRenderHint(QPainter::Antialiasing);
@@ -528,8 +532,11 @@
if((refStartSel != currItem->asTextFrame()->itemText.startOfSelection())
|| (refEndSel != currItem->asTextFrame()->itemText.endOfSelection()))
{
- QRectF br(currItem->getBoundingRect());
- m_canvas->update(QRectF(m_canvas->canvasToLocal(br.topLeft()), br.size() * m_canvas->scale()).toRect());
+
+// QRectF br(currItem->getBoundingRect());
+//// m_canvas->update(QRectF(m_canvas->canvasToLocal(br.topLeft()), br.size() * m_canvas->scale()).toRect());
+// m_canvas->update(QRectF(m_canvas->canvasToLocal(br.topLeft()), m_canvas->scaledQSizeF(br.size())).toRect());
+ m_view->updateCanvasItem(currItem);
}
}
else
@@ -1016,7 +1023,7 @@
FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
Mxp = mousePointDoc.x();
Myp = mousePointDoc.y();
- double grabRadius = m_doc->guidesSettings.grabRad / m_canvas->scale();
+ double grabRadius = m_canvas->scaledGrabRadius();
int MxpS = static_cast<int>(mousePointDoc.x());
int MypS = static_cast<int>(mousePointDoc.y());
mpo = QRectF(Mxp-grabRadius, Myp-grabRadius, grabRadius*2, grabRadius*2);
Modified: branches/Version135scrollfix/Scribus/scribus/canvasmode_editgradient.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16930&path=/branches/Version135scrollfix/Scribus/scribus/canvasmode_editgradient.cpp
==============================================================================
--- branches/Version135scrollfix/Scribus/scribus/canvasmode_editgradient.cpp (original)
+++ branches/Version135scrollfix/Scribus/scribus/canvasmode_editgradient.cpp Mon Oct 24 20:20:02 2011
@@ -175,22 +175,22 @@
PageItem *currItem = m_doc->m_Selection->itemAt(0);
double newX = mousePointDoc.x(); //m->x();
double newY = mousePointDoc.y(); //m->y();
- double dx = fabs(Mxp - newX) + 5.0 / m_canvas->scale();
- double dy = fabs(Myp - newY) + 5.0 / m_canvas->scale();
+ double dx = fabs(Mxp - newX) + 5.0 * m_canvas->scaledLineWidth();
+ double dy = fabs(Myp - newY) + 5.0 * m_canvas->scaledLineWidth();
FPoint np(Mxp - newX, Myp - newY, 0, 0, currItem->rotation(), 1, 1, true);
if (m_gradientPoint == useGradientStart)
{
- currItem->GrStartX -= np.x(); // (Mxp - newX); // / m_canvas->scale();
- currItem->GrStartY -= np.y(); // (Myp - newY); // / m_canvas->scale();
+ currItem->GrStartX -= np.x();
+ currItem->GrStartY -= np.y();
}
if (m_gradientPoint == useGradientEnd)
{
- currItem->GrEndX -= np.x(); // (Mxp - newX); // / m_canvas->scale();
- currItem->GrEndY -= np.y(); // (Myp - newY); // / m_canvas->scale();
+ currItem->GrEndX -= np.x();
+ currItem->GrEndY -= np.y();
}
Mxp = newX;
Myp = newY;
- m_view->RefreshGradient(currItem, dx * m_canvas->scale(), dy * m_canvas->scale());
+ m_view->RefreshGradient(currItem, dx / m_canvas->scaledLineWidth(), dy / m_canvas->scaledLineWidth());
m_ScMW->propertiesPalette->updateColorSpecialGradient();
currItem->update();
}
Modified: branches/Version135scrollfix/Scribus/scribus/canvasmode_legacy.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16930&path=/branches/Version135scrollfix/Scribus/scribus/canvasmode_legacy.cpp
==============================================================================
--- branches/Version135scrollfix/Scribus/scribus/canvasmode_legacy.cpp (original)
+++ branches/Version135scrollfix/Scribus/scribus/canvasmode_legacy.cpp Mon Oct 24 20:20:02 2011
@@ -98,7 +98,8 @@
{
QRectF brect = currItem->getBoundingRect();
// qDebug() << "update cursor" << brect;
- m_canvas->update(QRectF(m_canvas->canvasToLocal(brect.topLeft()), QSizeF(brect.width(),brect.height())*m_canvas->scale()).toRect());
+// m_canvas->update(QRectF(m_canvas->canvasToLocal(brect.topLeft()), QSizeF(brect.width(),brect.height())*m_canvas->scale()).toRect());
+ m_canvas->update(QRectF(m_canvas->canvasToLocal(brect.topLeft()), m_canvas->scaledQSizeF(brect.size())).toRect());
}
}
@@ -432,8 +433,8 @@
PageItem *currItem = m_doc->m_Selection->itemAt(0);
newX = mousePointDoc.x(); //m->x();
newY = mousePointDoc.y(); //m->y();
- double dx = fabs(Mxp - newX) + 5.0 / m_canvas->scale();
- double dy = fabs(Myp - newY) + 5.0 / m_canvas->scale();
+ double dx = fabs(Mxp - newX) + 5.0 * m_canvas->scaledLineWidth();
+ double dy = fabs(Myp - newY) + 5.0 * m_canvas->scaledLineWidth();
FPoint np(Mxp - newX, Myp - newY, 0, 0, currItem->rotation(), 1, 1, true);
// np = np * (1.0 / m_canvas->scale());
if (m->buttons() & Qt::LeftButton)
@@ -448,7 +449,7 @@
}
Mxp = newX;
Myp = newY;
- m_view->RefreshGradient(currItem, dx * m_canvas->scale(), dy * m_canvas->scale());
+ m_view->RefreshGradient(currItem, dx / m_canvas->scaledLineWidth(), dy / m_canvas->scaledLineWidth());
m_ScMW->propertiesPalette->updateColorSpecialGradient();
currItem->update();
return;
@@ -1056,7 +1057,7 @@
gy = npw.y() - gh;
else
gy = npx.y();
- if ((fabs(gx - gxo) < (m_doc->guidesSettings.guideRad / 2.0) / m_canvas->scale()) && (fabs(gy - gyo) < (m_doc->guidesSettings.guideRad / 2.0) / m_canvas->scale()))
+ if ((fabs(gx - gxo) < (m_canvas->scaledGuideRadius() / 2.0)) && (fabs(gy - gyo) < (m_canvas->scaledGuideRadius() / 2.0)))
m_doc->moveGroup(gx-gxo, gy-gyo, false);
}
}
@@ -1118,7 +1119,7 @@
gy = npw.y() - gh;
else
gy = npx.y();
- if ((fabs(gx - gxo) < (m_doc->guidesSettings.guideRad / 2.0) / m_canvas->scale()) && (fabs(gy - gyo) < (m_doc->guidesSettings.guideRad / 2.0) / m_canvas->scale()))
+ if ((fabs(gx - gxo) < (m_canvas->scaledGuideRadius() / 2.0)) && (fabs(gy - gyo) < (m_canvas->scaledGuideRadius() / 2.0)))
m_doc->moveGroup(gx-gxo, gy-gyo, false);
m_doc->m_Selection->setGroupRect();
}
@@ -4261,11 +4262,11 @@
PageItem *currItem;
m_canvas->m_viewMode.m_MouseButtonPressed = true;
FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
- Mxp = mousePointDoc.x(); //m->x()/m_canvas->scale());
- Myp = mousePointDoc.y(); //m->y()/m_canvas->scale());
- double grabRadius = m_doc->guidesSettings.grabRad / m_canvas->scale();
- int MxpS = static_cast<int>(mousePointDoc.x()); //m->x()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.x());
- int MypS = static_cast<int>(mousePointDoc.y()); //m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
+ Mxp = mousePointDoc.x();
+ Myp = mousePointDoc.y();
+ double grabRadius = m_canvas->scaledGrabRadius();
+ int MxpS = static_cast<int>(mousePointDoc.x());
+ int MypS = static_cast<int>(mousePointDoc.y());
mpo = QRectF(Mxp-grabRadius, Myp-grabRadius, grabRadius*2, grabRadius*2);
// mpo.translate(m_doc->minCanvasCoordinate.x() * m_canvas->scale(), m_doc->minCanvasCoordinate.y() * m_canvas->scale());
m_doc->nodeEdit.deselect();
Modified: branches/Version135scrollfix/Scribus/scribus/canvasmode_magnifier.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16930&path=/branches/Version135scrollfix/Scribus/scribus/canvasmode_magnifier.cpp
==============================================================================
--- branches/Version135scrollfix/Scribus/scribus/canvasmode_magnifier.cpp (original)
+++ branches/Version135scrollfix/Scribus/scribus/canvasmode_magnifier.cpp Mon Oct 24 20:20:02 2011
@@ -206,9 +206,6 @@
QRect geom = m_view->redrawMarker->geometry().normalized();
FPoint nx = m_canvas->globalToCanvas(QPoint(geom.x() + geom.width() / 2, geom.y() + geom.height() / 2));
double scaleAdjust = m_view->visibleWidth() / static_cast<double>(qMax(geom.width(), 1));
- /*m_view->setScale(m_canvas->scale() * scaleAdjust);
- m_view->slotDoZoom();
- m_view->SetCCPo(nx.x(), nx.y());*/
m_view->zoom(nx.x(), nx.y(), m_canvas->scale() * scaleAdjust, false);
if (sc == m_canvas->scale())
{
Modified: branches/Version135scrollfix/Scribus/scribus/canvasmode_nodeedit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16930&path=/branches/Version135scrollfix/Scribus/scribus/canvasmode_nodeedit.cpp
==============================================================================
--- branches/Version135scrollfix/Scribus/scribus/canvasmode_nodeedit.cpp (original)
+++ branches/Version135scrollfix/Scribus/scribus/canvasmode_nodeedit.cpp Mon Oct 24 20:20:02 2011
@@ -62,8 +62,7 @@
FPointArray cli;
p->save();
- p->scale(m_canvas->scale(), m_canvas->scale());
- p->translate(-m_doc->minCanvasCoordinate.x(), -m_doc->minCanvasCoordinate.y());
+ m_canvas->scaleAndTranslateQPainter(p);
p->translate(currItem->xPos(), currItem->yPos());
p->rotate(currItem->rotation());
p->setPen(QPen(Qt::blue, 1 / m_canvas->m_viewMode.scale, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
@@ -261,7 +260,7 @@
PageItem *currItem;
QPoint np, np2, mop;
FPoint npf, npf2;
- double sc = m_canvas->scale();
+ //double sc = m_canvas->scale();
m->accept();
npf = m_canvas->globalToCanvas(m->globalPos());
#ifdef MODEDEBUG
@@ -314,6 +313,7 @@
// qDebug() << "node edit drag 9:" << (m->buttons() & Qt::LeftButton);
}
+ /*
else // shouldnt be in nodeedit mode now, should it??
{
npf = m_canvas->globalToCanvas(m->globalPos());
@@ -373,6 +373,7 @@
qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
}
}
+ */
}
void CanvasMode_NodeEdit::mousePressEvent(QMouseEvent *m)
@@ -760,7 +761,7 @@
{
seg = poi;
double sp = 0.0;
- double spadd = 1.0 / (Clip.lenPathSeg(seg) * m_canvas->scale());
+ double spadd = m_canvas->scaledLineWidth() / Clip.lenPathSeg(seg);
while (sp < 1.0)
{
Clip.pointTangentNormalAt(seg, sp, &point, &tangent, &normal );
@@ -1008,7 +1009,7 @@
{
seg = poi;
double sp = 0.0;
- double spadd = 1.0 / (Clip.lenPathSeg(seg) * m_canvas->scale());
+ double spadd = m_canvas->scaledLineWidth() / Clip.lenPathSeg(seg);
while (sp < 1.0)
{
Clip.pointTangentNormalAt(seg, sp, &point, &tangent, &normal );
@@ -1087,8 +1088,8 @@
*/
Mxp = m->x();
Myp = m->y();
- Dxp = qRound(m->x()/m_canvas->scale());
- Dyp = qRound(m->y()/m_canvas->scale());
+ Dxp = qRound(m->x()*m_canvas->scaledLineWidth());
+ Dyp = qRound(m->y()*m_canvas->scaledLineWidth());
if (!m_rectangleSelect)
m_rectangleSelect = new RectSelect(this);
m_rectangleSelect->prepare(m->globalPos());
@@ -1215,7 +1216,7 @@
int newX = m->x();
int newY = m->y();
FPoint np(newX-Mxp, newY-Myp, 0, 0, currItem->rotation(), 1, 1, true);
- np = np * (1.0 / m_canvas->scale());
+ np = np * m_canvas->scaledLineWidth();
m_canvas->m_viewMode.operItemMoving = true;
currItem = m_doc->m_Selection->itemAt(0);
if ((m_doc->nodeEdit.SegP1 != -1) && (m_doc->nodeEdit.SegP2 != -1))
Modified: branches/Version135scrollfix/Scribus/scribus/canvasmode_normal.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16930&path=/branches/Version135scrollfix/Scribus/scribus/canvasmode_normal.cpp
==============================================================================
--- branches/Version135scrollfix/Scribus/scribus/canvasmode_normal.cpp (original)
+++ branches/Version135scrollfix/Scribus/scribus/canvasmode_normal.cpp Mon Oct 24 20:20:02 2011
@@ -373,7 +373,7 @@
if ((currItem->asImageFrame()) && (m->modifiers() & Qt::ControlModifier) && (m->modifiers() & Qt::AltModifier))
{
currItem->moveImageInFrame(dX/currItem->imageXScale(),dY/currItem->imageYScale());
- m_view->updateContents(currItem->getRedrawBounding(m_canvas->scale()));
+ m_view->updateCanvasItem(currItem);
}
else
{
@@ -426,7 +426,7 @@
gy = npw.y() - gh;
else
gy = npx.y();
- if ((fabs(gx - gxo) < (m_doc->guidesSettings.guideRad) / m_canvas->scale()) && (fabs(gy - gyo) < (m_doc->guidesSettings.guideRad) / m_canvas->scale()))
+ if ((fabs(gx - gxo) < m_canvas->scaledGuideRadius()) && (fabs(gy - gyo) < m_canvas->scaledGuideRadius()))
m_objectDeltaPos += FPoint(gx-gxo, gy-gyo);
}
}
@@ -482,7 +482,7 @@
gy = npw.y() - gh;
else
gy = npx.y();
- if ((fabs(gx - gxo) < (m_doc->guidesSettings.guideRad) / m_canvas->scale()) && (fabs(gy - gyo) < (m_doc->guidesSettings.guideRad) / m_canvas->scale()))
+ if ((fabs(gx - gxo) < m_canvas->scaledGuideRadius()) && (fabs(gy - gyo) < m_canvas->scaledGuideRadius()))
m_objectDeltaPos += FPoint(gx-gxo, gy-gyo);
}
}
@@ -497,8 +497,8 @@
m_doc->adjustCanvas(FPoint(gx,gy), FPoint(gx+gw, gy+gh));
QPoint selectionCenter = m_canvas->canvasToLocal(QPointF(gx+gw/2, gy+gh/2));
QPoint localMousePos = m_canvas->canvasToLocal(mousePointDoc);
- int localwidth = static_cast<int>(gw * m_canvas->scale());
- int localheight = static_cast<int>(gh * m_canvas->scale());
+ int localwidth = static_cast<int>(gw / m_canvas->scaledLineWidth());
+ int localheight = static_cast<int>(gh / m_canvas->scaledLineWidth());
if (localwidth > 200)
{
localwidth = 0;
@@ -865,7 +865,7 @@
gy = npw.y() - gh;
else
gy = npx.y();
- if ((fabs(gx - gxo) < (m_doc->guidesSettings.guideRad) / m_canvas->scale()) && (fabs(gy - gyo) < (m_doc->guidesSettings.guideRad) / m_canvas->scale()))
+ if ((fabs(gx - gxo) < m_canvas->scaledGuideRadius()) && (fabs(gy - gyo) < m_canvas->scaledGuideRadius()))
{
nx += (gx - gxo);
ny += (gy - gyo);
@@ -1029,9 +1029,9 @@
m_canvas->m_viewMode.m_MouseButtonPressed = true;
FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
m_mouseCurrentPoint = mousePointDoc;
- double grabRadius = m_doc->guidesSettings.grabRad / m_canvas->scale();
int MxpS = static_cast<int>(mousePointDoc.x());
int MypS = static_cast<int>(mousePointDoc.y());
+ double grabRadius = m_canvas->scaledGrabRadius();
QRectF mpo(m_mouseCurrentPoint.x()-grabRadius, m_mouseCurrentPoint.y()-grabRadius, grabRadius*2, grabRadius*2);
m_doc->nodeEdit.deselect();
Modified: branches/Version135scrollfix/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16930&path=/branches/Version135scrollfix/Scribus/scribus/scribusview.cpp
==============================================================================
--- branches/Version135scrollfix/Scribus/scribus/scribusview.cpp (original)
+++ branches/Version135scrollfix/Scribus/scribus/scribusview.cpp Mon Oct 24 20:20:02 2011
@@ -1334,7 +1334,7 @@
void ScribusView::RefreshGradient(PageItem *currItem, double dx, double dy)
{
QMatrix matrix;
- QRect rect = currItem->getRedrawBounding(m_canvas->scale());
+ QRect rect = m_canvas->canvasToLocal(currItem->getCurrentBoundingRect(5));
m_canvas->Transform(currItem, matrix);
FPointArray fpNew;
fpNew.setPoints(2, currItem->GrStartX, currItem->GrStartY, currItem->GrEndX, currItem->GrEndY);
@@ -1346,7 +1346,9 @@
int grb = (int) ceil ( qMax(fpNew.point(0).y(), fpNew.point(1).y()) + dy );
int grt = (int) floor( qMin(fpNew.point(0).y(), fpNew.point(1).y()) - dy );
rect |= QRect(grl, grt, grr-grl, grb-grt);
- updateContents(rect);
+ m_canvas->update(rect);
+ //or ?
+ //updateCanvas(rect);
}
@@ -1484,7 +1486,7 @@
currItem->ContourLine.translate(qRound((tp.x() + tp2.x()) / 2.0), qRound((tp.y() + tp2.y()) / 2.0));
updateContents();
currItem->FrameOnly = true;
- updateContents(currItem->getRedrawBounding(m_canvas->scale()));
+ updateCanvasItem(currItem);
if (UndoManager::undoEnabled())
{
undoManager->setUndoEnabled(false);
@@ -1846,7 +1848,7 @@
{
Doc->m_Selection->addItem(currItem);
currItem->isSingleSel = true;
- updateContents(currItem->getRedrawBounding(m_canvas->scale()));
+ updateCanvasItem(currItem);
}
else
{
@@ -1867,18 +1869,14 @@
Doc->m_Selection->addItem(Doc->Items->at(ga));
}
if (draw)
- {
- updateContents(currItem->getRedrawBounding(m_canvas->scale()));
- }
+ updateCanvasItem(currItem);
}
}
else
{
Doc->m_Selection->addItem(currItem);
if (draw)
- {
- updateContents(currItem->getRedrawBounding(m_canvas->scale()));
- }
+ updateCanvasItem(currItem);
}
//CB FIXME/TODO We are surely prepending here and we have turned off
//emitting in prepend below so do it here.
@@ -1948,7 +1946,6 @@
{
if (!Doc->m_Selection->isEmpty())
{
- const double scale = m_canvas->scale();
PageItem* currItem=NULL;
for (int a = 0; a < Doc->m_Selection->count(); ++a)
{
@@ -1961,7 +1958,8 @@
double x, y, w, h;
Doc->m_Selection->getGroupRect(&x, &y, &w, &h);
Doc->m_Selection->clear();
- updateCanvas(x - 5/scale, y - 5/scale, w + 10/scale, h + 10/scale);
+ double scaled5=5*m_canvas->scaledLineWidth();
+ updateCanvas(x - scaled5, y - scaled5, w + 2*scaled5, h + 2*scaled5);
}
else
{
@@ -1973,7 +1971,8 @@
}
Doc->m_Selection->clear();
if (currItem != NULL)
- updateContents(currItem->getRedrawBounding(scale));
+// updateContents(currItem->getRedrawBounding(scale));
+ updateCanvasItem(currItem);
}
}
if (prop && !Doc->m_Selection->signalsDelayed())
@@ -2482,13 +2481,13 @@
return;
if (Doc->guidesSettings.rulerMode)
{
- horizRuler->shift(x / m_canvas->scale() - Doc->currentPage()->xOffset());
- vertRuler->shift(y / m_canvas->scale() - Doc->currentPage()->yOffset());
+ horizRuler->shift(x * m_canvas->scaledLineWidth() - Doc->currentPage()->xOffset());
+ vertRuler->shift(y * m_canvas->scaledLineWidth() - Doc->currentPage()->yOffset());
}
else
{
- horizRuler->shift(x / m_canvas->scale());
- vertRuler->shift(y / m_canvas->scale());
+ horizRuler->shift(x * m_canvas->scaledLineWidth());
+ vertRuler->shift(y * m_canvas->scaledLineWidth());
}
// horizRuler->offs += qRound(Doc->minCanvasCoordinate.x() - 1 - Doc->rulerXoffset);
// vertRuler->offs += qRound(Doc->minCanvasCoordinate.y() - 1 - Doc->rulerYoffset);
@@ -2505,10 +2504,10 @@
uint docPageCount=Doc->Pages->count();
for (uint a = 0; a < docPageCount; ++a)
{
- int xs = static_cast<int>(Doc->Pages->at(a)->xOffset() * m_canvas->scale());
- int ys = static_cast<int>(Doc->Pages->at(a)->yOffset() * m_canvas->scale());
- int ws = static_cast<int>(Doc->Pages->at(a)->width() * m_canvas->scale());
- int hs = static_cast<int>(Doc->Pages->at(a)->height() * m_canvas->scale());
+ int xs = static_cast<int>(Doc->Pages->at(a)->xOffset() / m_canvas->scaledLineWidth());
+ int ys = static_cast<int>(Doc->Pages->at(a)->yOffset() / m_canvas->scaledLineWidth());
+ int ws = static_cast<int>(Doc->Pages->at(a)->width() / m_canvas->scaledLineWidth());
+ int hs = static_cast<int>(Doc->Pages->at(a)->height() / m_canvas->scaledLineWidth());
QRect drawRect = QRect(x, y, visibleWidth(), visibleHeight());
// drawRect.moveBy(qRound(-Doc->minCanvasCoordinate.x() * m_canvas->scale()), qRound(-Doc->minCanvasCoordinate.y() * m_canvas->scale()));
if (drawRect.intersects(QRect(xs, ys, ws, hs)))
@@ -2554,7 +2553,7 @@
{
Doc->reformPages(moveObjects);
if (!m_ScMW->scriptIsRunning())
- setContentsPos(qRound((Doc->currentPage()->xOffset()-10 - 0*Doc->minCanvasCoordinate.x()) * m_canvas->scale()), qRound((Doc->currentPage()->yOffset()-10 - 0*Doc->minCanvasCoordinate.y()) * m_canvas->scale()));
+ setContentsPos(qRound((Doc->currentPage()->xOffset()-10 - 0*Doc->minCanvasCoordinate.x()) / m_canvas->scaledLineWidth()), qRound((Doc->currentPage()->yOffset()-10 - 0*Doc->minCanvasCoordinate.y()) / m_canvas->scaledLineWidth()));
if (!Doc->isLoading())
{
setRulerPos(contentsX(), contentsY());
@@ -2621,21 +2620,24 @@
}
}
+void ScribusView::updateCanvasItem(PageItem* item)
+{
+ m_canvas->update(m_canvas->canvasToLocal(item->getCurrentBoundingRect(5)));
+}
/*!
Scrolls the canvas so (x,y) becomes the origin
*/
void ScribusView::setCanvasOrigin(double x, double y)
{
- double scale = m_canvas->scale();
- horizontalScrollBar()->setValue(qRound(x * scale));
- verticalScrollBar()->setValue(qRound(y * scale));
+ horizontalScrollBar()->setValue(qRound(x / m_canvas->scaledLineWidth()));
+ verticalScrollBar()->setValue(qRound(y / m_canvas->scaledLineWidth()));
// fix ranges
QSize maxViewport = maximumViewportSize();
- horizontalScrollBar()->setRange(qRound(Doc->minCanvasCoordinate.x() * scale),
- qRound(Doc->maxCanvasCoordinate.x() * scale) - maxViewport.width());
- verticalScrollBar()->setRange(qRound(Doc->minCanvasCoordinate.y() * scale),
- qRound(Doc->maxCanvasCoordinate.y() * scale) - maxViewport.height());
+ horizontalScrollBar()->setRange(qRound(Doc->minCanvasCoordinate.x() / m_canvas->scaledLineWidth()),
+ qRound(Doc->maxCanvasCoordinate.x() / m_canvas->scaledLineWidth()) - maxViewport.width());
+ verticalScrollBar()->setRange(qRound(Doc->minCanvasCoordinate.y() / m_canvas->scaledLineWidth()),
+ qRound(Doc->maxCanvasCoordinate.y() / m_canvas->scaledLineWidth()) - maxViewport.height());
}
@@ -2659,6 +2661,29 @@
verticalScrollBar()->setValue(qRound(verticalScrollBar()->value() + deltaX * scale));
}
+void ScribusView::ensureVisible ( int x, int y, int xmargin, int ymargin)
+{
+ double marginScale = 2 / scale();
+ FPoint tl = m_canvas->localToCanvas(QPoint(x-xmargin, y-ymargin));
+ ensureCanvasVisible(QRectF(tl.x(), tl.y(), xmargin*marginScale, ymargin*marginScale));
+}
+
+void ScribusView::ensureCanvasVisible(QRectF box)
+{
+ QRectF vis = visibleCanvas();
+ QPointF og = vis.topLeft();
+ if (box.contains(vis))
+ return;
+ if (box.left() < vis.left())
+ og.setX(box.left());
+ else if (box.right() > vis.right())
+ og.setX(box.right() - vis.width());
+ if (box.top() < vis.top())
+ og.setY(box.top());
+ else if (box.bottom() > vis.bottom())
+ og.setY(box.bottom() - vis.height());
+ setCanvasOrigin(og.x(), og.y());
+}
/*!
returns the canvas's origin in canvas coordinates.
@@ -3395,8 +3420,9 @@
if (GetItem(&currItem))
{
currItem->SetRectFrame();
- Doc->setRedrawBounding(currItem);
- updateContents(currItem->getRedrawBounding(m_canvas->scale()));
+// Doc->setRedrawBounding(currItem);
+// updateContents(currItem->getRedrawBounding(m_canvas->scale()));
+ updateCanvasItem(currItem);
}
}
@@ -3413,8 +3439,9 @@
return;
}
currItem->SetFrameRound();
- Doc->setRedrawBounding(currItem);
- updateContents(currItem->getRedrawBounding(m_canvas->scale()));
+// Doc->setRedrawBounding(currItem);
+// updateContents(currItem->getRedrawBounding(m_canvas->scale()));
+ updateCanvasItem(currItem);
}
}
@@ -3426,8 +3453,9 @@
if (GetItem(&currItem))
{
currItem->SetOvalFrame();
- Doc->setRedrawBounding(currItem);
- updateContents(currItem->getRedrawBounding(m_canvas->scale()));
+// Doc->setRedrawBounding(currItem);
+// updateContents(currItem->getRedrawBounding(m_canvas->scale()));
+ updateCanvasItem(currItem);
}
}
@@ -4790,7 +4818,7 @@
m_canvas->setScale(Scale);
zoomSpinBox->blockSignals(true);
- zoomSpinBox->setValue(m_canvas->scale()/Prefs->DisScale*100);
+ zoomSpinBox->setValue(m_canvas->zoomLevel());
zoomSpinBox->blockSignals(false);
unitChange();
Modified: branches/Version135scrollfix/Scribus/scribus/scribusview.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16930&path=/branches/Version135scrollfix/Scribus/scribus/scribusview.h
==============================================================================
--- branches/Version135scrollfix/Scribus/scribus/scribusview.h (original)
+++ branches/Version135scrollfix/Scribus/scribus/scribusview.h Mon Oct 24 20:20:02 2011
@@ -236,9 +236,13 @@
virtual void changed(QRectF re, bool);
void updateCanvas(QRectF box = QRectF());
+ void updateCanvasItem(PageItem* item);
void updateCanvas(double x, double y, double width, double height) { updateCanvas(QRectF(x,y,width,height)); }
void setCanvasOrigin(double x, double y);
+ void setCanvasOrigin(FPoint p) { setCanvasOrigin(p.x(), p.y()); }
void setCanvasCenter(double x, double y);
+ void ensureVisible ( int x, int y, int xmargin = 50, int ymargin = 50 );
+ void ensureCanvasVisible(QRectF box);
void scrollCanvasBy(double deltaX, double deltaY);
FPoint canvasOrigin() const;
QRectF visibleCanvas() const;
More information about the scribus-commit
mailing list