• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kig

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
CurveImp Class Referenceabstract

#include <curve_imp.h>

Inheritance diagram for CurveImp:
Inheritance graph
[legend]

Public Types

typedef ObjectImp Parent
 

Public Member Functions

Coordinate attachPoint () const
 
QString cartesianEquationString (const KigDocument &w) const
 
virtual bool containsPoint (const Coordinate &p, const KigDocument &) const =0
 
virtual CurveImp * copy () const =0
 
virtual double getParam (const Coordinate &point, const KigDocument &) const
 
virtual const Coordinate getPoint (double param, const KigDocument &) const =0
 
- Public Member Functions inherited from ObjectImp
virtual ~ObjectImp ()
 
virtual bool canFillInNextEscape () const
 
virtual bool contains (const Coordinate &p, int width, const KigWidget &si) const =0
 
virtual void draw (KigPainter &p) const =0
 
virtual bool equals (const ObjectImp &rhs) const =0
 
virtual void fillInNextEscape (QString &s, const KigDocument &) const
 
int getPropGid (const char *pname) const
 
int getPropLid (int propgid) const
 
const char * getPropName (int propgid) const
 
virtual const char * iconForProperty (int which) const
 
virtual const ObjectImpType * impRequirementForProperty (int which) const
 
bool inherits (const ObjectImpType *t) const
 
virtual bool inRect (const Rect &r, int width, const KigWidget &si) const =0
 
virtual bool isCache () const
 
virtual bool isPropertyDefinedOnOrThroughThisImp (int which) const
 
virtual int numberOfProperties () const
 
virtual const QByteArrayList properties () const
 
virtual const QByteArrayList propertiesInternalNames () const
 
virtual ObjectImp * property (int which, const KigDocument &d) const
 
virtual Rect surroundingRect () const =0
 
virtual ObjectImp * transform (const Transformation &t) const =0
 
virtual const ObjectImpType * type () const =0
 
bool valid () const
 
virtual void visit (ObjectImpVisitor *vtor) const =0
 

Static Public Member Functions

static const ObjectImpType * stype ()
 
- Static Public Member Functions inherited from ObjectImp
static const ObjectImpType * stype ()
 

Protected Member Functions

double getDist (double param, const Coordinate &p, const KigDocument &doc) const
 
double getParamofmin (double a, double b, const Coordinate &p, const KigDocument &doc) const
 
- Protected Member Functions inherited from ObjectImp
 ObjectImp ()
 

Detailed Description

This class represents a curve: something which is composed of points, like a line, a circle, a locus.

Definition at line 27 of file curve_imp.h.

Member Typedef Documentation

typedef ObjectImp CurveImp::Parent

Definition at line 39 of file curve_imp.h.

Member Function Documentation

Coordinate CurveImp::attachPoint ( ) const
virtual

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.

If this method returns a valid Coordinate, then this is interpreted as a pivot point for the label, which can still be moved relative to that point, but follows the object when the object changes. In practice a new RelativePointType is created (position of the string), this type in turn depends on the object (to get its attachPoint) and two DoubleImp that are interpreted as relative displacement (x and y)

Implements ObjectImp.

Definition at line 44 of file curve_imp.cc.

QString CurveImp::cartesianEquationString ( const KigDocument &  w) const

Definition at line 276 of file curve_imp.cc.

virtual bool CurveImp::containsPoint ( const Coordinate &  p,
const KigDocument &   
) const
pure virtual

Return whether this Curve contains the given point.

This is implemented as a numerical approximation. Implementations can/should use the value test_threshold in common.h as a threshold value.

Implemented in ArcImp, LineImp, ConicArcImp, RayImp, VectorImp, RationalBezierImp, ConicImp, SegmentImp, LocusImp, CubicImp, and BezierImp.

virtual CurveImp* CurveImp::copy ( ) const
pure virtual

Returns a copy of this ObjectImp.

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

Implements ObjectImp.

Implemented in LineImp, ConicArcImp, ArcImp, RayImp, ConicImpPolar, ConicImpCart, VectorImp, RationalBezierImp, SegmentImp, LocusImp, CubicImp, BezierImp, and CircleImp.

double CurveImp::getDist ( double  param,
const Coordinate &  p,
const KigDocument &  doc 
) const
protected

This function returns the distance between the point with parameter param and point p.

param is allowed to not be between 0 and 1, in which case we consider only the decimal part.

Definition at line 137 of file curve_imp.cc.

double CurveImp::getParam ( const Coordinate &  point,
const KigDocument &  doc 
) const
virtual

Reimplemented in LineImp, ArcImp, ConicArcImp, RayImp, VectorImp, SegmentImp, ConicImp, CubicImp, and CircleImp.

Definition at line 149 of file curve_imp.cc.

double CurveImp::getParamofmin ( double  a,
double  b,
const Coordinate &  p,
const KigDocument &  doc 
) const
protected

This function calculates the parameter of the point that realizes the minimum in [a,b] of the distance between the points of the locus and the point of coordinate p, using the golden ration method.

Definition at line 58 of file curve_imp.cc.

virtual const Coordinate CurveImp::getPoint ( double  param,
const KigDocument &   
) const
pure virtual

Implemented in ArcImp, LineImp, ConicArcImp, RayImp, RationalBezierImp, VectorImp, SegmentImp, LocusImp, ConicImp, BezierImp, CubicImp, and CircleImp.

const ObjectImpType * CurveImp::stype ( )
static

Returns the ObjectImpType representing the CurveImp type.

Definition at line 27 of file curve_imp.cc.


The documentation for this class was generated from the following files:
  • curve_imp.h
  • curve_imp.cc
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:35:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kig

Skip menu "kig"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal