numStr.chop(2);
type = QSvgHandler::LT_IN;
} else {
- type = handler->defaultCoordinateSystem();
+ type = QSvgHandler::LT_PX;
//type = QSvgHandler::LT_OTHER;
}
qreal len = toDouble(numStr, ok);
const QXmlStreamAttributes &attributes,
QSvgHandler *handler)
{
- Q_UNUSED(parent); Q_UNUSED(attributes);
+ Q_UNUSED(parent);
QString baseProfile = attributes.value(QLatin1String("baseProfile")).toString();
#if 0
}
node->setViewBox(QRectF(0, 0, width, height));
}
- handler->setDefaultCoordinateSystem(QSvgHandler::LT_PX);
return node;
}
}
static bool parseTbreakNode(QSvgNode *parent,
- const QXmlStreamAttributes &,
+ const QXmlStreamAttributes &attributes,
QSvgHandler *)
{
+ Q_UNUSED(attributes);
if (parent->type() != QSvgNode::TEXTAREA)
return false;
static_cast<QSvgText*>(parent)->addLineBreak();
m_doc = 0;
m_style = 0;
m_animEnd = 0;
- m_defaultCoords = LT_PX;
m_defaultPen = QPen(Qt::black, 1, Qt::SolidLine, Qt::FlatCap, Qt::SvgMiterJoin);
m_defaultPen.setMiterLimit(4);
return m_doc;
}
-QSvgHandler::LengthType QSvgHandler::defaultCoordinateSystem() const
-{
- return m_defaultCoords;
-}
-
-void QSvgHandler::setDefaultCoordinateSystem(LengthType type)
-{
- m_defaultCoords = type;
-}
-
void QSvgHandler::pushColor(const QColor &color)
{
m_colorStack.push(color);
class QSvgNode;
class QSvgTinyDocument;
-class QSvgHandler;
class QColor;
class QSvgStyleSelector;
class QXmlStreamReader;
LT_OTHER
};
-public:
QSvgHandler(QIODevice *device);
QSvgHandler(const QByteArray &data);
QSvgHandler(QXmlStreamReader *const data);
inline QString errorString() const { return xml->errorString(); }
inline int lineNumber() const { return xml->lineNumber(); }
- void setDefaultCoordinateSystem(LengthType type);
- LengthType defaultCoordinateSystem() const;
-
void pushColor(const QColor &color);
void pushColorCopy();
void popColor();
inline QPen defaultPen() const
{ return m_defaultPen; }
-public:
bool startElement(const QString &localName, const QXmlStreamAttributes &attributes);
bool endElement(const QStringRef &localName);
bool characters(const QStringRef &str);
QSvgRefCounter<QSvgStyleProperty> m_style;
- LengthType m_defaultCoords;
-
QStack<QColor> m_colorStack;
QStack<int> m_colorTagCount;