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

#include <qsvgstyle_p.h>

Inheritance diagram for QSvgOpacityStyle:
QSvgStyleProperty QSvgRefCounted

Public Functions

virtual void apply (QPainter *p, const QSvgNode *node, QSvgExtraStates &states)
 
 QSvgOpacityStyle (qreal opacity)
 
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

qreal m_oldOpacity
 
qreal m_opacity
 

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 220 of file qsvgstyle_p.h.

Constructors and Destructors

◆ QSvgOpacityStyle()

QSvgOpacityStyle::QSvgOpacityStyle ( qreal  opacity)

Definition at line 909 of file qsvgstyle.cpp.

910  : m_opacity(opacity), m_oldOpacity(0)
911 {
912 
913 }

Functions

◆ apply()

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

Implements QSvgStyleProperty.

Definition at line 915 of file qsvgstyle.cpp.

916 {
917  m_oldOpacity = p->opacity();
919 }
qreal opacity() const
Returns the opacity of the painter.
Definition: qpainter.cpp:2115
void setOpacity(qreal opacity)
Sets the opacity of the painter to opacity.
Definition: qpainter.cpp:2139

◆ revert()

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

Implements QSvgStyleProperty.

Definition at line 921 of file qsvgstyle.cpp.

922 {
924 }
void setOpacity(qreal opacity)
Sets the opacity of the painter to opacity.
Definition: qpainter.cpp:2139

◆ type()

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

Implements QSvgStyleProperty.

Definition at line 926 of file qsvgstyle.cpp.

927 {
928  return OPACITY;
929 }

Properties

◆ m_oldOpacity

qreal QSvgOpacityStyle::m_oldOpacity
private

Definition at line 229 of file qsvgstyle_p.h.

Referenced by apply(), and revert().

◆ m_opacity

qreal QSvgOpacityStyle::m_opacity
private

Definition at line 228 of file qsvgstyle_p.h.

Referenced by apply().


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