Qt 4.8
Public Functions | Properties | List of all members
QSvgTransformStyle Class Reference

#include <qsvgstyle_p.h>

Inheritance diagram for QSvgTransformStyle:
QSvgStyleProperty QSvgRefCounted

Public Functions

virtual void apply (QPainter *p, const QSvgNode *node, QSvgExtraStates &states)
 
 QSvgTransformStyle (const QTransform &transform)
 
const QTransformqtransform () const
 
virtual void revert (QPainter *p, QSvgExtraStates &states)
 
virtual Type type () const
 
- Public Functions inherited from QSvgStyleProperty
virtual ~QSvgStyleProperty ()
 
- Public Functions inherited from QSvgRefCounted
void deref ()
 
 QSvgRefCounted ()
 
void ref ()
 
virtual ~QSvgRefCounted ()
 

Properties

QTransform m_oldWorldTransform
 
QTransform m_transform
 

Additional Inherited Members

- Public Types inherited from QSvgStyleProperty
enum  Type {
  QUALITY, FILL, VIEWPORT_FILL, FONT,
  STROKE, SOLID_COLOR, GRADIENT, TRANSFORM,
  ANIMATE_TRANSFORM, ANIMATE_COLOR, OPACITY, COMP_OP
}
 

Detailed Description

Definition at line 616 of file qsvgstyle_p.h.

Constructors and Destructors

◆ QSvgTransformStyle()

QSvgTransformStyle::QSvgTransformStyle ( const QTransform transform)

Definition at line 441 of file qsvgstyle.cpp.

442  : m_transform(trans)
443 {
444 }
QTransform m_transform
Definition: qsvgstyle_p.h:630

Functions

◆ apply()

void QSvgTransformStyle::apply ( QPainter p,
const QSvgNode node,
QSvgExtraStates states 
)
virtual

Implements QSvgStyleProperty.

Definition at line 446 of file qsvgstyle.cpp.

447 {
449  p->setWorldTransform(m_transform, true);
450 }
const QTransform & worldTransform() const
Returns the world transformation matrix.
Definition: qpainter.cpp:9652
QTransform m_transform
Definition: qsvgstyle_p.h:630
QTransform m_oldWorldTransform
Definition: qsvgstyle_p.h:631
void setWorldTransform(const QTransform &matrix, bool combine=false)
Sets the world transformation matrix.
Definition: qpainter.cpp:9630

◆ qtransform()

const QTransform& QSvgTransformStyle::qtransform ( ) const
inline

Definition at line 624 of file qsvgstyle_p.h.

Referenced by QSvgTinyDocument::matrixForElement().

625  {
626  return m_transform;
627  }
QTransform m_transform
Definition: qsvgstyle_p.h:630

◆ revert()

void QSvgTransformStyle::revert ( QPainter p,
QSvgExtraStates states 
)
virtual

Implements QSvgStyleProperty.

Definition at line 452 of file qsvgstyle.cpp.

453 {
454  p->setWorldTransform(m_oldWorldTransform, false /* don't combine */);
455 }
QTransform m_oldWorldTransform
Definition: qsvgstyle_p.h:631
void setWorldTransform(const QTransform &matrix, bool combine=false)
Sets the world transformation matrix.
Definition: qpainter.cpp:9630

◆ type()

QSvgStyleProperty::Type QSvgTransformStyle::type ( ) const
virtual

Implements QSvgStyleProperty.

Definition at line 492 of file qsvgstyle.cpp.

493 {
494  return TRANSFORM;
495 }

Properties

◆ m_oldWorldTransform

QTransform QSvgTransformStyle::m_oldWorldTransform
private

Definition at line 631 of file qsvgstyle_p.h.

Referenced by apply(), and revert().

◆ m_transform

QTransform QSvgTransformStyle::m_transform
private

Definition at line 630 of file qsvgstyle_p.h.

Referenced by apply().


The documentation for this class was generated from the following files: