mi_fply.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* This file is part of the GNU libxmi package.
  2. Copyright (C) 1985, 1986, 1987, 1988, 1989, X Consortium. For an
  3. associated permission notice, see the accompanying file README-X.
  4. GNU enhancements Copyright (C) 1998, 1999, 2000, 2005, Free Software
  5. Foundation, Inc.
  6. The GNU libxmi package is free software. You may redistribute it
  7. and/or modify it under the terms of the GNU General Public License as
  8. published by the Free Software foundation; either version 2, or (at your
  9. option) any later version.
  10. The GNU libxmi package is distributed in the hope that it will be
  11. useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. General Public License for more details.
  14. You should have received a copy of the GNU General Public License along
  15. with the GNU plotutils package; see the file COPYING. If not, write to
  16. the Free Software Foundation, Inc., 51 Franklin St., Fifth Floor,
  17. Boston, MA 02110-1301, USA. */
  18. #define EPSILON 0.000001
  19. #define ISEQUAL(a,b) (FABS((a) - (b)) <= EPSILON)
  20. #define UNEQUAL(a,b) (FABS((a) - (b)) > EPSILON)
  21. #define PTISEQUAL(a,b) (ISEQUAL(a.x,b.x) && ISEQUAL(a.y,b.y))
  22. /* Point with sub-pixel positioning. In this case we use doubles, but
  23. * see mi_fplycon.c for other possibilities.
  24. */
  25. typedef struct
  26. {
  27. double x, y;
  28. } SppPoint;
  29. /* Arc with sub-pixel positioning. */
  30. typedef struct
  31. {
  32. double x, y, width, height;
  33. double angle1, angle2;
  34. } SppArc;
  35. extern void miFillSppPoly (miPaintedSet *paintedSet, miPixel pixel, int count, const SppPoint *ptsIn, int xTrans, int yTrans, double xFtrans, double yFtrans);