r16442 by fschmid - Some fixes for the .ai importer.
scribus-commit
scribus-commit at lists.scribus.net
Sat Mar 12 12:24:38 CET 2011
Author: fschmid
Date: Sat Mar 12 11:24:37 2011
New Revision: 16442
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16442
Log:
Some fixes for the .ai importer.
Modified:
trunk/Scribus/scribus/canvasmode.cpp
trunk/Scribus/scribus/plugins/import/ai/importai.cpp
trunk/Scribus/scribus/util_math.cpp
Modified: trunk/Scribus/scribus/canvasmode.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16442&path=/trunk/Scribus/scribus/canvasmode.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode.cpp (original)
+++ trunk/Scribus/scribus/canvasmode.cpp Sat Mar 12 11:24:37 2011
@@ -443,10 +443,10 @@
}
p->scale(scalex, scaley);
PageItem_Group* gItem = currItem->asGroupFrame();
- p->scale(gItem->width() / gItem->groupWidth, gItem->height() / gItem->groupHeight);
uint itemCountG = gItem->groupItemList.count();
if (itemCountG < m_canvas->moveWithFullOutlinesThreshold)
{
+ p->scale(gItem->width() / gItem->groupWidth, gItem->height() / gItem->groupHeight);
for (uint cg = 0; cg < itemCountG; cg++)
{
p->save();
Modified: trunk/Scribus/scribus/plugins/import/ai/importai.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16442&path=/trunk/Scribus/scribus/plugins/import/ai/importai.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/ai/importai.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/ai/importai.cpp Sat Mar 12 11:24:37 2011
@@ -1457,7 +1457,8 @@
/* Start Object creation commands */
else if ((command == "b") || (command == "B") || (command == "f") || (command == "F") || (command == "s") || (command == "S"))
{
- if (Coords.size() > 3)
+ FPoint wh = Coords.WidthHeight();
+ if ((Coords.size() > 3) && (wh.x() != 0.0) && (wh.y() != 0.0))
{
if ((!WasU) || ((WasU) && (FirstU)))
{
@@ -2774,7 +2775,7 @@
pos += QPointF(baseX, -baseY);
int z = m_Doc->itemAdd(PageItem::ImageFrame, PageItem::Unspecified, pos.x() - docX, docHeight - (pos.y() - docY), 10, 10, 0, CurrColorFill, CurrColorStroke, true);
PageItem* ite = m_Doc->Items->at(z);
- ite->setWidthHeight(w * m1, h * m4);
+ ite->setWidthHeight(fabs(w * m1), fabs(h * m4));
double rotation = getRotationFromMatrix(imgMatrix, 0.0);
ite->setRotation(rotation * 180 / M_PI);
ite->SetRectFrame();
Modified: trunk/Scribus/scribus/util_math.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16442&path=/trunk/Scribus/scribus/util_math.cpp
==============================================================================
--- trunk/Scribus/scribus/util_math.cpp (original)
+++ trunk/Scribus/scribus/util_math.cpp Sat Mar 12 11:24:37 2011
@@ -23,6 +23,7 @@
#include "util_math.h"
#include "scconfig.h"
+#include "sclimits.h"
#include "fpoint.h"
#include "fpointarray.h"
@@ -381,8 +382,8 @@
FPoint getMinClipF(FPointArray* Clip)
{
FPoint np, rp;
- double mx = 99999;
- double my = 99999;
+ double mx = std::numeric_limits<double>::max();
+ double my = std::numeric_limits<double>::max();
uint clipSize=Clip->size();
for (uint c = 0; c < clipSize; ++c)
{
More information about the scribus-commit
mailing list