You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
2.0 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. *
  3. * This file is part of QMapControl,
  4. * an open-source cross-platform map widget
  5. *
  6. * Copyright (C) 2007 - 2008 Kai Winter
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU Lesser General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU Lesser General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public License
  19. * along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. * Contact e-mail: kaiwinter@gmx.de
  22. * Program URL : http://qmapcontrol.sourceforge.net/
  23. *
  24. */
  25. #ifndef CURVE_H
  26. #define CURVE_H
  27. #include "qmapcontrol_global.h"
  28. #include "geometry.h"
  29. #include "point.h"
  30. //! A Curve Geometry, implemented to fullfil OGC Spec
  31. /*!
  32. * The Curve class is used by LineString as parent class.
  33. * This class could not be used directly.
  34. *
  35. * From the OGC Candidate Implementation Specification:
  36. * "A Curve is a 1-dimensional geometric object usually stored as a sequence of Points, with the subtype of Curve
  37. * specifying the form of the interpolation between Points. This specification defines only one subclass of Curve,
  38. * LineString, which uses a linear interpolation between Points."
  39. * @author Kai Winter <kaiwinter@gmx.de>
  40. */
  41. class Curve : public Geometry {
  42. //Q_OBJECT
  43. public:
  44. virtual ~Curve();
  45. double Length;
  46. // virtual Geometry Clone();
  47. // virtual QRectF GetBoundingBox();
  48. // virtual Point EndPoint() = 0;
  49. // virtual Point StartPoint() = 0;
  50. // virtual Point Value() = 0;
  51. protected:
  52. Curve(QString name = QString());
  53. virtual void draw(QPainter* painter, const MapAdapter* mapadapter, const QRect &screensize, const QPoint offset) = 0;
  54. };
  55. #endif