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.

36 lines
1.1 KiB

  1. #ifndef BEZIER_CURVES_H
  2. #define BEZIER_CURVES_H
  3. #include <vector>
  4. #include <wx/gdicmn.h>
  5. /**
  6. * Function Bezier2Poly
  7. * convert a Bezier curve to a polyline
  8. * @param c1 - First point to convert.
  9. * @param c2 - Second point to convert.
  10. * @param c3 - Third point to convert.
  11. * @return a std::vector<wxPoint> containing the points of the polyline
  12. */
  13. std::vector<wxPoint> Bezier2Poly(wxPoint c1, wxPoint c2, wxPoint c3);
  14. std::vector<wxPoint> Bezier2Poly(int x1, int y1, int x2, int y2, int x3, int y3);
  15. /**
  16. * Function Bezier2Poly
  17. * convert a Bezier curve to a polyline
  18. * @return a std::vector<wxPoint> containing the points of the polyline
  19. * @param c1 - First point to convert.
  20. * @param c2 - Second point to convert.
  21. * @param c3 - Third point to convert.
  22. * @param c4 - Fourth point to convert.
  23. * @return a std::vector<wxPoint> containing the points of the polyline
  24. */
  25. std::vector<wxPoint> Bezier2Poly( wxPoint c1, wxPoint c2, wxPoint c3,wxPoint c4 );
  26. std::vector<wxPoint> Bezier2Poly(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4);
  27. #endif // BEZIER_CURVES_H