bezctx.c 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. ppedit - A pattern plate editor for Spiro splines.
  3. Copyright (C) 2007 Raph Levien
  4. This program is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU General Public License
  6. as published by the Free Software Foundation; either version 2
  7. of the License, or (at your option) any later version.
  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. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  15. 02110-1301, USA.
  16. */
  17. #include "bezctx.h"
  18. void bezctx_moveto(bezctx *bc, double x, double y, int is_open)
  19. {
  20. bc->moveto(bc, x, y, is_open);
  21. }
  22. void bezctx_lineto(bezctx *bc, double x, double y)
  23. {
  24. bc->lineto(bc, x, y);
  25. }
  26. void bezctx_quadto(bezctx *bc, double x1, double y1, double x2, double y2)
  27. {
  28. bc->quadto(bc, x1, y1, x2, y2);
  29. }
  30. void bezctx_curveto(bezctx *bc, double x1, double y1, double x2, double y2,
  31. double x3, double y3)
  32. {
  33. bc->curveto(bc, x1, y1, x2, y2, x3, y3);
  34. }
  35. void bezctx_mark_knot(bezctx *bc, int knot_idx)
  36. {
  37. if (bc->mark_knot)
  38. bc->mark_knot(bc, knot_idx);
  39. }