Merge branch 'dev' into spot-removal-tool

This commit is contained in:
Hombre57
2017-08-20 21:06:09 +02:00
566 changed files with 47792 additions and 35293 deletions

View File

@@ -17,67 +17,48 @@
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _IMAGEDIMENSIONS_
#define _IMAGEDIMENSIONS_
#pragma once
class PreviewProps
{
public:
int x, y, w, h, skip;
PreviewProps (int x, int y, int w, int h, int skip);
PreviewProps(int _x, int _y, int _width, int _height, int _skip);
int getX() const;
int getY() const;
int getWidth() const;
int getHeight() const;
int getSkip() const;
void set (int x, int y, int w, int h, int skip);
private:
int x;
int y;
int width;
int height;
int skip;
};
/*
* Description of an image dimension, with getter and setter
* Description of an image dimension, with getter
*/
class ImageDimensions
{
public:
ImageDimensions();
int getWidth() const
{
return width;
}
int getHeight() const
{
return height;
}
void transform(const PreviewProps& pp, int tran, int& sx1, int& sy1, int& sx2, int& sy2) const;
protected:
int width;
int height;
public:
ImageDimensions ();
int getW ();
int getH ();
int getWidth () const;
int getHeight () const;
void transform (const PreviewProps & pp, int tran, int &sx1, int &sy1, int &sx2, int &sy2);
};
inline PreviewProps::PreviewProps (int x, int y, int w, int h, int skip) :
x (x), y (y), w (w), h (h), skip (skip) {
}
inline void PreviewProps::set (int x, int y, int w, int h, int skip) {
this->x = x;
this->y = y;
this->w = w;
this->h = h;
this->skip = skip;
}
inline ImageDimensions::ImageDimensions () :
width (-1), height (-1) {
}
inline int ImageDimensions::getW () {
return width;
}
inline int ImageDimensions::getH () {
return height;
}
inline int ImageDimensions::getWidth () const {
return width;
}
inline int ImageDimensions::getHeight () const {
return height;
}
#endif