r13916 by fschmid - WPG-Import: some corrections for WP1 fillmodes.
scribus-commit
scribus-commit at lists.scribus.net
Wed Aug 26 05:57:41 CEST 2009
Revision: 13916
Author: fschmid
Date: 2009-08-25T20:31:48.589232Z
Commit message: WPG-Import: some corrections for WP1 fillmodes.
Changeset:
M /trunk/Scribus/scribus/plugins/wpgimplugin/importwpg.cpp
Diffs:
Index: scribus/plugins/wpgimplugin/importwpg.cpp
===================================================================
--- scribus/plugins/wpgimplugin/importwpg.cpp (revision 13915)
+++ scribus/plugins/wpgimplugin/importwpg.cpp (revision 13916)
@@ -71,7 +71,7 @@
LineW = 1.0;
lineJoin = Qt::MiterJoin;
lineEnd = Qt::FlatCap;
- fillrule = false;
+ fillrule = true;
gradientAngle = 0.0;
isGradient = false;
fillSet = false;
@@ -200,8 +200,8 @@
CurrColorFill = "Black";
CurrFillShade = 100.0;
int Rc, Gc, Bc, hR, hG, hB;
- if (brush.style != libwpg::WPGBrush::NoBrush)
- {
+// if (brush.style != libwpg::WPGBrush::NoBrush)
+// {
if(brush.style == libwpg::WPGBrush::Solid)
{
bool found = false;
@@ -273,8 +273,10 @@
currentGradient.addStop( ScColorEngine::getRGBColor(gradC, m_Doc), fabs(brush.gradient.stopOffset(c)), 0.5, 1.0, currStopColor, 100 );
}
}
+ else if (brush.style == libwpg::WPGBrush::NoBrush)
+ CurrColorFill = CommonStrings::None;
fillSet = true;
- }
+// }
}
void ScrPainter::setFillRule(FillRule rule)
@@ -283,6 +285,7 @@
fillrule = false;
else
fillrule = true;
+// qDebug() << "Fill Rule " << fillrule;
}
void ScrPainter::drawRectangle(const libwpg::WPGRect& rect, double rx, double ry)
@@ -300,6 +303,7 @@
ite->PoLine.map(mm);
ite->PoLine.translate(m_Doc->currentPage()->xOffset(), m_Doc->currentPage()->yOffset());
finishItem(ite);
+// qDebug() << "draw Rect";
}
void ScrPainter::drawEllipse(const libwpg::WPGPoint& center, double rx, double ry)
@@ -311,6 +315,7 @@
ite->PoLine.map(mm);
ite->PoLine.translate(m_Doc->currentPage()->xOffset(), m_Doc->currentPage()->yOffset());
finishItem(ite);
+// qDebug() << "draw Ellipse";
}
void ScrPainter::drawPolygon(const libwpg::WPGPointArray& vertices, bool closed)
@@ -339,6 +344,7 @@
ite->PoLine.translate(m_Doc->currentPage()->xOffset(), m_Doc->currentPage()->yOffset());
finishItem(ite);
}
+// qDebug() << "draw Polygon";
}
void ScrPainter::drawPath(const libwpg::WPGPath& path)
@@ -390,6 +396,7 @@
ite->PoLine.translate(m_Doc->currentPage()->xOffset(), m_Doc->currentPage()->yOffset());
finishItem(ite);
}
+// qDebug() << "draw Path";
}
void ScrPainter::finishItem(PageItem* ite)
@@ -439,7 +446,7 @@
lineJoin = Qt::MiterJoin;
lineEnd = Qt::FlatCap;
LineW = 1.0;
- fillrule = false;
+ fillrule = true;
gradientAngle = 0.0;
}
@@ -470,11 +477,12 @@
ite->setImageScalingMode(false, false);
ite->moveBy(m_Doc->currentPage()->xOffset(), m_Doc->currentPage()->yOffset());
finishItem(ite);
+// qDebug() << "drawBitmap";
}
void ScrPainter::drawImageObject(const libwpg::WPGBinaryData& /*binaryData*/)
{
- printf("RawPainter::drawBinaryData\n");
+// qDebug() << "drawBinaryData";
}
More information about the scribus-commit
mailing list