CRotateImage.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #pragma once
  2. #ifndef CROTATEIMAGE_H
  3. #define CROTATEIMAGE_H
  4. #include "CImageBasis.h"
  5. class CRotateImage : public CImageBasis
  6. {
  7. public:
  8. CImageBasis *ImageTMP, *ImageOrg;
  9. int pixel_fill_color = 216; // Gray
  10. bool doflip;
  11. CRotateImage(std::string name, std::string _image, bool _flip = false) : CImageBasis(name, _image)
  12. {
  13. ImageTMP = NULL;
  14. ImageOrg = NULL;
  15. doflip = _flip;
  16. };
  17. CRotateImage(std::string name, uint8_t *_rgb_image, int _channels, int _width, int _height, int _bpp, bool _flip = false) : CImageBasis(name, _rgb_image, _channels, _width, _height, _bpp)
  18. {
  19. ImageTMP = NULL;
  20. ImageOrg = NULL;
  21. doflip = _flip;
  22. };
  23. CRotateImage(std::string name, CImageBasis *_org, CImageBasis *_temp, bool _flip = false);
  24. void Rotate(float _angle);
  25. void RotateAntiAliasing(float _angle);
  26. void Rotate(float _angle, int _centerx, int _centery);
  27. void RotateAntiAliasing(float _angle, int _centerx, int _centery);
  28. void Translate(int _dx, int _dy);
  29. };
  30. #endif // CROTATEIMAGE_H