Photo_def.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /* Photo_def.h
  2. *
  3. * Copyright (C) 2013,2014,2015,2017 Paul Boersma
  4. *
  5. * This code is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or (at
  8. * your option) any later version.
  9. *
  10. * This code is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. * See the GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this work. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #define ooSTRUCT Photo
  19. oo_DEFINE_CLASS (Photo, SampledXY)
  20. oo_OBJECT (Matrix, 2, d_red)
  21. oo_OBJECT (Matrix, 2, d_green)
  22. oo_OBJECT (Matrix, 2, d_blue)
  23. oo_OBJECT (Matrix, 2, d_transparency)
  24. #if oo_DECLARING
  25. void v_info ()
  26. override;
  27. bool v_hasGetNrow ()
  28. override { return true; }
  29. double v_getNrow ()
  30. override { return ny; }
  31. bool v_hasGetNcol ()
  32. override { return true; }
  33. double v_getNcol ()
  34. override { return nx; }
  35. bool v_hasGetYmin ()
  36. override { return true; }
  37. double v_getYmin ()
  38. override { return ymin; }
  39. bool v_hasGetYmax ()
  40. override { return true; }
  41. double v_getYmax ()
  42. override { return ymax; }
  43. bool v_hasGetNy ()
  44. override { return true; }
  45. double v_getNy ()
  46. override { return ny; }
  47. bool v_hasGetDy ()
  48. override { return true; }
  49. double v_getDy ()
  50. override { return dy; }
  51. bool v_hasGetY ()
  52. override { return true; }
  53. double v_getY (integer iy)
  54. override { return y1 + (iy - 1) * dy; }
  55. #endif
  56. oo_END_CLASS (Photo)
  57. #undef ooSTRUCT
  58. /* End of file Matrix_def.h */