This commit is contained in:
jkriege2 2024-02-14 00:03:38 +01:00
parent 86c2e821c1
commit 9349f486cb
2 changed files with 18 additions and 8 deletions

View File

@ -30,5 +30,5 @@ Finally we also add symbols for each control point and a poly-line connecting th
Here is the resulting plot: Here is the resulting plot:
![geo_bezier](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/doc/images/geo_bezier.png) ![geo_bezier](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/geo_bezier.png)

View File

@ -456,7 +456,7 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPGeoPolyLines: public JKQTPGeoBaseDecoratedLine
/** \brief This JKQTPGeometricPlotElement is used to draw a bezier curve /** \brief This JKQTPGeometricPlotElement is used to draw a bezier curve
* \ingroup jkqtplotter_geoplots * \ingroup jkqtplotter_geoplots
* *
* \image html JKQTPlotterGeometricBezierGraphic.png "drawn with JKQTPGeometricPlotElement::DrawMode::DrawAsGraphicElement" * \image html JKQTPGeoBezierCurveGraphic.png "drawn with JKQTPGeometricPlotElement::DrawMode::DrawAsGraphicElement"
* *
* \see \ref JKQTPlotterGeometricBezier, JKQTPGeoBaseDecoratedLine * \see \ref JKQTPlotterGeometricBezier, JKQTPGeoBaseDecoratedLine
* *
@ -466,8 +466,8 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPGeoPolyLines: public JKQTPGeoBaseDecoratedLine
* *
* On logarithmic axes (x&y) the two modes draw very different shapes: * On logarithmic axes (x&y) the two modes draw very different shapes:
* *
* \image html JKQTPlotterGeometricBezierLogMath.png "drawn with JKQTPGeometricPlotElement::DrawMode::DrawAsMathematicalCurve" * \image html JKQTPGeoBezierCurveLogMath.png "drawn with JKQTPGeometricPlotElement::DrawMode::DrawAsMathematicalCurve"
* \image html JKQTPlotterGeometricBezierLogGraphic.png "drawn with JKQTPGeometricPlotElement::DrawMode::DrawAsGraphicElement" * \image html JKQTPGeoBezierCurveLogGraphic.png "drawn with JKQTPGeometricPlotElement::DrawMode::DrawAsGraphicElement"
* *
* For DrawAsGraphicElement only the control points are converted to screen-coordinates, but drawing takes place in the (linear) screen-system. * For DrawAsGraphicElement only the control points are converted to screen-coordinates, but drawing takes place in the (linear) screen-system.
* For DrawAsMathematicalCurve drawing is done in the log-coordinate system. * For DrawAsMathematicalCurve drawing is done in the log-coordinate system.
@ -489,25 +489,35 @@ public:
/** \brief class constructor with start, end and one control point (i.e. a quadratic bezier curve) /** \brief class constructor with start, end and one control point (i.e. a quadratic bezier curve)
* *
* \param parent the parent plotter object * \param parent the parent plotter object
* \param points points on the polygon * \param start start point
* \param control1 control-point in between start and end
* \param end end point
*/ */
JKQTPGeoBezierCurve(JKQTBasePlotter* parent, const QPointF& start, const QPointF& control1, const QPointF& end); JKQTPGeoBezierCurve(JKQTBasePlotter* parent, const QPointF& start, const QPointF& control1, const QPointF& end);
/** \brief class constructor with start, end and one control point (i.e. a quadratic bezier curve) /** \brief class constructor with start, end and one control point (i.e. a quadratic bezier curve)
* *
* \param parent the parent plotter object * \param parent the parent plotter object
* \param points points on the polygon * \param start start point
* \param control1 control-point in between start and end
* \param end end point
*/ */
JKQTPGeoBezierCurve(JKQTPlotter* parent, const QPointF& start, const QPointF& control1, const QPointF& end); JKQTPGeoBezierCurve(JKQTPlotter* parent, const QPointF& start, const QPointF& control1, const QPointF& end);
/** \brief class constructor with start, end and two control points (i.e. a cubic bezier curve) /** \brief class constructor with start, end and two control points (i.e. a cubic bezier curve)
* *
* \param parent the parent plotter object * \param parent the parent plotter object
* \param points points on the polygon * \param start start point
* \param control1 1st control-point in between start and end
* \param control2 2nd control-point in between start and end
* \param end end point
*/ */
JKQTPGeoBezierCurve(JKQTBasePlotter* parent, const QPointF& start, const QPointF& control1, const QPointF& control2, const QPointF& end); JKQTPGeoBezierCurve(JKQTBasePlotter* parent, const QPointF& start, const QPointF& control1, const QPointF& control2, const QPointF& end);
/** \brief class constructor with start, end and two control points (i.e. a cubic bezier curve) /** \brief class constructor with start, end and two control points (i.e. a cubic bezier curve)
* *
* \param parent the parent plotter object * \param parent the parent plotter object
* \param points points on the polygon * \param start start point
* \param control1 1st control-point in between start and end
* \param control2 2nd control-point in between start and end
* \param end end point
*/ */
JKQTPGeoBezierCurve(JKQTPlotter* parent, const QPointF& start, const QPointF& control1, const QPointF& control2, const QPointF& end); JKQTPGeoBezierCurve(JKQTPlotter* parent, const QPointF& start, const QPointF& control1, const QPointF& control2, const QPointF& end);
/** \brief class constructor /** \brief class constructor