Kig Python Scripting API Documentation

cubic_imp.h
1// Copyright (C) 2003 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_CUBIC_IMP_H
19#define KIG_OBJECTS_CUBIC_IMP_H
20
21#include "curve_imp.h"
22
23#include "../misc/cubic-common.h"
24
25class LineData;
26
30class CubicImp
31 : public CurveImp
32{
33 const CubicCartesianData mdata;
34public:
35 typedef CurveImp Parent;
36 static const ObjectImpType* stype();
37
38 CubicImp( const CubicCartesianData& data );
39 ~CubicImp();
40
41 ObjectImp* transform( const Transformation& ) const;
42 void draw( KigPainter& p ) const;
43 bool contains( const Coordinate& p, int width, const KigWidget& ) const;
44 bool inRect( const Rect& r, int width, const KigWidget& ) const;
45 Rect surroundingRect() const;
46 TQString cartesianEquationString( const KigDocument& ) const;
47
48 const uint numberOfProperties() const;
49 const QCStringList properties() const;
50 const QCStringList propertiesInternalNames() const;
51 ObjectImp* property( uint which, const KigDocument& w ) const;
52 const char* iconForProperty( uint which ) const;
53 const ObjectImpType* impRequirementForProperty( uint which ) const;
54 bool isPropertyDefinedOnOrThroughThisImp( uint which ) const;
55
56 CubicImp* copy() const;
57
58 double getParam( const Coordinate& point, const KigDocument& ) const;
59
60 // The getPoint function doesn't need the KigDocument argument, the
61 // first getPoint function is identical to the other one. It is
62 // only provided for implementing the CurveImp interface.
63 const Coordinate getPoint( double param, const KigDocument& ) const;
64 const Coordinate getPoint( double param ) const;
65
66public:
70 const CubicCartesianData data() const;
71
72 const ObjectImpType* type() const;
73 void visit( ObjectImpVisitor* vtor ) const;
74
75 bool equals( const ObjectImp& rhs ) const;
76
77 bool containsPoint( const Coordinate& p, const KigDocument& doc ) const;
78 bool internalContainsPoint( const Coordinate& p, double threshold ) const;
79};
80
81#endif
The Coordinate class is the basic class representing a 2D location by its x and y components.
Definition: coordinate.h:34
This class represents an equation of a cubic in the form (in homogeneous coordinates,...
Definition: cubic-common.h:32
An Object representing a cubic.
Definition: cubic_imp.h:32
Object * transform(const Transformation &) const
Return this Object, transformed by the transformation t.
const ObjectType * type() const
Returns the lowermost ObjectType that this object is an instantiation of.
bool containsPoint(const Coordinate &p, const KigDocument &doc) const
Return whether this Curve contains the given point.
const CubicCartesianData data() const
Return the cartesian representation of this cubic.
Cubic * copy() const
Returns a copy of this Object.
bool equals(const Object &rhs) const
Returns true if this Object is equal to rhs.
This class represents a curve: something which is composed of points, like a line,...
Definition: curve_imp.h:29
Simple class representing a line.
Definition: common.h:60
Instances of this class represent a certain Object type.
Definition: object_imp.h:89
The Object class represents the behaviour of an object after it is calculated.
Definition: object_imp.h:219
Class representing a transformation.
Definition: kigtransform.h:38
KDE Logo
This file is part of the documentation for tdelibs .
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed May 15 2024 03:39:42 by doxygen 1.9.4 written by Dimitri van Heesch, © 1997-2001