Ipelib
Public Member Functions | List of all members
ipe::Ellipse Class Reference

#include <ipeshape.h>

Inherits ipe::SubPath.

Public Member Functions

 Ellipse (const Matrix &m)
 
virtual Type type () const
 
virtual const EllipseasEllipse () const
 
Matrix matrix () const
 
virtual void save (Stream &stream) const
 
virtual void draw (Painter &painter) const
 
virtual void addToBBox (Rect &box, const Matrix &m, bool cp) const
 
virtual double distance (const Vector &v, const Matrix &m, double bound) const
 
virtual void snapVtx (const Vector &mouse, const Matrix &m, Vector &pos, double &bound, bool cp) const
 
virtual void snapBnd (const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const
 
- Public Member Functions inherited from ipe::SubPath
virtual ~SubPath ()=0
 
virtual bool closed () const
 
virtual const ClosedSplineasClosedSpline () const
 
virtual const CurveasCurve () const
 

Additional Inherited Members

- Public Types inherited from ipe::SubPath
enum  Type { ECurve , EEllipse , EClosedSpline }
 

Detailed Description

An ellipse subpath.

Constructor & Destructor Documentation

◆ Ellipse()

Ellipse::Ellipse ( const Matrix m)

Member Function Documentation

◆ type()

SubPath::Type Ellipse::type ( ) const
virtual

Return type of this subpath.

Implements ipe::SubPath.

References ipe::SubPath::EEllipse.

◆ asEllipse()

const Ellipse * Ellipse::asEllipse ( ) const
virtual

Return this object as an Ellipse, or nullptr if it's not an ellipse.

Reimplemented from ipe::SubPath.

◆ matrix()

Matrix ipe::Ellipse::matrix ( ) const
inline

Return matrix that transforms unit circle to the ellipse.

Referenced by save().

◆ save()

void Ellipse::save ( Stream stream) const
virtual

Save subpath to XML stream.

Implements ipe::SubPath.

References matrix().

◆ draw()

void Ellipse::draw ( Painter painter) const
virtual

Draw subpath (does not call drawPath()).

Implements ipe::SubPath.

References ipe::Painter::drawArc().

◆ addToBBox()

void Ellipse::addToBBox ( Rect box,
const Matrix m,
bool  cp 
) const
virtual

Add subpath to box.

Implements ipe::SubPath.

References ipe::Rect::addRect().

◆ distance()

double Ellipse::distance ( const Vector v,
const Matrix m,
double  bound 
) const
virtual

Return distance from v to subpath transformed by m.

Implements ipe::SubPath.

References ipe::Arc::distance().

◆ snapVtx()

void Ellipse::snapVtx ( const Vector mouse,
const Matrix m,
Vector pos,
double &  bound,
bool  cp 
) const
virtual

snaps to center of ellipse.

Implements ipe::SubPath.

◆ snapBnd()

void Ellipse::snapBnd ( const Vector mouse,
const Matrix m,
Vector pos,
double &  bound 
) const
virtual

Snap to boundary of subpath.

Implements ipe::SubPath.

References ipe::Arc::distance().


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