Kig Python Scripting API Documentation

curve_imp.h
1 // Copyright (C) 2002 Dominique Devriese <devriese@kde.org>
2 
3 // This program is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU General Public License
5 // as published by the Free Software Foundation; either version 2
6 // of the License, or (at your option) any later version.
7 
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16 // 02110-1301, USA.
17 
18 #ifndef KIG_OBJECTS_CURVE_IMP_H
19 #define KIG_OBJECTS_CURVE_IMP_H
20 
21 #include "object_imp.h"
22 
27 class CurveImp
28  : public ObjectImp
29 {
30 public:
31  typedef ObjectImp Parent;
32 
36  static const ObjectImpType* stype();
37 
38  Coordinate attachPoint() const;
39 
40  // param is between 0 and 1. Note that 0 and 1 should be the
41  // end-points. E.g. for a Line, getPoint(0) returns a more or less
42  // infinite point. getPoint(0.5) should return the point in the
43  // middle.
44  virtual double getParam( const Coordinate& point, const KigDocument& ) const = 0;
45  // this should be the inverse function of getPoint().
46  // Note that it should also do something reasonable when p is not on
47  // the curve. You can return an invalid Coordinate(
48  // Coordinate::invalidCoord() ) if you need to in some cases.
49  virtual const Coordinate getPoint( double param, const KigDocument& ) const = 0;
50 
51  virtual CurveImp* copy() const = 0;
52 
59  virtual bool containsPoint( const Coordinate& p, const KigDocument& ) const = 0;
60 };
61 
62 #endif
The Object class represents the behaviour of an object after it is calculated.
Definition: object_imp.h:218
The Coordinate class is the basic class representing a 2D location by its x and y components...
Definition: coordinate.h:33
KDE Logo
This file is part of the documentation for tdelibs .
Documentation copyright © 1996-2002 the KDE developers.
Generated on Tue Feb 25 2025 13:46:37 by doxygen 1.8.13 written by Dimitri van Heesch, © 1997-2001