Kig Python Scripting API Documentation

Public Member Functions | Static Public Member Functions | List of all members
Circle Class Reference

An Object representing a circle. More...

Inheritance diagram for Circle:
Inheritance graph
[legend]
Collaboration diagram for Circle:
Collaboration graph
[legend]

Public Member Functions

 Circle (const Coordinate &center, double radius)
 Construct a Circle with a given center and radius.
 
Circlecopy () const
 Returns a copy of this Object. More...
 
Objecttransform (const Transformation &) const
 Return this Object, transformed by the transformation t.
 
const ObjectTypetype () const
 Returns the lowermost ObjectType that this object is an instantiation of. More...
 
const Coordinate center () const
 Return the center of this circle.
 
double radius () const
 Return the radius of this circle.
 
double squareRadius () const
 Return the square radius of this circle. More...
 
double surface () const
 Return the surface of this circle.
 
double circumference () const
 Return the circumference of this circle.
 
int conicType () const
 Always returns 1, since a circle always is an ellipse.
 
const ConicCartesianData cartesianData () const
 Return the cartesian representation of this conic.
 
const ConicPolarData polarData () const
 Return the polar representation of this conic.
 
Coordinate focus1 () const
 The first focus of a circle is simply its center.
 
Coordinate focus2 () const
 The second focus of a circle is simply its center.
 
TQString cartesianEquationString (const KigDocument &w) const
 Return a string containing the cartesian equation of this circle. More...
 
TQString simplyCartesianEquationString (const KigDocument &w) const
 Return a string containing the cartesian equation of this circle. More...
 
TQString polarEquationString (const KigDocument &w) const
 Return a string containing the polar equation of this circle. More...
 
bool equals (const Object &rhs) const
 Returns true if this Object is equal to rhs. More...
 
- Public Member Functions inherited from Conic
virtual TQString conicTypeString () const
 A string containing "Hyperbola", "Parabola" or "Ellipse".
 
bool containsPoint (const Coordinate &p, const KigDocument &doc) const
 Return whether this Curve contains the given point. More...
 
- Public Member Functions inherited from Curve
Coordinate attachPoint () const
 Returns a reference point where to attach labels; when this returns an invalidCoord then the attachment is either not done at all, or done in a specific way (like for curves, or for points) The treatment of points could also take advantage of this attachment mechanism. More...
 
- Public Member Functions inherited from Object
bool inherits (const ObjectType *t) const
 Returns true if this Object inherits the Object type represented by t. More...
 
bool valid () const
 Returns true if this is a valid Object. More...
 

Static Public Member Functions

static const ObjectTypestype ()
 Returns the ObjectType representing the Circle type. More...
 
- Static Public Member Functions inherited from Conic
static const ObjectTypestype ()
 Returns the ObjectType representing the Conic type.
 
- Static Public Member Functions inherited from Curve
static const ObjectTypestype ()
 Returns the ObjectType representing the Curve type.
 
- Static Public Member Functions inherited from Object
static const ObjectTypestype ()
 The ObjectType representing the base Object class. More...
 

Detailed Description

An Object representing a circle.

This class is a subclass of Conic, ensuring that a circle can be used as a conic.

Member Function Documentation

◆ cartesianEquationString()

TQString Circle::cartesianEquationString ( const KigDocument &  w) const
virtual

Return a string containing the cartesian equation of this circle.

This will be of the form "x^2 + y^2 + a x + b y + c = 0"

Reimplemented from Conic.

◆ copy()

Circle* Circle::copy ( ) const
virtual

Returns a copy of this Object.

The copy is an exact copy. Changes to the copy don't affect the original.

Implements Curve.

◆ equals()

bool Circle::equals ( const Object rhs) const
virtual

Returns true if this Object is equal to rhs.

This function checks whether rhs is of the same Object type, and whether it contains the same data as this Object.

Reimplemented from Conic.

◆ polarEquationString()

TQString Circle::polarEquationString ( const KigDocument &  w) const
virtual

Return a string containing the polar equation of this circle.

This will be of the form "rho = r [centered at p]"

Reimplemented from Conic.

◆ simplyCartesianEquationString()

TQString Circle::simplyCartesianEquationString ( const KigDocument &  w) const

Return a string containing the cartesian equation of this circle.

This will be of the form "( x - x0 )^2 + ( y - y0 )^2 = r^2"

◆ squareRadius()

double Circle::squareRadius ( ) const

Return the square radius of this circle.

Use this in preference to sqr( radius() ).

◆ stype()

static const ObjectType* Circle::stype ( )
static

Returns the ObjectType representing the Circle type.

◆ type()

const ObjectType* Circle::type ( ) const
virtual

Returns the lowermost ObjectType that this object is an instantiation of.

E.g. if you want to get a string containing the internal name of the type of an object, you can do:

std::string typename = object.type()->internalName();

Reimplemented from Conic.

KDE Logo
This file is part of the documentation for tdelibs .
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed May 15 2024 09:48:27 by doxygen 1.8.13 written by Dimitri van Heesch, © 1997-2001