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

#include <qsvggraphics_p.h>

Inheritance diagram for QSvgEllipse:
QSvgNode QSvgCircle

Public Functions

virtual QRectF bounds (QPainter *p, QSvgExtraStates &states) const
 
virtual void draw (QPainter *p, QSvgExtraStates &states)
 
 QSvgEllipse (QSvgNode *parent, const QRectF &rect)
 
virtual Type type () const
 
- Public Functions inherited from QSvgNode
void appendStyleProperty (QSvgStyleProperty *prop, const QString &id)
 
void applyStyle (QPainter *p, QSvgExtraStates &states) const
 
DisplayMode displayMode () const
 
QSvgTinyDocumentdocument () const
 
bool isVisible () const
 
QString nodeId () const
 
QSvgNodeparent () const
 
 QSvgNode (QSvgNode *parent=0)
 
const QStringListrequiredExtensions () const
 
const QStringListrequiredFeatures () const
 
const QStringListrequiredFonts () const
 
const QStringListrequiredFormats () const
 
const QStringListrequiredLanguages () const
 
void revertStyle (QPainter *p, QSvgExtraStates &states) const
 
void setDisplayMode (DisplayMode display)
 
void setNodeId (const QString &i)
 
void setRequiredExtensions (const QStringList &lst)
 
void setRequiredFeatures (const QStringList &lst)
 
void setRequiredFonts (const QStringList &lst)
 
void setRequiredFormats (const QStringList &lst)
 
void setRequiredLanguages (const QStringList &lst)
 
void setVisible (bool visible)
 
void setXmlClass (const QString &str)
 
QSvgStylePropertystyleProperty (QSvgStyleProperty::Type type) const
 
QSvgFillStylePropertystyleProperty (const QString &id) const
 
virtual QRectF transformedBounds (QPainter *p, QSvgExtraStates &states) const
 
QRectF transformedBounds () const
 
QString xmlClass () const
 
virtual ~QSvgNode ()
 

Properties

QRectF m_bounds
 

Additional Inherited Members

- Public Types inherited from QSvgNode
enum  DisplayMode {
  InlineMode, BlockMode, ListItemMode, RunInMode,
  CompactMode, MarkerMode, TableMode, InlineTableMode,
  TableRowGroupMode, TableHeaderGroupMode, TableFooterGroupMode, TableRowMode,
  TableColumnGroupMode, TableColumnMode, TableCellMode, TableCaptionMode,
  NoneMode, InheritMode
}
 
enum  Type {
  DOC, G, DEFS, SWITCH,
  ANIMATION, ARC, CIRCLE, ELLIPSE,
  IMAGE, LINE, PATH, POLYGON,
  POLYLINE, RECT, TEXT, TEXTAREA,
  TSPAN, USE, VIDEO
}
 
- Static Protected Functions inherited from QSvgNode
static qreal strokeWidth (QPainter *p)
 
- Protected Variables inherited from QSvgNode
QSvgStyle m_style
 

Detailed Description

Definition at line 88 of file qsvggraphics_p.h.

Constructors and Destructors

◆ QSvgEllipse()

QSvgEllipse::QSvgEllipse ( QSvgNode parent,
const QRectF rect 
)

Definition at line 89 of file qsvggraphics.cpp.

90  : QSvgNode(parent), m_bounds(rect)
91 {
92 }
QSvgNode(QSvgNode *parent=0)
Definition: qsvgnode.cpp:52
QRectF m_bounds

Functions

◆ bounds()

QRectF QSvgEllipse::bounds ( QPainter p,
QSvgExtraStates states 
) const
virtual

Reimplemented from QSvgNode.

Definition at line 95 of file qsvggraphics.cpp.

96 {
97  QPainterPath path;
98  path.addEllipse(m_bounds);
99  qreal sw = strokeWidth(p);
100  return qFuzzyIsNull(sw) ? p->transform().map(path).boundingRect() : boundsOnStroke(p, path, sw);
101 }
double qreal
Definition: qglobal.h:1193
const QTransform & transform() const
Returns the world transformation matrix.
Definition: qpainter.cpp:9558
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
Definition: qpainterpath.h:67
QPoint map(const QPoint &p) const
Creates and returns a QPoint object that is a copy of the given point, mapped into the coordinate sys...
static qreal strokeWidth(QPainter *p)
Definition: qsvgnode.cpp:335
static QRectF boundsOnStroke(QPainter *p, const QPainterPath &path, qreal width)
static Q_DECL_CONSTEXPR bool qFuzzyIsNull(double d)
Definition: qglobal.h:2043
QRectF m_bounds
void addEllipse(const QRectF &rect)
Creates an ellipse within the specified boundingRectangle and adds it to the painter path as a closed...

◆ draw()

void QSvgEllipse::draw ( QPainter p,
QSvgExtraStates states 
)
virtual

Implements QSvgNode.

Definition at line 103 of file qsvggraphics.cpp.

104 {
105  applyStyle(p, states);
107  revertStyle(p, states);
108 }
void applyStyle(QPainter *p, QSvgExtraStates &states) const
Definition: qsvgnode.cpp:118
void drawEllipse(const QRectF &r)
Draws the ellipse defined by the given rectangle.
Definition: qpainter.cpp:4464
#define QT_SVG_DRAW_SHAPE(command)
void revertStyle(QPainter *p, QSvgExtraStates &states) const
Definition: qsvgnode.cpp:123
QRectF m_bounds

◆ type()

QSvgNode::Type QSvgEllipse::type ( ) const
virtual

Implements QSvgNode.

Reimplemented in QSvgCircle.

Definition at line 509 of file qsvggraphics.cpp.

510 {
511  return ELLIPSE;
512 }

Properties

◆ m_bounds

QRectF QSvgEllipse::m_bounds
private

Definition at line 96 of file qsvggraphics_p.h.

Referenced by bounds(), and draw().


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