mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 10:52:56 +00:00
drop noop SVG quality implementation
altought it would be pretty easy to implement it seems to be in somewhat unsupported state anyway, for reference: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering https://developer.mozilla.org/en-US/docs/Web/CSS/image-rendering Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
dcddc9b718
commit
041b961c0b
3 changed files with 2 additions and 71 deletions
|
@ -42,10 +42,6 @@ void QSvgNode::appendStyleProperty(QSvgStyleProperty *prop, const QString &id)
|
|||
{
|
||||
//qDebug()<<"appending "<<prop->type()<< " ("<< id <<") "<<"to "<<this<<this->type();
|
||||
switch (prop->type()) {
|
||||
case QSvgStyleProperty::QUALITY: {
|
||||
m_style.quality = static_cast<QSvgQualityStyle*>(prop);
|
||||
break;
|
||||
}
|
||||
case QSvgStyleProperty::FILL: {
|
||||
m_style.fill = static_cast<QSvgFillStyle*>(prop);
|
||||
break;
|
||||
|
@ -110,10 +106,6 @@ QSvgStyleProperty * QSvgNode::styleProperty(QSvgStyleProperty::Type type) const
|
|||
const QSvgNode *node = this;
|
||||
while (node) {
|
||||
switch (type) {
|
||||
case QSvgStyleProperty::QUALITY:
|
||||
if (node->m_style.quality)
|
||||
return node->m_style.quality;
|
||||
break;
|
||||
case QSvgStyleProperty::FILL:
|
||||
if (node->m_style.fill)
|
||||
return node->m_style.fill;
|
||||
|
|
|
@ -60,20 +60,6 @@ void QSvgFillStyleProperty::revert(QPainter *, QSvgExtraStates &)
|
|||
Q_ASSERT(!"This should not be called!");
|
||||
}
|
||||
|
||||
|
||||
QSvgQualityStyle::QSvgQualityStyle(int color)
|
||||
{
|
||||
Q_UNUSED(color);
|
||||
}
|
||||
void QSvgQualityStyle::apply(QPainter *, const QSvgNode *, QSvgExtraStates &)
|
||||
{
|
||||
|
||||
}
|
||||
void QSvgQualityStyle::revert(QPainter *, QSvgExtraStates &)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QSvgFillStyle::QSvgFillStyle()
|
||||
: m_style(0)
|
||||
, m_fillRule(Qt::WindingFill)
|
||||
|
@ -425,11 +411,6 @@ void QSvgTransformStyle::revert(QPainter *p, QSvgExtraStates &)
|
|||
p->setWorldTransform(m_oldWorldTransform, false /* don't combine */);
|
||||
}
|
||||
|
||||
QSvgStyleProperty::Type QSvgQualityStyle::type() const
|
||||
{
|
||||
return QUALITY;
|
||||
}
|
||||
|
||||
QSvgStyleProperty::Type QSvgFillStyle::type() const
|
||||
{
|
||||
return FILL;
|
||||
|
@ -494,10 +475,6 @@ QSvgStyle::~QSvgStyle()
|
|||
|
||||
void QSvgStyle::apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states)
|
||||
{
|
||||
if (quality) {
|
||||
quality->apply(p, node, states);
|
||||
}
|
||||
|
||||
if (fill) {
|
||||
fill->apply(p, node, states);
|
||||
}
|
||||
|
@ -529,10 +506,6 @@ void QSvgStyle::apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states
|
|||
|
||||
void QSvgStyle::revert(QPainter *p, QSvgExtraStates &states)
|
||||
{
|
||||
if (quality) {
|
||||
quality->revert(p, states);
|
||||
}
|
||||
|
||||
if (fill) {
|
||||
fill->revert(p, states);
|
||||
}
|
||||
|
|
|
@ -134,7 +134,6 @@ class QSvgStyleProperty : public QSvgRefCounted
|
|||
public:
|
||||
enum Type
|
||||
{
|
||||
QUALITY,
|
||||
FILL,
|
||||
VIEWPORT_FILL,
|
||||
FONT,
|
||||
|
@ -160,38 +159,6 @@ public:
|
|||
virtual void revert(QPainter *p, QSvgExtraStates &states);
|
||||
};
|
||||
|
||||
class QSvgQualityStyle : public QSvgStyleProperty
|
||||
{
|
||||
public:
|
||||
QSvgQualityStyle(int color);
|
||||
virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
|
||||
virtual void revert(QPainter *p, QSvgExtraStates &states);
|
||||
virtual Type type() const;
|
||||
private:
|
||||
// color-render ing v v 'auto' | 'optimizeSpeed' |
|
||||
// 'optimizeQuality' | 'inherit'
|
||||
//int m_colorRendering;
|
||||
|
||||
// shape-rendering v v 'auto' | 'optimizeSpeed' | 'crispEdges' |
|
||||
// 'geometricPrecision' | 'inherit'
|
||||
//QSvgShapeRendering m_shapeRendering;
|
||||
|
||||
|
||||
// text-rendering v v 'auto' | 'optimizeSpeed' | 'optimizeLegibility'
|
||||
// | 'geometricPrecision' | 'inherit'
|
||||
//QSvgTextRendering m_textRendering;
|
||||
|
||||
|
||||
// vector-effect v x 'default' | 'non-scaling-stroke' | 'inherit'
|
||||
//QSvgVectorEffect m_vectorEffect;
|
||||
|
||||
// image-rendering v v 'auto' | 'optimizeSpeed' | 'optimizeQuality' |
|
||||
// 'inherit'
|
||||
//QSvgImageRendering m_imageRendering;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class QSvgOpacityStyle : public QSvgStyleProperty
|
||||
{
|
||||
public:
|
||||
|
@ -624,8 +591,7 @@ class QSvgStyle
|
|||
{
|
||||
public:
|
||||
QSvgStyle()
|
||||
: quality(0),
|
||||
fill(0),
|
||||
: fill(0),
|
||||
viewportFill(0),
|
||||
font(0),
|
||||
stroke(0),
|
||||
|
@ -639,7 +605,7 @@ public:
|
|||
|
||||
void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
|
||||
void revert(QPainter *p, QSvgExtraStates &states);
|
||||
QSvgRefCounter<QSvgQualityStyle> quality;
|
||||
|
||||
QSvgRefCounter<QSvgFillStyle> fill;
|
||||
QSvgRefCounter<QSvgViewportFillStyle> viewportFill;
|
||||
QSvgRefCounter<QSvgFontStyle> font;
|
||||
|
|
Loading…
Add table
Reference in a new issue